Closed jhutar closed 2 years ago
Found this @evgeni fix and it worked for me: https://community.theforeman.org/t/ansible-create-host-failing-to-connect/22982
_host_update = next(x for x in _host_methods if x['name'] == 'update')
for param in ['location_id', 'organization_id']:
# See https://community.theforeman.org/t/ansible-create-host-failing-to-connect/22982
#_host_update_taxonomy_param = next(x for x in _host_update['params'] if x['name'] == param)
#_host_update['params'].remove(_host_update_taxonomy_param)
_host_update_taxonomy_param = next((x for x in _host_update['params'] if x['name'] == param), None)
if _host_update_taxonomy_param is not None:
_host_update['params'].remove(_host_update_taxonomy_param)
Foreman 1.19 is unsupported ;-)
SUMMARY
This seems to be a generic problem for any module, but this is what I was trying to get info about existing host and the error.
ISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
KATELLO/FOREMAN VERSION
I do not have access to ssh to the Foreman, but UI says
Version 1.19.1
STEPS TO REPRODUCE
EXPECTED RESULTS
It should work.
ACTUAL RESULTS