Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

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 Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

2 Replies 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.”

  2. You actually make it seem so easy with your presentation but I find this matter to be really something that I think I would never understand. It seems too complex and extremely large for me. I am taking a look forward to your next post, I will attempt to get the cling of it!

Leave a Reply

Your email address will not be published.