Puppet : Working with Puppet Forge to use pre-written community modules to configure Nginx Webserver

Share At:

In my previous article, titled,“Puppet : Writing Complex dynamic “Motd” module using facts” , I wrote about how to write complex “motd” module to display motd when someone login to any server in the environment.

In this article, we are going to see how to use “Puppet Forge” to Download and use pre-written community modules.

We will see how can we can download and use “nginx” module and configure nginx on Puppet-Client .

Please follow below steps in sequence:

  1. Visit “https://forge.puppet.com/” and search for module called “nginx”.

2. Now Login to Puppet Master server and run below command to download “nginx” module:

puppet module install puppet-nginx

Note : Here Puppet refers to the user who owns the module on Puppet-Forge website and nginx is the actual module name.

3. Now go to “/etc/puppetlabs/code/environments/production/modules” directory , you will see nginx module downloaded there:

4. Now go to “/etc/puppetlabs/code/environments/production/manifests” directory and modify site.pp to look like below.

5. Now run below command to validate if there’s syntax error in site.pp:

puppet parser validate site.pp

6. Now login to Puppet-client and run below command:

puppet agent -t

7. Now Validate if Nginx has been installed and if the Nginx services are up and running on puppet-client.

8. Now go to your web browser and type the ip of the puppet-client. You will see the Nginx web server up and running.

That’s It. We are done !!

Happy Learning !!!


Share At:
0 0 votes
Article Rating
Subscribe
Notify of
guest
4 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
binance sign up
13 days ago

I don’t think the title of your enticle matches the content lol. Just kidding, mainly because I had some doubts after reading the enticle. https://www.binance.com/en/register?ref=P9L9FQKY

gateio
14 days ago

I have read your article carefully and I agree with you very much. This has provided a great help for my thesis writing, and I will seriously improve it. However, I don’t know much about a certain place. Can you help me? https://www.gate.io/vi/signup/XwNAU

binance referral bonus

Your point of view caught my eye and was very interesting. Thanks. I have a question for you.

Зарегистрируйтесь и получите 100 USDT

Your point of view caught my eye and was very interesting. Thanks. I have a question for you.

Back To Top

Contact Us