System information
:password => $password,
:headers => { :accept => :json,
:content_type => :json }
).execute
results = JSON.parse(response.to_str)
end
hosts = get_json(url+"hosts/")
#puts JSON.pretty_generate(hosts)
puts "Hosts within Satellite are:"
hosts['results'].each do |name|
puts name['name']
end
exit()
Usin g t h e Command Lin e t o List Availab le Syst ems on Sat ellite 5
Use the following command format to list available systems on Satellite 5:
# spacecmd -u username -p password system_list
An example session might appear as follows:
# spacecmd -u admin -p password system_list
INFO: Spacewalk Username: admin
INFO: Connected to https://localhost/rpc/api as admin
test_02.example.com
Usin g t h e Command Lin e t o List Availab le H o sts on Satellit e 6
Use the following command format to list available hosts on Satellite 6:
# hammer host list
An example session might appear as follows:
# hammer host list
[Foreman] password for admin:
---|-----------------|-------------------|------------|--------------|--
----------------
ID | NAME | OPERATING SYSTEM | HOST GROUP | IP |
MAC
---|-----------------|-------------------|------------|--------------|--
----------------
1 | test.example.com | RHEL Server 6.5 | | 10.34.34.235 |
e4:1f:13:6b:ed:0c
Report a bug
4.1.1 .2 . De let ing and Cre at ing Use rs
Red Hat Sat ellit e 6 .0 T ransit ion G uid e
4 6