Ask Your Question

puppet agent -t with different role or facter value

asked 2018-10-01 13:20:01 -0600

JQ1982 gravatar image

Is there a way to run puppet agent -t with a different role that is assigned to a server during a noop? Can you pass a one time run as well?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-01 13:32:32 -0600

DarylW gravatar image

updated 2018-10-01 13:33:03 -0600

If your role is done purely through Facter facts (and not something embedded into your trusted facts in your cert), you can always supply a fact as an environment variable for you run. This assumes your role fact is named 'role'.

FACTER_role=myrole puppet agent -t

I would previously do lots of on instance testing that way with puppet3, I haven't worked with modern puppet, but it should still work there.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2018-10-01 13:20:01 -0600

Seen: 77 times

Last updated: Oct 01