Watch all our Tutorials and Training Videos for Free on our Youtube Channel, Get Online Web Tools for Free on swebtools.com

Search Suggest

Install Puppet Modules from forge - Puppet tutorials

install puppet modules from forge, install puppet modules online, install puppet modules offline, puppet tutorials, puppet modules installation
In this article, we will describe you how to download and install puppet modules to deploy for all our puppet agent nodes using puppet automation.

Also refer the other puppet related articles which are very essential to understand the puppet from the beginning.,

What is puppet, how puppet works?
How to Install Puppet Master and Puppet Agents?
Understand the basics of puppet manifests files with examples
Understand the Basics of puppet Modules
Install Puppet Modules Online and Offline

Install Puppet Modules from forge - Puppet tutorials

Lets take an example to deploy "vim" packages on all our puppet agent nodes using puppet automation.

Install Puppet Modules from forge - Puppet tutorials


These can be done in two ways,
Method 1 : Downloading the Puppet modules manually from forge website using the browser.
Method 2 : Download and Install the Puppet modules using the puppet module tool.

ALSO WATCH THIS PUPPET MODULES INSTALLATION TUTORIAL VIDEO FREE ON OUR YOUTUBE CHANNEL

Method 1 : Download and Install the modules manually from forge website using the browser.

Open the browser and enter the url https://forge.puppet.com/ as image shows below.

download pre-existing puppet modules from forge website

Enter the puppet module name “vim” at the search box and hit Enter.

search for a puppet modules online

You will get more relevant matching modules. Click the appropriate one as you preferred.

find the relevant matching puppet modules

Note : Read the descriptions and compatibility carefully about the modules.

Click “download latest.tar.gz” available and get the module in tarball (dhoppe-vim-1.4.0.tar.gz).

How to download a Puppet modules from puppet forge website

Copy our downloaded puppet modules to the puppet master server.

How to install the puppet modules from a downloaded tarball?

Login into the puppet master server and execute the below command tool to install a module from a tarball. Assume that, you have saved our tarball "dhoppe-vim-1.4.0.tar.gz" on the folder /root/.

[root @puppet-master ~] # puppet module install /root/dhoppe-vim-1.4.0.tar.gz

Note : If you get any error related to dependencies, use the flag --ignore-dependencies along with the command as below and install the dependencies manually later.

[root @puppet-master ~] # puppet module install /root/dhoppe-vim-1.4.0.tar.gz --ignore-dependencies

How to use the installed puppet modules to deploy on puppet agent nodes.

Edit the puppet manifest file site.pp

[root @puppet-master ~] # /etc/puppet/manifests/site.pp

As discussed in the previous articles, a node statement "node default" allows us to deploy the "vim" package to all our puppet agent nodes. Include the class statement as below,

node default {
class { 'vim': }
}

Save and exit the file.

If you would like to deploy only on the particular puppet agent nodes. Define the node name as below.

node "puppet-agent" {
class { 'vim': }
}

Verifying the status at the puppet agent nodes.

Now go to the puppet agent node “puppet-agent” and run the below command manually to override the default refresh interval or just wait for the interval to fetch the manifest file for changes.

[root @puppet-agent ~]# puppet agent --test

Once the changes are applied, verify the "vim" package is installed or not using the below command.

[root @puppet-agent ~]# rpm -q vim

Method 2 : Search and Install the modules online.

Login into the puppet master server and execute the below command tool to search first and install a module from internet.

[root @puppet-master ~] # puppet module search nano

You will get an output for the search you have done. From the example i am going to install the module "cornfeedhobo-nano".

[root @puppet-master ~] # puppet module install cornfeedhobo-nano

Thats all about how to install the puppet modules offline and online and how to use the pre-existing puppet modules to manage our infrastructure servers.
Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.