Cannot create simple file with puppet locally or at client node #62
-
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:
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:
Over on the puppet node, I ran the command:
And no file shows up in /tmp either. What is it I am doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You created a class, but you didn't apply/assign it to your node. file { '/tmp/foobar.txt':
ensure => file,
mode => '0644',
content => 'Hello World \n';
} |
Beta Was this translation helpful? Give feedback.
You created a class, but you didn't apply/assign it to your node.
puppet apply /etc/puppetlabs/code/environments/production/modules/helloworld/manifests/init.pp -e 'include helloworld'
should work. Or remove the class statement: