# foreman-rake console
User.current = User.anonymous_api_admin
output = []
output << "Systems"
Katello::System.includes(:environment).all.each do |sys|
output << [sys.name, sys.id, sys.hostname, sys.environment.organization_id, sys.host_id].join(',')
end
output << ""
output << "Hosts"
Host.all.each do |host|
output << [host.name, host.id, host.organization_id].join(',')
end
File.open('/tmp/system_debug.txt', 'w'){|f| f.write(output.join("\n"))}
Last active
June 10, 2016 16:05
-
-
Save jlsherrill/35c7a27a9bcf0b0d885e23f6bc25b57d to your computer and use it in GitHub Desktop.
Gather system and host info
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment