Spread the love


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.


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


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.


Spread the love
Categories: Docker

Ajeet Raina

My name is Ajeet Singh Raina and I am an author of this blogging site. I am a Docker Captain, ARM Innovator & Docker Bangalore Community Leader. I bagged 2 special awards last year(2019): Firstly, “The Tip of Captain’s Hat Award” at Dockercon 2019, San Francisco, and secondly, “2019 Docker Community Award“. I run Collabnix Community Slack with over 5300+ audience . I have built popular GITHUB repositories like DockerLabs, KubeLabs, Kubetools, RedisPlanet Terraform etc. with the support of Collabnix Community. Currently working as Developer Relations Manager at Redis Labs where I help customers and community members adopt Redis. With over 12,000+ followers over LinkedIn & close to 5100+ twitter followers, I like sharing Docker and Kubernetes related content . You can follow me on Twitter(@ajeetsraina) & GitHub(@ajeetraina)

1 Comment

eebest8 · 9th December 2016 at 7:38 am

“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

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

Join Collabnix SlackIt's 100% FREE!

Get chance to chat with 5500+ DevOps Engineers !