As part of the Puppet installation, the Puppet SMF service is installed on both the Puppet master and the nodes that the will run the Puppet agent. This SMF service has two instances: svc:/application/puppet:master, which is for the Puppet master, and svc:/application/puppet:agent, which is for the Puppet agent. Having Puppet managed through SMF enables you to take advantage of a layered configuration, which helps preserve your configuration during system updates.
By default, both of the Puppet SMF service instances are disabled, as shown in the following output:
# svcs -a | grep puppet disabled Feb_18 svc:/application/puppet:agent disabled Feb_18 svc:/application/puppet:master
The initial Puppet configuration file (etc/puppet/puppet.conf) is generated by using an SMF stencil, which ensures that any configuration that is stored in the SMF repository correctly maps to the configuration that is stored in the Puppet configuration file.
Puppet reads configuration information from the /etc/puppet/puppet.conf file rather than from the properties that are set in the application/puppet service instances. To provide the required configuration file, each puppet instance provides a stencil file and a configfile property group. The configfile property group instructs the svcio utility to run and to create the specified configuration file. The stencil file is then used to write data from service property values to the configuration using the correct format. For more information about stencils, see Chapter 6, Using a Stencil to Create a Configuration File in Developing System Services in Oracle Solaris 11.3.
The following example shows all of the puppet service properties that are included in the configfile property group:
# svcprop -g configfile puppet svc:/application/puppet:master/:properties/puppet_stencil/mode astring 0444 svc:/application/puppet:master/:properties/puppet_stencil/path astring /etc/puppet/puppet.conf svc:/application/puppet:master/:properties/puppet_stencil/stencil astring puppet.stencil svc:/application/puppet:agent/:properties/puppet_stencil/mode astring 0444 svc:/application/puppet:agent/:properties/puppet_stencil/path astring /etc/puppet/puppet.conf svc:/application/puppet:agent/:properties/puppet_stencil/stencil astring puppet.stencil
In the previous output, both instances of the puppet service have the same configfile properties with the same values. Each puppet service instance provides the path to the configuration file, the mode of the configuration file, and the path to the stencil file.
The following example shows that these instance properties are inherited from the parent service:
# svccfg -s puppet listprop -l all puppet_stencil puppet_stencil configfile manifest puppet_stencil/mode astring manifest 0444 puppet_stencil/path astring manifest /etc/puppet/puppet.conf puppet_stencil/stencil astring manifest puppet.stencil
When making configuration changes to the puppet.conf file, do not manually edit the file. Instead, use SMF commands, as shown in the following example:
# svccfg -s puppet:agent svc:/application/puppet:agent> setprop config/report=true svc:/application/puppet:agent> setprop config/pluginsync=true svc:/application/puppet:agent> refresh svc:/application/puppet:agent> exit
Any changes that you make by using SMF commands are automatically reflected in the puppet.conf file when you restart the Puppet agent service instance:
# svcadm restart puppet:agent # cat /etc/puppet/puppet.conf # WARNING: THIS FILE GENERATED FROM SMF DATA. # DO NOT EDIT THIS FILE. EDITS WILL BE LOST. # # See puppet.conf(5) and http://docs.puppetlabs.com/guides/configuring.html # for details. [agent] logdest = /var/log/puppet/puppet-agent.log pluginsync = true report = true
For a complete list of all of the configuration settings that apply to the puppet.conf file, see Configuration: How Puppet is Configured.