Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
sudo vi /etc/puppetlabs/puppet/puppet.conf


[main]
certname = puppetagent3puppetagent
server = 192.168.237.130
environment = production
runinterval = 20m

Start the Puppet Agent

Code Block
languagebash
sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true


Notice: /Service[puppet]/ensure: ensure changed 'stopped' to 'running'
service { 'puppet':
  ensure => 'running',
  enable => 'true',
}

Checking if the Puppet Agent CSR Reached the Puppet Master Server

On the Puppet Master server run this command to check if it has received the puppet agent CSR.

Code Block
languagebash
setupadmin@bbsvc1:~$ sudo /opt/puppetlabs/bin/puppet cert list

  "puppetagent" (SHA256) 52:3A:3A:13:EC:0C:1F:7D:EE:81:32:94:20:8F:DB:C8:9C:31:03:25:E2:A0:A6:8A:AE:DF:05:79:CC:7C:35:96

Now that you have confirmed the certificate sign it to connect the node.

Code Block
languagebash
sudo /opt/puppetlabs/bin/puppet cert sign puppetagent


Signing Certificate Request for:
  "puppetagent" (SHA256) 52:3A:3A:13:EC:0C:1F:7D:EE:81:32:94:20:8F:DB:C8:9C:31:03:25:E2:A0:A6:8A:AE:DF:05:79:CC:7C:35:96
Notice: Signed certificate request for puppetagent
Notice: Removing file Puppet::SSL::CertificateRequest puppetagent at '/etc/puppetlabs/puppet/ssl/ca/requests/puppetagent.pem'

To check all certificates signed with the Puppet Master.

Code Block
languagebash
sudo /opt/puppetlabs/bin/puppet cert list --all


+ "192.168.237.130" (SHA256) F0:98:99:57:FA:C3:91:19:D4:7C:DA:20:7C:B6:78:FD:87:FA:44:0D:B0:F4:A1:4C:20:2A:BB:56:4F:09:DB:BF (alt names: "DNS:192.168.237.130", "DNS:hostname", "DNS:192.168.237.130")
+ "puppetagent"    (SHA256) ED:5C:43:36:69:6C:9F:9C:15:44:40:93:0D:3C:C4:64:7F:3D:78:CF:90:B0:2D:0B:AB:D1:6F:54:E5:34:EC:DA


How to Execute Puppet Scripts

...