Ask Your Question

Is there a way to have the Puppet Agent enforce one class while the rest run in NOOP mode?

asked 2018-01-30 08:10:48 -0500

JGIorio gravatar image

I have a puppet_agent module which sets up whether the agent runs in NOOP mode and set an interval. Well because it sets NOOP mode no changes ever occur to the puppet.conf when I change the value of runinterval.

Is there a way to enforce the puppet-agent module but leave the rest of the modules to run in NOOP mode?

Something about nonoop is what I think

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-04-10 05:19:17 -0500

example42 gravatar image

I wrote a blog post about this and noop related matters, find it here:

Short answer; in the classes where you want to force no-noop add something like:


And possibly do this conditionally based on a class parameter. You need to have trlinkin-noop module.

edit flag offensive delete link more


This is the correct answer.

ffalor gravatar imageffalor ( 2018-04-10 08:14:48 -0500 )edit

answered 2018-01-30 13:19:16 -0500

greynolds gravatar image

You may want to create a custom fact, then add script to the exec file to be invoked. Meaning as an example:

if &operatingsystem == /[(RHEL)]/: file => /root/, ensure => present,

  exec  => 'run_this_class":
  cmd => '/bin /root/,
  path => '/bin:/sbin:/usr/local/bin:/usr/local/sbin

You could place this in any class you have written.
  puppet apply  'name of class'
  puppet agent -t --noop

or add


to your classification and pin the nodes.

What I am not clear about? If you want the default puppet run to exec on a single node and noop everyone in a particular class? Maybe a little more insight before I get to deep into the weeds will help.

edit flag offensive delete link more


It sounds like he wants a set of modules to run in no-op mode, but he wants a module to run in regular mode to manage puppet... the only thing I can think of in that case (other than globally setting some kind of no-op param for a subset of 'roles' for other modules would be two different runs with

DarylW gravatar imageDarylW ( 2018-01-31 08:22:23 -0500 )edit

.. two different environments or calls, and have puppet running not as a daemon, but as two separate sets of 'puppet apply' calls in a cron, or one as apply in a cron and the other as a deamon. ... I'm assuming he wants some kind of 'audit' visibility, but to not 'break' the system and manage puppet

DarylW gravatar imageDarylW ( 2018-01-31 08:23:44 -0500 )edit

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-01-30 08:10:48 -0500

Seen: 33 times

Last updated: Apr 10