How to add lots of hosts with command line tools hammer or foremancli?

Hello

I need add hundreds of hosts at the same time.
So I find that the foremancli can do this, but I install the latest
version of command line tool is hammer. There isn't foremancli any more.
So I use hammer to create host. From my point of view most of the
options should be triggered from hostsgroup automatically. But it failed
with need lots of options, especial for operationssystem. Hammer cli
could not find os from foreman server.

Is there other good ways to add hosts at one time?

Best Regards
Xiaofei

Hello,

you are right the host creation is not in a good shape in hammer.
Fortunately there was quite a lot of work done on that during the last
couple of days and host creation is working again. The new gem will be
released probably tomorrow, till then you can try to run hammer from
source [1][3], if you wish.
The progress on key parts of hammer is tracked in [2]

[1] https://github.com/theforeman/hammer-cli
[2] https://github.com/theforeman/hammer-cli-foreman
[3] Bug #3297: CLI success story tracker - Hammer CLI - Foreman

Regards,
Martin

ยทยทยท On 10/25/2013 04:20 AM, Yan Xiaofei wrote: > Hello > > I need add hundreds of hosts at the same time. > So I find that the foremancli can do this, but I install the latest > version of command line tool is hammer. There isn't foremancli any more. > So I use hammer to create host. From my point of view most of the > options should be triggered from hostsgroup automatically. But it failed > with need lots of options, especial for operationssystem. Hammer cli > could not find os from foreman server. > > Is there other good ways to add hosts at one time? > > Best Regards > Xiaofei >