I installed puppet 5 on master and server and setup/signed certificate from agent...now i wanted to try a simple agent run...
i followed the puppet official docs which test Hiera 5 as well (link below): https://docs.puppet.com/puppet/5.0/hiera_quick.html
But the agent never applies the changes when i run:
# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for xxxxxx.xxx.xxx
Info: Applying configuration version '1504530655'
Notice: Applied catalog in 0.04 seconds
on the master when i run puppet apply /[manifest-location]/manifest.pp it works fine.
my master puppet.conf:
[main]
server = puppet-master-test.xxx.xxx
dns_alt_names = puppet-master-test.xxx.xxxx
certificate_revocation = false
modulepath = /etc/puppetlabs/code/environments/production/modules
[master]
certname = puppet-master-test.xxx.xxx
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
environment_timeout = unlimited
Agent's puppet.conf:
[main]
server = puppet-master-test.xxx.xxx
[master]
certname = puppet-master-test.xxx.xxx
[agent]
environment = production
certname = puppet-client.xxx.xxx
server = puppet-master-test.xxx.xxx
can someone advise on this? Thanks in advance.
EDIT:
i created a simple module:
#/etc/puppetlabs/code/environments/production/modules/profile/manifests/hiera_test.pp
class profile::test {
file { '/tmp/hiera_test.txt':
ensure => file,
owner => root,
mode => '0755',
}
}
init.pp:
#/etc/puppetlabs/code/environments/production/modules/profile/manifests/init.pp
include profile::test
i have a site.pp under: /etc/puppetlabs/code/environments/production/manifests/site.pp
node 'puppet-client.xxx.xxx' {
include profile
}
output of:
#puppet config print modulepath --section master --environment production
/etc/puppetlabs/code/environments/production/modules
#puppet config print manifest --section master --environment production
/etc/puppetlabs/code/environments/production/manifests/site.pp
On the master when i use:
#puppet apply /etc/puppetlabs/code/environments/production/modules/profile/manifests/init.pp
Notice: Compiled catalog for puppet-master-test.xxx.xxx in environment production in 0.07 seconds
Notice: /Stage[main]/Profile::Test/File[/tmp/hiera_test.txt]/ensure: created
Notice: Applied catalog in 0.11 seconds
but, puppet agent -t on agent doestn't create the file under /tmp.../tmp permissions are 1777, can you let me know if you need more info?
Thanks.