This is an old revision of the document!


Determining Correct File Placement for Puppet

Some guides instruct the user to create a directory at /etc/puppet/manifests and to place .pp files in that directory. However, doing so results in a non-working puppet install since, by default, puppet has defined defaults.

The correct way is to determine the defaults and work with them. With Puppet installed, issue for instance:

puppet config print | grep manifest

and, at least on Debian, the output will be along the lines of:

default_manifest = ./manifests
disable_per_environment_manifest = false
genmanifest = false
manifest = /etc/puppet/code/environments/production/manifests
ordering = manifest

which means that .pp files should be placed in /etc/puppet/code/environments/production/manifests.

It is possible to edit /etc/puppet/puppet.conf and change the defaults, however doing so comes at the cost of maintainability as well as possible incompatibility with the distribution defaults.

Extremely Quick Setup Guide for a Master and an Agent

  • install Puppet using the distribution package manager
  • to set up a master:
    • edit /etc/puppet/puppet.conf and:
      • add server = myserver.tld to the [main] section (where myserver.tld represents the hostname of the current machine; of the master),
      • add dns_alt_names = myserver.tld to the [master] section (where myserver.tld represents the hostname of the current machine; of the master),
    • issue puppet config print | grep "^manifest =" in order to determine where the .pp files should go,
      • add files to the directory, for instance site.pp
    • issue puppet apply -t –verbose site.pp inside the manifest directory
  • to set up an agent:
    • edit /etc/puppet/puppet.conf and:
      • add server = myserver.tld to the [main] section (where, myserver.tld represents the hostname of the Puppet master),
    • issue puppet agent -t –verbose from anywhere to start provisioning the agent

fuss/puppet.1593145842.txt.gz · Last modified: 2020/06/26 04:30 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.