Ask Your Question

role/profile ordering

asked 2014-04-02 07:40:24 -0600

kariboe gravatar image

updated 2014-04-02 07:43:08 -0600

Currently trying to setup a roles/profile/hiera infrastructure, but I keep having issues with the ordering of my modules.

class roles::pixar {

    include profiles::base
    include profiles::web
    Class['profiles::base'] -> Class['profiles::web']

And in my profiles::base class I do the following:

class profiles::base {
notify {"Applying profiles::base": }

# Operating system configuration & additional packages
class {"::profiles::base::repos":}
class {"::profiles::base::packages":}
class {"::profiles::base::welcome":}
class {"::profiles::base::ntp":}
class {"::profiles::base::services":}

Class['profiles::base::repos'] -> Class['profiles::base::packages'] 
 -> Class['profiles::base::welcome'] -> Class['profiles::base::ntp'] 
 -> Class['profiles::base::services']


And the last ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-02 07:54:25 -0600

The way that you are using is wrong. The puppetlabs make a post in they blog with why this is wrong. I recommend to read:

If you're using Puppet Enterprise 3.2.0 (or POSS 3.4.0) or later, you're in luck! As of 3.2.0, we've implemented the contain function.

class roles::pixar {

    contain profiles::base
    contain profiles::web
    Class['profiles::base'] -> Class['profiles::web']

you will need to change your class profiles::base either to use contain instead declare a class.

notify {"Applying profiles::base": }

# Operating system configuration ...
edit flag offensive delete link more


Thanks for pointing to that blog. I will try it right away and let you know.

kariboe gravatar imagekariboe ( 2014-04-02 08:16:25 -0600 )edit

Renan, works like a charm now! Thank you very much!

kariboe gravatar imagekariboe ( 2014-04-02 08:35:39 -0600 )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


Asked: 2014-04-02 07:40:24 -0600

Seen: 1,877 times

Last updated: Apr 02 '14