Sorry, but I am unable to understand the other half part which you are trying to address.
I understood you mean that the extract_path field should be full so that too changed , but the result is same.
Can you please highlight what is wrong in my code. I am trying to learn puppet and did several combinations on archive module in my lab setup but none worked for me yet. Maybe with your help I can learn something new.
I noticed that you defined source path as it as. You have to define source in the supported uri https|http|file.
For example : source => ‘file:///usr/src/games/games.zip’ from there it will pick your zip file.
Though I tried that too in my lab exactly before but it game error, “unable to extract”. Now that I understand that you need unzip package too on the app server to make it work.
One more thing, I still noticed that with this code too cleaup => true the zip file does not delete after extract. Is it the correct behaviour ?
Document states as below:
``cleanup : whether archive file will be removed after extraction (true|false). (default: true)
Few things just to brief it down so others can also get help –
source => does not require file:/// and it works with direct absolute path too. Maybe in some other custom archive module, this might be mandatory but not in this one.
For example: source => ‘/usr/src/games/games.zip’
cleanup => by default the value is true but somehow I failed to get it to delete the archive zip file after extract
it is required to install the archive module with the following command. But in KKE labs these are already installed so no need to worry. puppet module install puppet-archive --version 4.5.0
dependant packages are required incase you are testing this in a fresh lab setup. But in KKE labs these are already installed so no need to worry. For archive module the dependent package is wget & bunzip/unzip
Hi @Tej-Singh-Rana & @kleansoul,
I am having the same issue do not know why , it runs but it does not extract.
This is my manifest.
node ‘stapp01.stratos.xfusioncorp.com’ {
archive { ‘/usr/src/cluster/cluster.zip’:
source => ‘/usr/src/cluster/cluster.zip’,
extract => true,
extract_path => ‘/opt/cluster’,
ensure => present,
cleanup => false,
}
}
My puppet manifest wasn’t extracting the content of the zip file into the destination folder.
With the help of this post and some googling I modified it and it finally worked as expected.
I suspect the issue was because the order of operations of the parameters in the ‘archive’ module.