0% found this document useful (0 votes)
6 views2 pages

Puppet Variables

Uploaded by

Aditi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Puppet Variables

Uploaded by

Aditi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

VARIABLES IN MANIFESTS

DevOps Instructor-led Training


Contact us:
TOACCELERATEYOURCAREERGROWTH

For questions and more details:


+91 98712 72900
https://www.thecloudtrain.com

[email protected]
+91 98712 72900

USING VARIABLES IN MANIFESTS

Steps for Puppet Master

Step 1: Change the directory


to /etc/puppet/code/environments/production/manife
sts
cd /etc/puppetlabs/code/environments/production/manifests
sudo vim site.pp

Step 2: Enter the following text:


node default{
$text= "hello world\n"
file{'/tmp/helloworld.txt':
content => $text,
mode => '0644',
}
}
On Puppet Agent

Step 1: Execute the following command:


sudo /opt/puppetlabs/bin/puppet agent --test

Step 2: Verify the installation and file by going to


the browser, with agent's ip address. Also check
/tmp/hello.txt
cat /tmp/helloworld.txt

You might also like