I have a very basic question regarding to Puppet 3.0.1 configuration.
I setup a puppet master server (CentOS) with 2 agents (CentOS and Windows 7), all 3 can ping and access each other. There is no error at all.
I have copied a file under /etc/puppet/files/test2.txt
my /etc/puppet/manifests/site.pp
contains these lines:
node default {
file { "/tmp/testmaster.txt":
owner => root,
group => root,
mode => 644,
source => "puppet:///files/test2.txt"
}
}
but there will no file be created on agent servers under /tmp/
once I run puppet agent --test
here is the output:
[root@agent1 ~]# puppet agent --test
Info: Retrieving plugin
Info: Caching catalog for agent1.mydomain.com
Info: Applying configuration version '1354267916'
Finished catalog run in 0.02 seconds
puppet apply /etc/puppet/manifests/site.pp
creates the testmaster.txt
under /tmp/
on master.
ensure => present
in thefile
definition.puppet master --no-daemonize --debug
and see what's going on there./var/lib/puppet/state/classes.txt /var/lib/puppet/state/resources.txt
? I would suggest just having one line likenode default { include myclass }
Usepuppet module generate myclass
to create the class directory structure. Then move thefile
section in theinit.pp
file which the generate command just created. Alternatively, you can have one line in the node section like above, but create the class inside site.pp, like shown here: debian-administration.org/articles/526