5.2. Applying Configuration to Existing Clients

You might aim to have Puppet configuration applied to an existing client not provisioned through Red Hat Satellite 6. In this situation, install and configure Puppet on the existing client after registering it to Red Hat Satellite 6.
Register your existing system to Red Hat Satellite 6. For information on registering existing hosts, see 12.3.1. Registering a Host in the Red Hat Satellite 6.1 User Guide.

Important

The puppet package is part of the Red Hat Satellite 6 Tools repository. Ensure you enable this repository before you proceed.

Procedure 5.2. To Install and Enable the Puppet Agent:

  1. Open a terminal console and log in as root.
  2. Install the Puppet agent:
    # yum install puppet
    
  3. Configure the puppet agent to start at boot:
    • On Red Hat Enterprise Linux 6:
      # chkconfig puppet on
    • On Red Hat Enterprise Linux 7:
      # systemctl enable puppet

Procedure 5.3. Configuring the Puppet Agent

  1. Configure the Puppet agent by changing the /etc/puppet/puppet.conf file:
    # vi /etc/puppet/puppet.conf
    
    [main]
        # The Puppet log directory.
        # The default value is '$vardir/log'.
        logdir = /var/log/puppet
    
        # Where Puppet PID files are kept.
        # The default value is '$vardir/run'.
        rundir = /var/run/puppet
    
        # Where SSL certificates are kept.
        # The default value is '$confdir/ssl'.
        ssldir = $vardir/ssl
    
    [agent]
        # The file in which puppetd stores a list of the classes
        # associated with the retrieved configuratiion.  Can be loaded in
        # the separate ``puppet`` executable using the ``--loadclasses``
        # option.
        # The default value is '$confdir/classes.txt'.
        classfile = $vardir/classes.txt
        pluginsync = true
        report = true
        ignoreschedules = true
        daemon = false
        ca_server = satellite.example.com
        server = satellite.example.com
        environment = KT_Example_Org_Library_RHEL6Server_3
    
        # Where puppetd caches the local configuration.  An
        # extension indicating the cache format is added automatically.
        # The default value is '$confdir/localconfig'.
        localconfig = $vardir/localconfig
    

    Important

    Set the environment parameter to the host's Puppet environment from the Satellite server. The Puppet environment label contains the organization label, lifecycle environment, content view name, and the content view ID. To see a list of Puppet environments in the Satellite 6 web UI, navigate to ConfigureEnvironments.
  2. Run the Puppet agent on the host:
    # puppet agent -t --server satellite.example.com
  3. Sign the SSL certificate for the puppet client through the Satellite Server web interface:
    1. Log in to the Satellite Server through the web interface.
    2. Select InfrastructureCapsules.
    3. Click Certificates to the right of the required host.
    4. Click Sign.
    5. Rerun the puppet agent command:
      # puppet agent -t --server satellite.example.com

Note

When the Puppet agent is configured on the host it will be listed under All Hosts but only when Any Context is selected as the host will not be assigned to an organization or location.