Search code examples
puppetpuppet-enterprise

Disable Puppet agent runinterval


I am using the following Puppet version on CentOS Linux release 7.2:

# puppetserver -v
puppetserver version: 2016.5.0.11

I have a Win agent node and i might have few more later. Agent version on Win node:

C:\Windows\system32>puppet --version
4.8.1

I would like to disable the agent runinterval permanently so i can only push from my Puppet server when required. I saw few links and tried putting the following line in Puppet server's /etc/puppetlabs/puppet/puppet.conf file. I also restarted the server but still the agent is fetching the catalog.

[agent]
daemonize=false

I would also like to know whether it's possible to disable runinterval only on specific nodes. If yes, how?


Solution

  • What you are basically looking at doing is stopping the Puppet service. This is accomplished most easily with a puppet service resource:

    service { 'puppet':
      ensure => stopped,
      enable => false,
    }
    

    To do this only on certain nodes, merely supply it for the corresponding node definitions in your classifier or main site manifest:

    node /ones_to_disable/ {
      service { 'puppet':
        ensure => stopped,
        enable => false,
      }
    }
    

    This is the easy and common method for accomplishing push-style Puppet and disabling pull-style.