If you use dynamic environments with git as detailed in http://hunnur.com/blog/2010/10/dynamic-git-branch-puppet-environments/ you can get a lot of flexibility without having to hardcode environments. Just branch, commit, push a new remote branch, and then use the environment.
On Fri, Sep 16, 2011 at 11:42 AM, Jo Rhett <[email protected]> wrote: > Okay, I figured this out. Yes, you can tweak puppet.conf based on > environment (which could be useful for testing new modules) but for my > simplified test case below it works something like this: > > Put this in the class/module: > > # Client can opt in to this for testing > if $environment == 'fixjava' { > include fixjavainstall > } > > And then run the client like so: > puppet agent --test --environment fixjava > > On Sep 16, 2011, at 11:21 AM, Jo Rhett wrote: > > On Sep 15, 2011, at 11:31 PM, Jo Rhett wrote: > > Any better idea for testing new classes or modules within the entire policy > run would be appreciated. > > > On Sep 16, 2011, at 8:01 AM, Craig White wrote: > > I thought that was the point of environments. > > > Would you mind explaining that statement? There simply isn't anything on > this page http://docs.puppetlabs.com/guides/environment.html that would > indicate such. Yes, I agree that "puppet agent --environment dev" looks like > any easy invocation, but the implementation requires a daemon restart so > this doesn't make much sense. > > In fact, this is a heavy-handed approach that requires about 10x the amount > of work compared to creating a node statement for just the node. Any time > you have to modify puppet.conf and restart the daemon … very much missing > the point for "easy testing" > > > -- > Jo Rhett > Net Consonance : consonant endings by net philanthropy, open source and > other randomness > > -- > 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. > > > -- > Jo Rhett > Net Consonance : consonant endings by net philanthropy, open source and > other randomness > > -- > 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. > -- Adrien Thebo [email protected] -- 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.
