I have Puppet v8.5.1 running on Ubuntu 22.04. I have a puppetmaster and puppet agent node communicating with each other. Now I created a simple "helloworld" under the production modules path (/etc/puppetlabs/code/environments/production/modules/helloworld/) and a manifests directory as well. Inside said manifests directory, I have this simple init.pp file:
class helloworld { file { '/tmp/foobar.txt': ensure => file, mode => '0644', content => 'Hello World \n'; }}
Now when I attempt to run the following "puppet apply" command from the puppetmaster, it shows only the following and there is no file being created in the /tmp folder:
root@sandbox-puppetmaster:~# puppet apply /etc/puppetlabs/code/environments/production/modules/helloworld/manifests/init.ppNotice: Compiled catalog for sandbox-puppetmaster.ddc.local in environment production in 0.02 secondsNotice: Applied catalog in 0.01 seconds
Over on the puppet node, I ran the command:
root@sandbox-node1:/tmp# puppet agent --testInfo: Using environment 'production'Info: Retrieving pluginfactsInfo: Retrieving pluginNotice: Requesting catalog from sandbox-puppetmaster.ddc.local:8140 (10.20.27.7)Notice: Catalog compiled by sandbox-puppetmaster.ddc.localInfo: Caching catalog for sandbox-node1Info: Applying configuration version '1709918930'Notice: Applied catalog in 0.01 seconds
And no file shows up in /tmp either.
What is it I am doing wrong?
It should be putting a simple file called "foobar.txt" in the /tmp directory.