Ajeet Raina I am a Docker Captain, ARM Innovator & Docker Bangalore Community Leader. I am a maintainer of Collabnix blogging site. I work for Redis and a primary maintainer of https://developer.redis.com. I run Collabnix Community Slack with over 6500+ audience . We have built a popular projects like Docker Labs, KubeLabs, KubeTools and DockerTools. You can follow me on Twitter(@ajeetsraina) & GitHub(@ajeetraina)

Learn Puppet With Me – Day 1

52 sec read

Today is the day 1 of Learn Puppet with Me. I am starting this thread for those who want to learn Puppet smoothly.

Puppet is an Automation IT tool and I have already talked about its capabilities in my last post related to Puppet.

Puppet-in-bits

Let’s demystify the puppet fundamentals through this easy step.

Day 1: How to create a file with content “Hello, World” on puppet agent?

Say, I have a puppet master and agent ready. All I want is to create a file in puppet agent either running the command in puppet agent or directly fetching it from puppet master. Here we go –

Run the below commands on Puppetmaster Machine:

1. Create a directory called puppet:

#mkdir puppet

2. Change to puppet directory:

#cd puppet

3. Under it , create a subfolder called manifests:

#mkdir manifests

4. Create a file called site.pp under manifests:

#vi manifests/site.pp

import ‘nodes.pp’

5. Create a file called nodes.pp under manifest and add the following entries:

#vi manifests/nodes.pp

node’puppetagent1.cse.com’ {
file { ‘/tmp/hello’:
content => “hello, world\n”,
}
}

6. That’s all. Now test your manifests with the puppet apply command.

#puppet apply manifests/site.pp

OR

7. Run the following command on puppet agent:

# puppet agent -t

Verify if puppet created the file with the contents on the puppet agent machine.

It’s very simple way to create a file on puppet client through puppet master.

In next episode, we will talk about the Puppet Style and parameters.

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina I am a Docker Captain, ARM Innovator & Docker Bangalore Community Leader. I am a maintainer of Collabnix blogging site. I work for Redis and a primary maintainer of https://developer.redis.com. I run Collabnix Community Slack with over 6500+ audience . We have built a popular projects like Docker Labs, KubeLabs, KubeTools and DockerTools. You can follow me on Twitter(@ajeetsraina) & GitHub(@ajeetraina)

What is a Dockerfile – A Step-By-Step Guide

A Dockerfile is a text file which contains a series of commands or instructions. These instructions are executed in the order in which they...
Ajeet Raina
21 min read

Docker Desktop for Linux,  Docker Extensions and more with…

Docker Desktop 4.8.2 is now available for download for Mac, Windows and Linux. Here are the major highlights: Docker Desktop for various Linux distributions made available for the first...
Ajeet Raina
1 min read

One Reply to “Learn Puppet With Me – Day 1”

  1. “hi!,I like your writing so so much! share we keep in touch extra approximately your article on AOL? I need a specialist on this area to unravel my problem. Maybe that’s you! Having a look ahead to look you.”

Leave a Reply