greetings,
im mostly using puppet as an ENC and front-end for puppet. i didnt enable
the TFTP and kickstart functions.
instead, i tried to use restapis and scripts to add/edit the hosts that has
puppet agent and need to be added to puppet.
in the latest foreman version.
i tried, the following curl. to add host client.example.com and add that to
hostgroup 1. yet it failed.
$ curl -s -H "Accept:application/json"
> -k -u admin:changeme
> -d "host[name]=client.example.com" -d "host[hostgroup_id]=1"
> https://foreman.example.com/hosts
{"errors":["IP address has already been taken","IP address is invalid","MAC
address has already been taken","MAC address can't be blank","MAC address
is invalid","Architecture can't be blank","Operatingsystem can't be
blank","Domain can't be blank","Partition Table cant be blank unless a
custom partition has been defined"]}
it seems i need to specify everything it needs???
thats not good, coz i dont use those sections.
for one node i have already in foreman(which was added automatically coz of
puppet register, and by editing that node, i didnt even see the tabs for OS
and Network, etc.)
So im asking if theres a way i can add host like that.
i can try to do editing instead and puppet register auto added the host.
yet i need to know how to edit an existing host too.
i tried the json input, it gave me 500 error, i guess its due to the lack
of those info as well.
appreciate any help. thanks!!!