Do something to the client

  1. Create a module puppet_agent

    Edit /etc/puppet/modules/puppet_agent/manifests/init.pp:

    class puppet_agent {
    file { "/etc/puppet/puppet.conf":
    owner  => root, group  => root, mode => 0644,
    #content => template("${module_name}/puppet.conf.erb"),                                                                                                            
    source  => "puppet:///modules/${module_name}/puppet.conf"
    }
    }
    	  

    [Warning]Warning

    Yes, that path is: puppet:///modules/${module_name}/puppet.conf. The triple slash expands to the server name. And don't be tempted to put ${module_name}/files/puppet.conf in there. The file/ is in the path to the file in the filesystem of the server, but it is not in the path when being accessed through the Puppet protocol.

    So far for configuration logic.

    ... and /srv/puppet/envs/production/modules/puppet_agent/files/puppet.conf:

    # WARNING: This file maintained by Puppet.
    # Editing is no use unless you avoid running the Puppet agent
    [main]
    server=puppet.servers.mydomain.com
    report = false
    splay = true
    	  

  2. Tell the master which clients to serve this config to

    Edit /srv/puppet/envs/production/manifests/nodes/nodes.pp:

    class base {
    include puppet_agent
    }
    node 'client.clients.mydomain.com' {
    include puppet_agent
    }
    	  

    ... and /srv/puppet/envs/production/manifests/site.pp:

    $puppetserver = 'puppet.servers.mydomain.com'
    import 'nodes/*'
    	  

  3. Run Puppet on the Client

    (And see that /etc/puppet/puppet.conf has changed.)