apprentice@puppet:~$ sudo mkdir modules/puppet_agent
apprentice@puppet:~$ sudo mkdir modules/puppet_agent/{files,templates,manifests}
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 | |
---|---|
Yes, that path is: 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
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/*'
apprentice@client:~$ sudo puppet agent --no-daemonize --verbose --waitforcert 10
(And see that /etc/puppet/puppet.conf
has changed.)