[英]Using a puppet/facter fact in a Foreman smart class parameter?
How can I use a puppet/facter fact like ${$::hostname} in a Foreman smart class parameter? 如何在Foreman智能类参数中使用诸如$ {$ :: hostname}之类的p /因素事实?
I've tried $hostname and $::hostname and just about every variant I can think of! 我已经尝试了$ hostname和$ :: hostname以及几乎所有我能想到的变体! I've even trawled through Google and Foreman docs and bug reports.
我什至浏览了Google和Foreman文档以及错误报告。 Surely there's a simple answer?
当然有一个简单的答案?
It's an old question, but you use facts like you do in a ERB template, example: 这是一个老问题,但是您可以像在ERB模板中那样使用事实,例如:
<%= @host.shortname %>
would get you xyz of xyz.example.com 会得到xyz.example.com的xyz
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.