2

Can a puppet master execute its catalog on itself?

I want to automate some tasks on my master server. The best would be to create a node for the master server and apply the catalog directly.

If it's not possible, can I apply the whole catalog manually? If I try to do a manual puppet apply, it doesn't seem to work.

Thanks.

2 Answers2

1

The master and agent roles of puppet are managed by two different processes, so a puppetmaster can also have a puppet agent running, in which case, the machine will have its catalog served conveniently.

Moreover, it is not at all uncommon to have a set of modules that apply to every host (e.g. a security baseline), including the puppetmaster. Of course, you can also have modules that specifically target the puppetmaster host.

It is not entirely clear from your question what do you mean by "automate some tasks on my master server": whether you want to keep your puppetmaster in a known state or have some arbitrary tasks run on demand.

For the former, the standard behaviour of puppet is all you need, for the latter, you could check the puppet's companion project, Marionette Collective.

dawud
  • 15,096
  • 3
  • 42
  • 61
0

We actually have a very similar setup where we have a manifest specific to our puppetmasters.

We simply run the puppet agent regularly on them just like we do with any other node.

You just need to make sure to run puppet agent instead of puppet apply if you want to actually use a catalog known to the puppetmaster process.