You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
Is it possible to reference a top scope variable passed in from an ENC and set a fact based on that? That is,
parameters:
var: value
I know it's the other way around that top scope variables are set from facts, but just trying to figure out the best way to do this other that writing out a script to set an external fact on the next puppet run.
Thanks.
Christopher Wood
unread,
Apr 17, 2015, 1:14:00 PM4/17/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
I did just that, used a template to populate some external facts:
[puppet exp] $ cat inventory.erb
<%# these will be blank if the variable does not exist -%>
<%# next 4 are set in cobbler's kickstart metadata -%>
cluster=<%= @cluster %>
servertype=<%= @stype %>
stype=<%= @stype %>
datacenter=<%= @datacenter %>
owner=<%= @owner %>
These end up in puppetdb and are available to mcollective when the usual collections happen. I haven't noticed any adverse effects from doing it this way.