Thanks Craig!
I will give it a go tonight and report here back.
-S
On Thursday, September 17, 2015 at 2:55:23 PM UTC+1, Craig Dunn wrote:
>
> It's can be done easier than that, although facts is the right
> track... You don't actually have to create a fact, you could just
> test for the existence of it...
>
> class mything (
> $pull_repo, # sourced from hiera mything::pull_repo
> ) {
>
> $do_pull = $::pull_repo ? {
> undef => $pull_repo,
> default => $::pull_repo,
> }
> }
>
> Note the use of top level scoping there - by default $::pull_repo will
> be undef and the value from hiera used, you can then dynamically
> create your fact on the fly by calling puppet agent with...
>
> FACTER_pull_repo=yes puppet agent -t
>
> Im not sure how you would tie that into the mcollective job, but it
> shouldn't be too hard....
>
> Craig
>
> --
> Enviatics | Automation and configuration management
> http://www.enviatics.com | @Enviatics
> Puppet Training http://www.enviatics.com/training/
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/f62a82d2-9879-4d19-804d-bf29f50c7ebd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.