> Please help.
> I read this note
> http://blog.theforeman.org/2012/01/getting-foreman-search-results-into.html
> How i can get host's ip address from foreman?
> The following expression $hostlist = database foreman("hosts", "name =
> ${fqdn}") put this result:
> [{"host"=>{"operatingsystem_id"=>9, "id"=>23, "hostgroup_id"=>1,
> "name"=>"sphinx1.torg.local"}}]
> But what query get host's ip from database?
>
Currently the host info that is return is pretty limited (there is a
different response when calling for a collection of hosts vs a single host
- which would yield much more info about the system).
if you are looking for the ip, I suggest you use facts base search instead
for now, or, you can add / change the function to query for a single host
instead of using a search (e.g. query /hosts/fqdn instead of
/hosts?search=fqdn…)
Ohad
···
On Tue, Oct 9, 2012 at 8:40 AM, Vlados Vlados wrote:–
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/3jz7blvT3qkJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.