Puppet manifest not pulling
Continued from the previous post. As I am making full use of my 30-days free account in Azure, I have setup a pair of Puppet servers to test (with respect to the reference article at the bottom).
A problem
In the Puppet master, I have:
/etc/puppet/manifests/site.ppwith content
file {'/tmp/example-ip': # resource type file and filename
ensure => present, # make sure it exists
mode => '0644', # file permissions
content => "Here is my Public IP Address: ${ipaddress_eth0}.\n", # note the ipaddress_eth0 fact
}In the Puppet agent, after running ‘puppet agent -t’, it did not pull down the file (/tmp/example-ip) as expected. It worked when directly applying the same manifest in the agent directly (puppet apply site.pp). And I have confirmed it is not a certificate issue.
Troubleshooting
In the Puppet master, I have checked the configurations:
puppet config print > my_puppet_confIn my_puppet_conf, I confirmed these variables were set as expected:
confdir = /etc/puppet
default_manifest = ./manifestsI noticed another default value might be off:
manifest = no_manifestI’m not sure what it meant by ‘no manifest’. I could not find the relevant doc for this setting yet.
Anyway, the following default variables were directly related to my ‘problem’:
environment = production
environmentpath = /etc/puppet/code/environmentsi.e. instead of
/etc/puppet/manifests/site.ppIt needs to be:
/etc/puppet/code/environments/production/manifests/site.pp