Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

ERROR: Could not open downloaded file

$
0
0
I have 2 classes in my puppet module, *class filebeat* and *class filebeat::install_filebeat inherits filebeat*. In class filebeat I want to download a properties file and save it in an specific path so I do: exec{ 'get_properties_file': command => "/usr/bin/curl -o ${properties_path} '${download_url}'", creates => $properties_path, } file{ $properties_path: mode => '644', target => $properties_path require => Exec["get_properties file"], } This is working fine, and the file is downloaded to the $properties_path Then in my class filebeat::install_filebeat I want to do: $file = file($properties_path) This works fine if the file has been savev in the $properties_path in a previous execution but when I try to do everything at once by adding in my class filebeat *include filebeat::install_filebeat* I keep getting the error: **"Error: Could not find any files from [properties_path]"** It seems to me that puppet is trying to do file($properties_path) before doing the download first, but I really don't how to solve it.. Any help will be awsome!

Viewing all articles
Browse latest Browse all 6104

Trending Articles