Thank you I'll try that then. Yes I want puppet to use status command otherwise it will do something like ps -ef | grep $service_name As this is iptables I'll have no match.
Regards On 1 February 2012 17:16, Gary Larizza <g...@puppetlabs.com> wrote: > > > On Wed, Feb 1, 2012 at 10:41 AM, Hugo Deprez <hugo.dep...@gmail.com>wrote: > >> Dear community, >> >> I use puppet to deploy iptables on every server. >> This is working fine. >> >> In the manifest I defined an iptables service which leads to my init >> script. >> The thing is each time I run puppet I got : notice: >> /Stage[main]/Iptables/Service[netfilter]/ensure: ensure changed 'stopped' >> to 'running' >> >> I would like to add a status command to my startup script in order to >> reduce the number of iptables restart. >> >> I wasn't able to find out what return code puppet was waiting for a >> running service ? >> >> If iptables is running does the script should return 0 ? >> If not running it should return 1 ? >> > > This is correct. Zero and non-zero are what we're looking for here on > your status script. > > >> >> Then I'll add hasstatus => true, to my service. >> > > This is only needed if you're using the INIT script to check the status. > Setting hasstatus => true tells puppet to look for an init script and use > the status command in the init script. > > >> >> Regards >> Hugo >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> 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. >> > > > > -- > > Gary Larizza > Professional Services Engineer > Puppet Labs > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > 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. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.