hi all,
its possible in hammer to get hosts where the hostgroups are empty ?
hammer host list --search --hostgorup-id=*
empty
Null
“”
‘’
all of them doesnt work…
Thanks in advance
Regards
Neeloj
hi all,
its possible in hammer to get hosts where the hostgroups are empty ?
hammer host list --search --hostgorup-id=*
empty
Null
“”
‘’
all of them doesnt work…
Thanks in advance
Regards
Neeloj
Try:
hammer host list --search "! has hostgroup"
Have you seen these docs yet?
https://docs.theforeman.org/3.0/Managing_Hosts/index-foreman-el.html
I used the auto-completion in the GUI and then transferred it to hammer
and with some googling for reference i found this: Foreman :: Advance Search tips in Foreman
So he is using the syntax found here:
and then he is using it to build hammer commands !
Thanks for the link - I always tried operators but this is a good documentation