On Wednesday, August 15, 2012 11:41:34 AM UTC-5, Douglas wrote:
>
> On Wed, Aug 15, 2012 at 7:38 AM, jcbollinger 
> <john.bo...@stjude.org<javascript:>> 
> wrote: 
> > I agree that the problem seems general.  Does it not work to put your 
> > Apt::Source resources into their own classes, and assign those classes 
> to 
> > your initial stage?  That seems the natural solution. 
>
> Not really. The setup of base apt sources is handled during one of the 
> initial run stages. However, additional repo's are added later as the 
> function of the server is further refined. 
>
>
I seem to be missing something here.  Perhaps there is a subtlety that I do 
not appreciate, on account of my intentional avoidance of run stages in my 
own manifests.  Based on the nature of the relationships you are trying to 
set up (with all the apt sources applied before any packages) I infer that 
"later" refers to parse order, but what does that have to do with which 
stages your classes are assigned to?

Here is an example of what I would expect to work, where "work" in this 
case means that on node 'myserver', class 'role42' is assigned to stage 
'main', whereas class 'role42::apt' that it declares is assigned to stage 
'apt-config':


stage { 'apt-config': before => Stage['main'] }

node myserver {
  class { 'role42': stage => 'main' }
}

class role42 {
  class { 'role42::apt'
    stage => 'apt-config'
  }
}

class role42::apt {
  apt::source { 'role42-source':
    # ...
  }
}


In other words, you should at any point in your manifest, from a class 
assigned to any stage, be able to declare a class into whatever stage you 
want (provided it has not already been declared elsewhere, of course).  Or 
that's my expectation, anyway.  Does it not actually work?


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ly2_o0dt3FkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to