Once you understand how to write manifests, validate them,
puppet apply to enforce your
changes, you're ready to use commands such as
puppet resource, and
agent command line tool applies configuration changes to a system.
puppet agent retrieves
compiled catalogs from a Puppet Server, and applies them to
the local system. Puppet is installed as a Windows service, and by default tries to contact the
master every 30 minutes by running
agent to retrieve new catalogs and apply them locally.
puppet resourceto query the state of a particular type of resource on the system. For example, to list all of the users on a system, run the command
puppet resource user.
The computer used for this example has three local user accounts: Administrator, Guest, and vagrant. Note that the output is the same format as a manifest, and you can copy and paste it directly into a manifest.
puppet module install
Puppet includes many core resource types, plus you can extend Puppet by installing modules. Modules contain additional resource definitions and the code necessary to modify a system to create, read, modify, or delete those resources. The Puppet Forge contains modules developed by Puppet and community members available for anyone to use.
Puppet synchronizes modules from a master to agent
puppet agent runs.
Alternatively, you can use the standalone Puppet
module tool, included when you install Puppet, to
manage, view, and test modules.
puppet module list to show the list of modules
installed on the system.
To install modules, the Puppet module tool uses the syntax
puppet module install NAMESPACE/MODULENAME. The
NAMESPACE is registered to a
MODULE refers to the
specific module name. A very common module to install on Windows is
registry, under the
puppetlabs namespace. So, to install the
registry module, run
puppet module install puppetlabs/registry.