A better dev can correct me if I'm wrong, but I don't believe this is possible with hammer. You can write your own script that works with the api, or alternatively you could use the irb shell for foreman to talk directly with rails to remove the machines.
On Nov 13, 2017 07:12, "JonDC" <[email protected]> wrote: > Hello, > > I need to remove a large amount of hosts registered in Foreman using API > (curl) or hammer. > For exemple, I want to delete all hosts in the hostgroup "gce" where last > report is older that 2 days. > > How can I manage this kind of request ? > > note that my concerned hosts are all using a prefix like "gce-XXX". > > thanks, > JonDC > > -- > 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. > -- 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.
