Ask Your Question
0

Why the resource synchronization ordering doesn't work

asked 2014-01-07 03:13:40 -0500

jaksky gravatar image

updated 2014-01-07 03:20:29 -0500

Sorry for relatively silly question, I used the resource ordering with no problem before but in cannot find what's wrong here: I have several stuff I want to do: 1) manage /etc/hosts file 2) manage firewall settings 3) add our internal yum repository 4) ensure that elementary packages for our department are installed This all lies in module called 'base' In site.pp I have something like that

    node default {
  # This is where you can declare classes for all nodes.
  # Example:
  #   class { 'my_class': }
include base
}

In module base init.pp I have following content with appropriate ordering as ... (more)

edit retag flag offensive close merge delete

Comments

I am using virtual resources, not sure if there can be some effect

jaksky gravatar imagejaksky ( 2014-01-08 08:30:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-01-07 21:48:44 -0500

brenix gravatar image

There are different ways to approach this. Based on what you have, you could use the require function when including your internal_repository class:

class base {
   require internal_repository
   include firewall
   ...
 }

More explanation on the require function: http://docs.puppetlabs.com/puppet/latest/reference/lang_relationships.html#the-require-function

You could also use chaining arrows between your resources as a more complex way of achieving this: http://docs.puppetlabs.com/learning/ordering.html#chaining-arrows http://docs.puppetlabs.com/puppet/latest/reference/lang_relationships.html#chaining-arrows

Hope that helps!

edit flag offensive delete link more

Comments

To me it seems strange that ordering is not respected. Seems like all of sudden the ordering is not respected at all I need to pass parameters to classes so ...(more)

jaksky gravatar imagejaksky ( 2014-01-08 08:30:14 -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-01-07 03:13:40 -0500

Seen: 154 times

Last updated: Jan 07 '14