Ask Your Question
0

use only init.pp in puppet server

asked 2016-02-17 06:51:30 -0500

adiabr gravatar image

Hi,

Why do I need to include in the manifests two pp files : init.pp and other pp file in puppet server? I take all the commands from the other pp.file and insert them to init.pp and the client agents works fine.

Thank you in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-02-17 07:29:37 -0500

rajeevsharma gravatar image

updated 2016-02-17 07:30:01 -0500

Hi adiabr,

In addition to init.pp in your module, it's not mandatory to have other pp files. You can write your whole code in your init.pp file itself or you can have other pp file which could be included or inherited in your init.pp file.

init.pp file is the primary file puppet looks for and must have a class having same name as your module. I have two modules which is working fine with single init.pp and other pp files in addition to init.pp

[root@puppetserver environments]# ls testing/modules/tomcat/manifests
calendarapp.pp  cluster.pp  init.pp   params.pp  sampleapp.pp  setenv.pp
[root@puppetserver environments]# ls production/modules/envmodule/manifests/
init.pp
[root@puppetserver environments]#

You can find the details in here too: https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html

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

Question Tools

1 follower

Stats

Asked: 2016-02-17 06:51:30 -0500

Seen: 106 times

Last updated: Feb 17 '16