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.
Puppet does do that. But it does not do it immediately. To test the the code you can trigger a run with puppet agent -t on node and puppet will apply the config for this node.
The code seems right to me. Did you run the sudo puppet agent -t command on an application node? On jump hosts this command does nothing, as the modifications for jump_host are the modifications of node default