FAQ
Hi. I actually posted this question at the Puppet webinar. I am a
software developer using puppet to automate the installation custom
software. I had a question involving variable parsing order. It has been
mentioned that Puppet variables are parse-order-dependent, though sometimes
seems totally random or independent of any order. Is there a way to order
or chain variable parsing (in an instance where parsing seems to be at
random), kind of how resource execution can be ordered in a manifest? I
know this isn't traditionally how puppet works, but I was curious as to any
trick that may accomplish something like this. To give a little context, I
want to assign a variable a value that only becomes existent after it is
created by the execution of a particular exec resource. But when a
manifest is applied, variables are checked before resources are executed.
So on and so forth.... Even if this isn't possible (assigning a variable
after resource execution), a way to at least order the parsing of the
variables in the phase before resource execution would prove very helpful.
I apologize if this seems trivial to anyone. Honestly I hope that it is.
Thanks a bunch!!

--
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/-/iyOUo33GaM8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Jakov Sosic at Jun 28, 2013 at 4:38 pm

    On 01/08/2013 10:07 PM, mmcbride@spryinc.com wrote:

    I know this isn't traditionally how puppet works, but I was
    curious as to any trick that may accomplish something like this.
    I'm afraid you answered your own question in the first part of the
    sentence. It's not possible AFAIK.

    And why would you want that in the first place? Can you provide code sample?

    give a little context, I want to assign a variable a value that only
    becomes existent after it is created by the execution of a particular
    exec resource But when a manifest is applied, variables are checked
    before resources are executed.
    If you're talking about facts, they are gathered *before* manifest
    compilation, so if you depend upon some fact value that is set only
    after installation of some package, you have to run puppet twice to
    bring your system to desired state.

    And, again, can you provide code sample?

    I apologize if this seems trivial to anyone.
    No need to apologize. Problem is you are trying to use *declarative*
    language as a procedural one. In most cases I've seen on this list, you
    don't need to do that at first place. So please show us your real-world
    problems and maybe someone can pinpoint solution for you.


    --
    Jakov Sosic
    www.srce.unizg.hr

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 8, '13 at 10:08p
activeJun 28, '13 at 4:38p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Mmcbride: 1 post Jakov Sosic: 1 post

People

Translate

site design / logo © 2022 Grokbase