example42 / puppi

Puppet module to manage applications deployments and servers local management
http://www.example42.com
Other
142 stars 84 forks source link

puppi::netinstall zip example #118

Open ghost opened 9 years ago

ghost commented 9 years ago

I was trying this out the URL is a zip downloads but does not extract, checked the code it should run any ideas why ?

I only get:

Notice: 
/Stage[main]/Main/Ife_toolbelt::Define::Ejbca[ejbca.msm.internal]/Puppi::Netinstall[netinstall_ejbca]/Exec[Retrieve http://sourceforge.net/projects/ejbca/files/ejbca6/ejbca_6_2_0/ejbca_ce_6_2_0.zip in /var/tmp]/returns: executed successfully

with

puppi::netinstall { 'netinstall_ejbca':
    url                 => $supported_ejbca_url,
    destination_dir     => '/opt',
    extracted_dir       => $supported_ejbca_dirname,
    owner               => $supported_ejbca_username,
    group               => $supported_ejbca_username,
    postextract_command => $supported_ejbca_postcmd,    
    require             => User[$supported_ejbca_username]
  }
alvagante commented 9 years ago

Can you provide me the code with the variables replaced , for testing

alvagante commented 9 years ago

With something like (no need to specify the extacted dir, it's calculated automatically when is like the downloaded filename without .zip: root@all-dev-01:~# cat /tmp/test.pp puppi::netinstall { 'netinstall_ejbca': url => 'http://sourceforge.net/projects/ejbca/files/ejbca6/ejbca_6_2_0/ejbca_ce_6_2_0.zip', destination_dir => '/opt', }

root@all-dev-01:~# puppet apply /tmp/test.pp --modulepath=/vagrant/modules/public/ Notice: Compiled catalog for all-dev-01.rocket.local in environment production in 0.36 seconds Notice: /Stage[main]/Main/Puppi::Netinstall[netinstall_ejbca]/Exec[Retrieve http://sourceforge.net/projects/ejbca/files/ejbca6/ejbca_6_2_0/ejbca_ce_6_2_0.zip in /var/tmp - netinstall_ejbca]/returns: executed successfully Notice: /Stage[main]/Main/Puppi::Netinstall[netinstall_ejbca]/Exec[Extract ejbca_ce_6_2_0.zip from /var/tmp - netinstall_ejbca]/returns: executed successfully Notice: /Stage[main]/Main/Puppi::Netinstall[netinstall_ejbca]/Exec[Chown ejbca_ce_6_2_0.zip in /opt - netinstall_ejbca]: Triggered 'refresh' from 1 events Notice: Finished catalog run in 34.87 seconds root@all-dev-01:~# ls -l /opt/ total 12 drwxr-xr-x 9 root root 4096 Mar 13 11:37 cphalcon-v1.3.4 drwx------ 9 root root 4096 Jun 17 2014 ejbca_ce_6_2_0 drwxr-xr-x 9 root root 4096 Mar 10 17:35 VBoxGuestAdditions-4.3.20