Puppet module dependencies

96 views
Skip to first unread message

DRivard

unread,
Sep 28, 2012, 11:02:25 AM9/28/12
to puppet...@googlegroups.com
Hi,

I am having difficulties understanding how to get 2 modules to install one after the other.
I have in total 3 modules:

    common  # contains everything common to the master and slave configuration
    slave   # contains what is specific to the slaves config
    master  # contains what is specific to the masters config

    node  'myslave1'
    {
      class {      
          "common":
              database => "192.168.1.10",
              before => Class["slave"];
      }
        
      class {
          "slave":
      }
    }
    
I am trying to tell the slave module to run after the common module is 
totally applied, but it doesn't work like I am expecting. In the common module
I set some repository and execute an update on the newly added repository.
But what happen is that, some slave package tries to get installed before
the common module complete the configuration of the repositories.

How can I achieve my goal?

Best,
Dominick

Tim Mooney

unread,
Sep 28, 2012, 1:02:49 PM9/28/12
to puppet...@googlegroups.com
In regard to: [Puppet Users] Puppet module dependencies, DRivard said (at...:
I'm going to guess that the issue is this

http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern

Pay particular attention to the paragraph between the first two code
blocks. That spells out why the 'before => Class["slave"]' that you're
using isn't doing what you want.

Tim
--
Tim Mooney Tim.M...@ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
Reply all
Reply to author
Forward
0 new messages