← TUTORIAL
#linux#puppet

Connecting nodes to a environment

updated 04 October 2015

Run the Puppet agent with --environment development to connect a node to a non-default environment.

Request a certificate

Run the agent with the environment flag:

The master denied the certificate, but the request confirms the flag works.

Sign the certificate

On the Puppet master, list pending requests filtered to the test server:

puppet cert --list | grep test.kirk.local

Sign the certificate:

Provision the node

Run the agent with --noop for a dry run:

puppet agent -t --noop --environment development

The test manifest at /etc/puppet/environments/development/manifests/site.pp:

node 'test.kirk.local' {
  package { 'ntp':
    ensure => present,
  }
}

The manifest installs ntp. Include --environment development in every agent run to keep the node in that environment.