Re: [Puppet Users] Puppet agents get hanged in "Info: Loading facts"
Hi, Yes I'm running Foreman (Puppet master), I have more than 200 servers which works great. This is the only server which is problematic and seems to be due to Facter. Thanks, EddieM On Thursday, November 5, 2015 at 5:40:21 PM UTC+2, Craig Dunn wrote: > > Your code snippet suggests that facter has run, and the master is > timing out running /etc/puppet/node.rb which is the ENC script (which > happens after the facts have been sent by the agent). Are you > running Foreman/Satellite? - It sounds like you may have a network > connectivity issue here between your Puppet master and ENC > > Craig > > On Thu, Nov 5, 2015 at 4:23 PM, Eddie Mashayev <eddi...@gmail.com > > wrote: > > Hi All, > > > > I have CentOS 6.5 running puppet agent version 3.8.2 the problem is when > I’m > > running “puppet agent -t” it gets hanged: > > > > [root@server ~]# puppet agent -t > > Info: Retrieving pluginfacts > > Info: Retrieving plugin > > Info: Loading facts > > Info: Loading facts > > > > “Could not retrieve catalog from remote server: Error 400 on SERVER: > Failed > > when searching for node : Failed to find via exec: Execution of > > '/etc/puppet/node.rb” > > > > > > > > After I checked it I found out the reason, I have more than 1000 VLANs > on > > the servers and I guess when the Facter collecting the INFO it gets > timeout > > and fails. > > I found this thread to “Allow for disabling certain facts within Facter > ” > > https://tickets.puppetlabs.com/browse/FACT-718” but it still wasn’t > > implemented. > > My question is there is any way that puppet won’t get info for VLANS? > > Meaning "puppet agent –t" won’t triger the Facter get information about > > VLANS? > > If no how can I override this issue? > > > > Thakns, > > EddieM > > > > -- > > 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/857038e6-6e35-4bd0-a86e-710093744a71%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > Enviatics | Automation and configuration management > http://www.enviatics.com | @Enviatics > http://dojo.training | @DojoTraining > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f9f5f40a-d211-45a1-bb6f-80e7713fab68%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Puppet agents get hanged in "Info: Loading facts"
Hi All, I have CentOS 6.5 running puppet agent version 3.8.2 the problem is when I’m running “puppet agent -t” it gets hanged: [root@server ~]# puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Loading facts “Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node : Failed to find via exec: Execution of '/etc/puppet/node.rb” After I checked it I found out the reason, I have more than 1000 VLANs on the servers and I guess when the Facter collecting the INFO it gets timeout and fails. I found this thread to “Allow for disabling certain facts within Facter ” https://tickets.puppetlabs.com/browse/FACT-718” but it still wasn’t implemented. My question is there is any way that puppet won’t get info for VLANS? Meaning "puppet agent –t" won’t triger the Facter get information about VLANS? If no how can I override this issue? Thakns, EddieM -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/857038e6-6e35-4bd0-a86e-710093744a71%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Puppet saying "changed 'stopped' to 'running'" while the service is running
Hi, Thanks for the response. I removed the `hasstatus' and 'hasrestart' from my module and still the same result. By the way, my agents are only CentOS 5/6/7. Thanks, EddieM On Wednesday, October 14, 2015 at 4:07:31 PM UTC+3, jcbollinger wrote: > > > > On Wednesday, October 14, 2015 at 2:51:42 AM UTC-5, Eddie Mashayev wrote: >> >> Hi All, >> >> I have some wired problem with my module to manage MacAfee services. >> My lab have around 150 servers and 145 of them works fine with the module >> I’ve created. >> There are 5 which shows these changes all the time although the service >> is in running state already. >> >> [root@pingapp ~]# service cma status >> cma (pid 1497) is running... >> [root@pingapp ~]# puppet agent -t >> Info: Retrieving pluginfacts >> Info: Retrieving plugin >> Info: Loading facts >> Info: Loading facts >> Info: Caching catalog for il-pingapp-lp1.imperva.local >> Info: Applying configuration version '1444807950' >> Notice: /Stage[main]/Mcafee/Service[cma]/ensure: ensure changed 'stopped' >> to 'running' >> Info: /Stage[main]/Mcafee/Service[cma]: Unscheduling refresh on Service[ >> cma] >> Notice: Finished catalog run in 1.80 seconds >> >> >> My module is very simple: >> class mcafee { >> if $check_nails_exsist == 'true' { >> >> service { 'nails': >> ensure => "stopped", >> enable => false, >> hasstatus => false, >> hasrestart => false, >> } >> } >> else { >> service { 'nails': >> ensure => "running", >> enable => true, >> hasstatus => false, >> hasrestart => true, >> } >> service { 'cma': >> ensure => "running", >> enable => true, >> hasstatus => false, >> hasrestart => true, >> } >> } >> } >> >> >> As I said in 145 servers with this module works fine according to the if >> statement and another 5 servers shows the "changed 'stopped' to 'running'" >> I checked this thread https://projects.puppetlabs.com/issues/9798 but it >> didn’t help me. >> >> Any suggestions for this weird behavior? >> >> > Your Service resources look wrong. In the event that your services have > no status command, you must not only set the `hasstatus` parameter to > `false`, but also specify a status-check command manually via the `status` > parameter. Having done one but not the other, you leave Puppet with no way > to determine whether the service is already running. I'm not sure how > Puppet will handle that, but ultimately, it's a flaw in your manifest. > > I guess the agents you are managing are running Windows. Are they running > the same version of the Puppet agent? It may be that different versions > handle the flaws in your manifest differently. > > Also, the default Service provider for Windows *does* claim to provide a > 'status' command for all services, but on the other hand does not claim to > provide a 'restart' command. Your Service declarations specify differently > on both points, for reasons that are unclear to me. I talked about status > already. I suspect the restart issue is being cleaned up for you > internally by the provider; perhaps that's what the unusual > message "Unscheduling refresh on Service[cma]" is about. > > I'm inclined to say that you should remove the declared `hasstatus' and > 'hasrestart' properties from all the Service declarations, as I see no > reason why it would be appropriate to override their default values in your > case. If you nevertheless continue to set 'hasstatus' to 'false', however, > then you must provide a command via the 'status' parameter that Puppet will > use to determine whether the service is already running. See the docs > <http://docs.puppetlabs.com/references/4.2.latest/type.html#service-attribute-status> > > for more details. > > > John > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7a4f646f-131d-429b-a838-da7d0b06c521%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Puppet saying "changed 'stopped' to 'running'" while the service is running
Hi All, I have some wired problem with my module to manage MacAfee services. My lab have around 150 servers and 145 of them works fine with the module I’ve created. There are 5 which shows these changes all the time although the service is in running state already. [root@pingapp ~]# service cma status cma (pid 1497) is running... [root@pingapp ~]# puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Loading facts Info: Caching catalog for il-pingapp-lp1.imperva.local Info: Applying configuration version '1444807950' Notice: /Stage[main]/Mcafee/Service[cma]/ensure: ensure changed 'stopped' to 'running' Info: /Stage[main]/Mcafee/Service[cma]: Unscheduling refresh on Service[cma] Notice: Finished catalog run in 1.80 seconds My module is very simple: class mcafee { if $check_nails_exsist == 'true' { service { 'nails': ensure => "stopped", enable => false, hasstatus => false, hasrestart => false, } } else { service { 'nails': ensure => "running", enable => true, hasstatus => false, hasrestart => true, } service { 'cma': ensure => "running", enable => true, hasstatus => false, hasrestart => true, } } } As I said in 145 servers with this module works fine according to the if statement and another 5 servers shows the "changed 'stopped' to 'running'" I checked this thread https://projects.puppetlabs.com/issues/9798 but it didn’t help me. Any suggestions for this weird behavior? Thanks, EddieM -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/2efd3bf1-a218-4c67-b652-d4d227492c99%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Help with NTP module provided by puppetlabs
Hi Richard, Just wondering, I do have now a locations configured on my Foreman (:locations_enabled: true), how can I access this data? For example if I have a Facter variable named $location or $os_version so I can use it on mypuppet scripts. How can I use Foreman locations variable? Hope I made myself clear :) Thanks, EddieM On Tuesday, August 11, 2015 at 6:12:58 PM UTC+3, Eddie Mashayev wrote: Thanks for the help :) On Tuesday, August 11, 2015 at 1:24:48 AM UTC+3, Richard Gray wrote: On 10/08/15 20:12, Martin Alfke wrote: You need to create a hiera.yaml config file. The config file may look like this: :backends: - yaml :yaml: :datadir: ‘/etc/puppet/data’ :hierachy: - “nodes/#{::certname}” - “location/#{::timezone}” - global Further to Martin's comment, you may be interested to know that the Foreman location and environment are available to Hiera, so you might prefer to use those rather than the timezone fact. E.g. :backends: - yaml :yaml: :datadir: ‘/etc/puppet/data’ :hierachy: - “nodes/#{::certname}” - “location/#{::location}” - global -- *Richard Gray* | Senior Operations Engineer *DDI:* +64 9 950 2196 *Fax:* +64 9 302 0518 *Mobile:* +64 21 050 8178 *Freephone:*0800 SMX SMX (769 769) *SMX Limited:* Level 15, 19 Victoria Street West, Auckland, New Zealand *Web:* http://smxemail.com [image: SMX | Cloud Email Hosting Security] This email has been filtered by SMX. For more information visit smxemail.com. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bd0b95d1-bf7d-4c2a-aab8-50cfbba97906%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Help with NTP module provided by puppetlabs
Thanks for the help :) On Tuesday, August 11, 2015 at 1:24:48 AM UTC+3, Richard Gray wrote: On 10/08/15 20:12, Martin Alfke wrote: You need to create a hiera.yaml config file. The config file may look like this: :backends: - yaml :yaml: :datadir: ‘/etc/puppet/data’ :hierachy: - “nodes/#{::certname}” - “location/#{::timezone}” - global Further to Martin's comment, you may be interested to know that the Foreman location and environment are available to Hiera, so you might prefer to use those rather than the timezone fact. E.g. :backends: - yaml :yaml: :datadir: ‘/etc/puppet/data’ :hierachy: - “nodes/#{::certname}” - “location/#{::location}” - global -- *Richard Gray* | Senior Operations Engineer *DDI:* +64 9 950 2196 *Fax:* +64 9 302 0518 *Mobile:* +64 21 050 8178 *Freephone:*0800 SMX SMX (769 769) *SMX Limited:* Level 15, 19 Victoria Street West, Auckland, New Zealand *Web:* http://smxemail.com [image: SMX | Cloud Email Hosting Security] This email has been filtered by SMX. For more information visit smxemail.com. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/862195dc-f316-42a1-a330-f55bf7fb5830%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Help with NTP module provided by puppetlabs
Hi Martin, Thanks for the help. I used the second approach. 1) I’ve created custom fact to identify the server location (I’m using the timezone fact) – Now I’m able to identify all my servers by location. 2) I’m not sure about the second part “put ntp::servers into the appropriate hiera data hierarchy” – I’m using Foreman and NOT Puppet enterprise if it matters. Can you elaborate more how to implement it right, maybe add some code if possible. Thanks, EddieM On Sunday, August 9, 2015 at 5:35:07 PM UTC+3, Martin Alfke wrote: Hi Eddie, On 09 Aug 2015, at 16:25, Eddie Mashayev eddi...@gmail.com javascript: wrote: Hi All, I have many servers spread in 3 different time zones USA (NY and San Francisco) and also in ISR. Have 3 NTP servers, one NTP server in each location. https://forge.puppetlabs.com/puppetlabs/ntp module is letting you to insert an array of NTP servers class { '::ntp': servers = [ 'ntp1.corp.com', 'ntp2.corp.com' ], } I can override this array but the problem is how to fit the correct NTP server to each server in the different location. In other words, how can I modified the puppet module to fit server to the correct NTP Server by locations. For example - I thought using the server prefix name to choose the right NTP server, for example if this server is located in NY so it prefix name is ny-{server name} so I can fit it to NY NTP server but it look like a headache to do it. Do you have any idea how can it be done in most efficient way with the NTP module provided by puppetlabs. Several solutions: 1. write wrapper module per data center: class ny_ntp { class { ‘::ntp’: server = [‘ny_ntp.corp.com’], } } class sf_ntp { class { ‘::ntp’: servers = [‘sf_ntp.corp.com’], } } class isr_ntp { class { ‘::ntp’: servers = [‘isr_ntp.corp.com’], } } use one of the the wrapper class within node classification 2. use hiera provide a custom fact to identify location per server and put ntp::servers into the appropriate hiera data hierarchy. Best, Martin Thanks, EddieM -- 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 javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8cdf1ae0-46c8-4de6-bb06-9f42bdbd31ed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d7398ad5-9b31-42e5-b3ee-d1eb889a8356%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Help with NTP module provided by puppetlabs
Hi All, I have many servers spread in 3 different time zones USA (NY and San Francisco) and also in ISR. Have 3 NTP servers, one NTP server in each location. https://forge.puppetlabs.com/puppetlabs/ntp module is letting you to insert an array of NTP servers class { '::ntp': servers = [ 'ntp1.corp.com', 'ntp2.corp.com' ], } I can override this array but the problem is how to fit the correct NTP server to each server in the different location. In other words, how can I modified the puppet module to fit server to the correct NTP Server by locations. For example - I thought using the server prefix name to choose the right NTP server, for example if this server is located in NY so it prefix name is *ny*-{server name} so I can fit it to NY NTP server but it look like a headache to do it. Do you have any idea how can it be done in most efficient way *with the NTP module provided by puppetlabs*. Thanks, EddieM -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8cdf1ae0-46c8-4de6-bb06-9f42bdbd31ed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Check service running with flag file
Hi, Found a solution: Create ruby script in: root@foreman]# cat /etc/puppet/environments/production/modules/customfacts/lib/facter/check_file_exsist.rb Facter.add('check_nails_exsist') do setcode do File.exists?('/etc/NONAILS') end end We are checking if /etc/NONAILS exist, if yes return true else false. Create puppet manifest to ensure the service running, if file exist stop the server: [root@foreman]# cat /etc/puppet/environments/production/modules/check_service/manifests/init.pp # Class: check_service class check_service { if $check_nails_exsist == 'true' { service { 'nails': ensure = stopped, enable = false, hasstatus = false, hasrestart = false, } } else { service { 'nails': ensure = running, enable = true, hasstatus = false, hasrestart = true, } } } Hope it helped. On Thursday, June 11, 2015 at 4:06:53 PM UTC+3, jcbollinger wrote: On Thursday, June 11, 2015 at 7:24:57 AM UTC-5, Eddie Mashayev wrote: Thanks, do you have any other suggestion how can I do it properly? I want “nails” process to be running only if there is no /etc/NONAILS flag in my OS. The canonical way to inform the catalog compiler about node state is via node facts. It should be pretty straightforward to create a custom fact that simply reports on the presence or absence of one file; then you put the Service resource in a conditional block that depends on the value of that fact. John -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/728e087f-16c5-4f95-8663-cd181b7dd7dc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Check service running with flag file
Thanks, do you have any other suggestion how can I do it properly? I want “nails” process to be running only if there is no /etc/NONAILS flag in my OS. On Thursday, June 11, 2015 at 1:01:55 PM UTC+3, Craig Dunn wrote: On reading this again, what you are trying to do won't work - you are requiring that the exec resource be satisfied before the service starts - if the exec resource doesn't run because onlyif returns false, this is normal behaviour and not a failure, therefore the resource is still satisfied and your service resource will be acted on. All you are doing is determining order. On Thu, Jun 11, 2015 at 11:55 AM, Craig Dunn cr...@craigdunn.org javascript: wrote: You haven't provided a command to run via the command attribute, so the provider will attempt to execute what you have in the resource title (checkForFile) - that is to say, it is trying to execute the command 'checkForFile', which of course, doesn't exist. As Denmat already pointed out, this may not be the best solution, but if you really want to stick with this approach then you need to specify a command - try adding command = '/bin/true' to the exec resource declaration to get around your current problem. Craig On Thu, Jun 11, 2015 at 8:13 AM, Eddie Mashayev eddi...@gmail.com javascript: wrote: Anyone?! On Wednesday, June 10, 2015 at 2:30:33 PM UTC+3, Eddie Mashayev wrote: Hi All, I want to check that my service nails running on all my servers only if file /etc/NONAILS not exists on this server. If it exists don’t start this process, this file works like a flag. I wrote script in puppet to check that and it works. Still it throes error when this file do exists: [root@test ~]# puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Loading facts Info: Caching catalog for test Info: Applying configuration version '1433921081' Error: Could not find command 'checkForFile' Error: /Stage[main]/Check_service/Exec[checkForFile]/returns: change from notrun to 0 failed: Could not find command 'checkForFile' Notice: /Stage[main]/Check_service/Service[nails]: Dependency Exec[checkForFile] has failures: true Warning: /Stage[main]/Check_service/Service[nails]: Skipping because of failed dependencies Question can I do it in cleaner way without throwing errors?? This is my script: class check_service { service { nails: ensure = running, enable = true, hasstatus = false, hasrestart = true, require = exec['checkForFile'], } exec {checkForFile: path = /usr/bin/, onlyif = test -e /etc/NONAILS, } } -- 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 javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6cc13de4-eeba-44d7-8bd6-15af22d775fc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Enviatics | Automation and configuration management http://www.enviatics.com | @Enviatics Puppet Training http://www.enviatics.com/training/ -- Enviatics | Automation and configuration management http://www.enviatics.com | @Enviatics Puppet Training http://www.enviatics.com/training/ -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a5de614f-bcfb-4217-9060-4539ddbe00fc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Check service running with flag file
Anyone?! On Wednesday, June 10, 2015 at 2:30:33 PM UTC+3, Eddie Mashayev wrote: Hi All, I want to check that my service nails running on all my servers only if file /etc/NONAILS *not exists* on this server. If it exists don’t start this process, this file works like a flag. I wrote script in puppet to check that and it works. Still it throes error when this file do exists: [root@test ~]# puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Loading facts Info: Caching catalog for test Info: Applying configuration version '1433921081' Error: Could not find command 'checkForFile' Error: /Stage[main]/Check_service/Exec[checkForFile]/returns: change from notrun to 0 failed: Could not find command 'checkForFile' Notice: /Stage[main]/Check_service/Service[nails]: Dependency Exec[checkForFile] has failures: true Warning: /Stage[main]/Check_service/Service[nails]: Skipping because of failed dependencies *Question can I do it in cleaner way without throwing errors??* This is my script: class check_service { service { nails: ensure = running, enable = true, hasstatus = false, hasrestart = true, require = exec['checkForFile'], } exec {checkForFile: path = /usr/bin/, onlyif = test -e /etc/NONAILS, } } -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6cc13de4-eeba-44d7-8bd6-15af22d775fc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Check service running with flag file
Hi All, I want to check that my service nails running on all my servers only if file /etc/NONAILS *not exists* on this server. If it exists don’t start this process, this file works like a flag. I wrote script in puppet to check that and it works. Still it throes error when this file do exists: [root@test ~]# puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Loading facts Info: Caching catalog for test Info: Applying configuration version '1433921081' Error: Could not find command 'checkForFile' Error: /Stage[main]/Check_service/Exec[checkForFile]/returns: change from notrun to 0 failed: Could not find command 'checkForFile' Notice: /Stage[main]/Check_service/Service[nails]: Dependency Exec[checkForFile] has failures: true Warning: /Stage[main]/Check_service/Service[nails]: Skipping because of failed dependencies *Question can I do it in cleaner way without throwing errors??* This is my script: class check_service { service { nails: ensure = running, enable = true, hasstatus = false, hasrestart = true, require = exec['checkForFile'], } exec {checkForFile: path = /usr/bin/, onlyif = test -e /etc/NONAILS, } } -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/76118486-250a-47c6-b93c-d3ffca5a480d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.