Puppet Quickstart – Part 1

Checking if puppet service is running

service --status-all | grep -i puppet

What if you get an output which shows that two services are running with same name like below:

Puppet Service

Most probably that box is running both puppet master and slave, to verify it you can query the processes like below:

ps aux | grep -i puppet

Display information

facter              # All system facts
facter -p           # All system and Puppet facts
facter -y	        # YAML
facter -j	        # JSON

facter [-p] <name>  # A specific fact

# Examples
facter memoryfree
facter is_virtual processor0

To validate any puppet manifest:

  • puppet parser validate <manifest>

Enable / disable puppet agent

puppet agent --disable
puppet agent --enable

Create file content, save in site.pp

file { '/tmp/dafile':
  content => "datext\n",

for multiple nodes you can save the same in node.pp and add 'import node.pp' in site.pp

node 'nodeName' {
file { '/tmp/dafile':
  content => "datext\n",

Ensure specific version

package { 'httpd':
ensure => '2.4-httpd',

delete  packages

package { 'php-common':
ensure => absent,

Updating packages

package { 'httpd':
ensure => latest,






Subscribe to
for video tutorials updates

Leave a Reply

Your email address will not be published. Required fields are marked *