Ask Your Question

How to add new module in PUPPET

asked 2015-06-24 03:43:25 -0600

sujaykumar gravatar image

How to integrate user defined module into puppet server. What are the files need to be modified. And how can i install these modules into puppet client. i am not using enterprise edition of puppet.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2015-06-24 11:00:04 -0600

lnxsck gravatar image

You must create the module directory structure in the pre-defined module directory of puppet.conf.

For example, let's say we want to pass a host file to the servers.

 mkdir –p /etc/puppet/environments/production/modules/my_hosts/files
 mkdir –p /etc/puppet/environments/production/modules/my_hosts/manifests

manifests - holds init.pp and any other configuration. init.pp - is the core of the module files - holds any files we wish to serve as part of our module templates - contains any templates our module might use

 vi /etc/puppet/environments/production/modules/my_hosts/manifests/my_hosts.pp
class my_hosts {

    file { 'hosts':
    owner => 'root',
    group => 'root',
    mode => '0440',
    path => '/etc/hosts',
    ensure => file,
    source => 'puppet://environments/production/modules/my_hosts/files/hosts'


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-06-24 03:43:25 -0600

Seen: 89 times

Last updated: Jun 24 '15