I'm writing a script for batch creating hosts in foreman. At the moment
it is only tested with vmware and ovirt backends but it'd be great to
have some more backends in and to begin developing the creation of other
objects like subnets, domains and so on. It uses David Caro's
python-foreman module to interface with the foreman api.

The module is called foreman-host-builder and you can find it at github
as well as at pypi.

To install:

pip install foreman-host-builder

Best Regards,


I tried to host using
[root@ol07frm00 foreman-host-builder]# ./ -t ol07tst18.yml
Building …
/usr/lib/python2.7/site-packages/urllib3/ InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See:
No handlers could be found for logger “foreman.client”

Getting parameters for servers…
Traceback (most recent call last):
File “./”, line 163, in
File “./”, line 75, in main
build_dict[‘location_id’] =[server][‘location’])[‘id’]
KeyError: ‘location’

foreman version - 1.20.1

below is my config file
foreman_server =
foreman_username = admin
foreman_password = cGFzc3dvcmQ=
foreman_api_version = 2