Unable to supply run stages to puppet classes

Due to limitations in Puppet and Foreman there is no way to specify “run stages” [4] for Puppet classes.
Run stages are meant to provide an order in which puppet classes should be applied on a host. If no run stages are defined then all puppet classes will belong to the default run stage ‘main’. This means that Puppet will apply a catalog of resources in an arbitrary order.

This is an issue concerning Puppet, but also Foreman because it acts as an ENC for Puppet.

Puppet has a limitation in that it is not possible to specify a run stage in the puppet class itself. A run stage for a puppet class can only be specified if the class was declared in a resource-like way. [5] [4]

It is not possible to declare a class in a resource-like way when Foreman is used as an ENC to Puppet. [3]

As Foreman users, we either have to wait for Puppet to change something in the way they handle stages or wait for the Foreman project to make changes. I am not sure which ones will come first, or will changes come at all.

I am just wondering whether someone has some new information on this topic.

Expected outcome:
To have the ability to specify the “stage” metaparameter per puppet class per node or just per puppet class. Maybe it should also be possible to supply other known metaparameters, but I think the stage metaparameter is the most useful one when using Foreman with Puppet. [6]

Foreman and Proxy versions: 1.15.2

Related Links:

[1] Run puppet stages in Foreman
[2] Feature #1987: Ability to specify meta-parameters on classes, e.g. run stage - Foreman
[3] https://ask.puppet.com/question/35729/how-to-add-stages-to-enc-received-classes/
[4] https://puppet.com/docs/puppet/latest/lang_run_stages.html
[5] https://puppet.com/docs/puppet/latest/lang_classes.html#using-resource-like-declarations
[6] https://puppet.com/docs/puppet/latest/metaparameter.html#stage

1 Like