puppet::master::checklastrun does not support ignoring hosts
Sometimes one may want to have it ignore some hosts, e.g. machines that are not running 24/7 (https://labs.riseup.net/code/issues/12010). That class pretends to support a bunch of options (e.g. puppet_lastruncheck_ignorehosts_str
) that the lastruncheck
script does not support; I didn't check since when this has been broken, I suspect that it's when we replaced the Ruby version with the bash one; anyway.
The only way to ignore hosts currently is to modify that script and edit the IGNORE_HOSTS
hard-coded variable in there.
My plan to solve this problem is:
- have lastruncheck honor
IGNORE_HOSTS
if it's already set, and submit this change upstream (https://github.com/cafuego/check_puppetmaster) - get rid of all the obsolete
$puppet_lastruncheck_*
global variables - add an
ignore_hosts
parameter to thepuppet::master::checklastrun
class, and pass it asIGNORE_HOSTS
to lastruncheck in its environment; note that this class is included frompuppet::master
; I'm not in the mood to do the "let's forward parameters between classes" dance, so one will need to use Hiera to assign whatever value they want to this parameter. Whoever wants to do it differently can write the corresponding boilerplate code later.