admin管理员组文章数量:1306875
I have searched high and low for a solution to pull my .yaml details out via the Reporting Template function in Foreman. Under Puppet ENC is where my desired information is located.
I have tried tinkering with different types of input. Tried countless trials of report writing to try and get my list of modules, but to no avail. The code I'm going to show works for finding out information of each host, that's no problem. But how do I change it to get the list of modules? I can also only do it in Safemode, do not want to do it without Safemode.
(shortened)
<%- load_hosts(search: input('Hosts filter'), preload: [:operatingsystem, :architecture, :anization, :location, :reported_data]).each_record do |host| -%>
<% host.interfaces.each do |iface| -%>
Host Name: <%= host.params['hostname'] %>
FQDN: <%= iface.fqdn %>
IP: <%= host.ip %>
OS: <%= host.os %>
Interface: <%= iface.identifier %>
<%- end %>
What I want:
Hostname: abcdef
module 1: yes
module 2: no
...
本文标签:
版权声明:本文标题:ruby - Unable to make correct Reporting Template in Foreman to get a list of modules off of each host - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741767011a2396522.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论