Ask Your Question
0

where do I put my role::profile::base module code?

asked 2014-02-04 11:57:06 -0500

Red Cricket gravatar image

updated 2014-02-04 13:16:11 -0500

Hi, I am trying to get my head around role and profiles. I have a node that I want to assign the role of red::profile::base so I assumed that I layout my puppet code file hierarchy like so:

[root@red-pe-master modules]# pwd
/etc/puppetlabs/puppet/modules
[root@red-pe-master modules]# find red
red
red/manifest
red/manifest/profile
red/manifest/profile/manifest
red/manifest/profile/manifest/base
red/manifest/profile/manifest/base/manifest
red/manifest/profile/manifest/base/manifest/init.pp
red/manifest/init.pp

But when I do my puppet apply --test on a agent I get error ... (more)

edit retag flag offensive close merge delete

Comments

it is manifests not manifest

Red Cricket gravatar imageRed Cricket ( 2014-02-04 16:00:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-02-04 12:27:59 -0500

ramindk gravatar image

updated 2014-02-04 15:23:23 -0500

You only need manifest once and init.pp in the top level of your module. http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html#example

modules/red/manifests/profile/base/stage.pp

class red::profile::base::stage { }
edit flag offensive delete link more

Comments

I have made the file layout changes but I still get the same error.

Red Cricket gravatar imageRed Cricket ( 2014-02-04 13:55:01 -0500 )edit

Doh! I am such a noob. it is manifests not manifest

Red Cricket gravatar imageRed Cricket ( 2014-02-04 14:17:05 -0500 )edit

heh, and I cut and pasted from your code. Fixed.

ramindk gravatar imageramindk ( 2014-02-04 15:23:41 -0500 )edit

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: 2014-02-04 11:57:06 -0500

Seen: 463 times

Last updated: Feb 04 '14