You can also check this python script: https://github.com/RedHatSatellite/sat6Inventory
On 31-03-2017 16:43, Wim Van den Borre wrote: > ok, update. > > If you do this: > > hammer fact list --search 'serialnumber' --order 'host asc' > > You get a nice output from all the hosts and their serial number, but > i don't know how to include more then one field... > > Op vrijdag 31 maart 2017 14:15:08 UTC+2 schreef Wim Van den Borre: > > Player 2 has entered the game :) Let's get this party started :) > > I've just found out that with hammer you can get a list of the > foreman hosts. > > Command: #hammer --csv host list > > You get an output like this: > > Id,Name,Operating System,Host Group,IP,MAC > > But i can't find how i can get all of the properties.. > > Op vrijdag 31 maart 2017 13:12:29 UTC+2 schreef Nuno Marques: > > Hello, > > At the moment I'm parsing the json output from > https://katello/api/v2/hosts?per_page=99999 > <https://katello/api/v2/hosts?per_page=99999> > > I'm using the following information: > > $h['ip'] = $host['ip']; > $h['name'] = $host['name']; > $h['mac'] = $host['mac']; > $h['domain'] = $host['domain_name']; > $h['arch'] = $host['architecture_name']; > $h['os'] = $host['operatingsystem_name']; > $h['org'] = $host['organization_name']; > $h['virtual'] = $host['model_name'] === "VMware > Virtual Platform"; > > If anyone is doing anything more please share :) > > > On 30-03-2017 16:34, Wim Van den Borre wrote: >> Hey everyone, >> >> How cool would it be to import nodes from foreman into itop, >> that way you automaticaly get the serial number brand etc... >> >> Can this be done? Or has anyone has done this before? >> >> KR >> -- >> You received this message because you are subscribed to the >> Google Groups "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from >> it, send an email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at >> https://groups.google.com/group/foreman-users >> <https://groups.google.com/group/foreman-users>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > -- > Nuno Marques > -- Nuno Marques Departamento de Serviços Técnicos Centro Nacional de Cibersegurança Rua da Junqueira, 69 | 1300-342 Lisboa T (+351) 210 497 404 [email protected] -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
