0

In the Foreman there is the ability to set a comment for hosts. I would like to pass this comment to a puppet class assigned to these hosts so that the comment can be printed in the motd of the hosts. Is there a way in which I can pass the comment from Foreman to Puppet?

Sander Toonen
  • 113
  • 1
  • 6

1 Answers1

3

It should be accessible as $::comment.

You can see a list of parameters passed through to Puppet from Foreman's ENC interface by clicking the YAML button on a host page:

parameters:
  domainname: example.com
  hostgroup: My host group
  comment: Example comment added under the host.

All of the parameters there are global, so are in Puppet's top-scope, accessible as $::example.

Dominic Cleal
  • 3,160
  • 19
  • 16