Warning: Waiting for output; will sleep 0.0 secondsWarning: Waiting for output; will sleep 0.5 secondsWarning: Could not get outputNotice: /Stage[post]/provision/Exec[provision.sh]/returns: executed successfullyNotice: Finished catalog run in 107.80 seconds
class provision {notify {'Running provision.sh can take a while - be patient':}file { '/root/provision.sh' :ensure => file,owner => 'root',group => 'root',mode => '0755',source => 'puppet:///modules/provision/provision.sh',notify => Exec['provision.sh'],}exec { 'provision.sh' :command => '/root/provision.sh',logoutput => true,timeout => 1800,cwd => '/root';}}
Example of long exec running backgrounded in a screen.
exec { 'zrep_initial_sync':
command => "screen -dmS zrep_initial_sync /usr/local/sbin/krb_me.sh /usr/local/sbin/zrep init ${src_vol} ${dst_host} ${dst_vol}", onlyif => "zfs get -H zrep:src-fs -o value ${src_vol} | grep -qv ${src_vol}", path => ['/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/',
'/usr/local/bin', '/usr/local/sbin'], }
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1a15177f-e0f1-4d1b-8c87-5f7b47d7dede%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In this case the screen session stays forever and you can connect to it later to see the output. That may or may not be useful to you of course
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8dc78f95-4c00-4693-b659-9cdad3dc9ade%40googlegroups.com.