Hi Karsten,

you can introduce a fact and provide the fact on cli when starting the puppet 
agent run:
In your Puppet code:
if $facts['foo'] {
package { 'foo'
ensure => 'latest',
}
}

On CLI:
FACTER_foo=true puppet agent --test
I hope that this a solution which is working for you.
Best,
Martin

On Jan 18 2019, at 2:08 pm, Karsten Heymann <karsten.heym...@gmail.com> wrote:
> Hi puppet users,
>
> is there an easy way to enable a resource only if a certain tag is given? 
> Something like "refreshOnly", but for tags? I'm aware of --skip_tags, but 
> that would require us to specify that on every normal run where the resource 
> is not wanted.
>
> Best regards
> Karsten
>
>
> --
> 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+unsubscr...@googlegroups.com 
> (mailto:puppet-users+unsubscr...@googlegroups.com).
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/3659636e-13c4-455f-98c2-d77a6b79f323%40googlegroups.com
>  
> (https://groups.google.com/d/msgid/puppet-users/3659636e-13c4-455f-98c2-d77a6b79f323%40googlegroups.com?utm_medium=email&utm_source=footer).
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1548082471.local-f349c676-e947-v1.5.5-b7939d38%40getmailspring.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to