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
...

本文标签: