Puppet resource
Versions of Puppet from 2.6 and later (the current release is 3.6) use the single binary puppet with subcommands for specific tasks. The earlier version had separate binaries for all of the subcommands. In the previous set of commands, we used the traditional CentOS syntax to start the Puppet master and then to enable the service for autostart; we could achieve the same result using the /usr/bin/puppet
command along with the resource
subcommand:
# puppet resource Service puppetmaster enable=true ensure=running
With this command, we direct our attention to the puppetmaster
service, enable it for autostart (enable=true
), and start it if required (ensure=running
). This represents the very essence of how Puppet works. Of course, to manage many clients, we will create manifest files with similar resource rules to enforce the desired state. In itself though, we will configure the desired state of the node with the use of the puppet resource
command.
Along with setting the desired...