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?
Asked
Active
Viewed 225 times
0
-
Yes, OK. But the information I want is already in the comment. Is there no way but to duplicate it? – Sander Toonen Oct 09 '15 at 05:46
1 Answers
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