To the best of my knowledge, it is resources that can be applied in any order, 
not scoped variables.

Your puppet agent will create these files in any order, given that the file 
resources have no require/before dependencies:

node myserver {
  file { '/tmp/1':
    content => "123\n",
  }
  file { '/tmp/2':
    content => "456\n",
  }
}

But here, no file will contain the string "what":

node myserver {
  file { '/tmp/1':
    content => "${what}123\n",
  }
  file { '/tmp/2':
    content => "${what}456\n",
  }
  $var = 'what'
}

On Mon, Nov 05, 2012 at 12:06:08PM -0800, Jist Anidiot wrote:
>    So I thought puppet didn't care about the order of things unless
>    specifically told.  However I've come across one case where it apparently
>    does care.
> 
>    This "works" as expected:
> 
>    node /^univ\d+\.foo\.edu$/ {
> 
>    $myvar = "foo"
> 
>    include module_that_uses_myvar
> 
>    }
> 
>    This one doesn't "work" as expected
> 
>    node /^univ\d+\.foo\.edu$/ {
> 
>    include module_that_uses_myvar
> 
>    $myvar = "foo"
> 
>    }
> 
>    In the 2nd one, module_that_uses_myvar seems to think $myvar is undef or
>    null or something that is most certainly not "foo" If it matters any,
>    $myvar is actually used in an erb template that the module has.  Our
>    puppet master is 2.7.12 and the client is 2.6.17.
> 
>    I didn't see any bug reports about this.  Is this a known problem or just
>    not considered a bug?
> 
>    --
>    You received this message because you are subscribed to the Google Groups
>    "Puppet Users" group.
>    To view this discussion on the web visit
>    [1]https://groups.google.com/d/msg/puppet-users/-/Q_pDE14z0CYJ.
>    To post to this group, send email to [email protected].
>    To unsubscribe from this group, send email to
>    [email protected].
>    For more options, visit this group at
>    http://groups.google.com/group/puppet-users?hl=en.
> 
> References
> 
>    Visible links
>    1. https://groups.google.com/d/msg/puppet-users/-/Q_pDE14z0CYJ

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to