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