On Thursday, April 12, 2012 4:07:40 PM UTC-4, puppetguest wrote: > > I have choosen to split my module into several .pp files as i have > seen in an example and makes it cleaner i think. > > \modules\mysoftware\ > init.pp > install.pp > config.pp > service.pp > > Is that recommended or too many disadvantages ? > > So my install.pp went through fine, config.pp as well. > When i change a config-file and puppet runs again i want the automatic > service restart but doesnt work unfortunately. > > Does someone know the proper syntax how to trigger from config.pp the > function in service.pp for such a case ? > > Examples like these dont work :-( > notify => Class["mysoftware::service"] > notify => Class["mysoftware::service::mysoftwarerestart"] > ... > > How about:
notify => Exec['mysoftwarerestart'] You could also look at 'refreshonly' under the type reference for exec: http://docs.puppetlabs.com/references/2.7.0/type.html#exec > I should mention that the service has to restart via a shell-script, > not via init services ! > So may be the service.pp needs some corrections too ? > > service.pp > > class mysoftware::service ( > $user = "myuser", > ) { > > exec {"mysoftwarerestart": > command => "/opt/mysoftware/bin/script.sh restart", > require => Class["mysoftware::config"], > } > > } > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/hzUXRE0EmLMJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.