Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Support Foreman hosts that are unmanaged #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

walkamongus
Copy link

This adds support for unmanaged hosts in Foreman. I also encountered what appeared to be a bug where the data sent to Foreman was repeated at the top-level as well as in thehost key.

Foreman (v1.17) was receiving:

{"build"=>false, "comment"=>"", "domain_id"=>nil, "environment_id"=>"1", "hostgroup_id"=>"1", "managed"=>false, "name"=>"host.example.org", "operatingsystem_id"=>nil, "apiv"=>"v2", "host"=>{"build"=>false, "comment"=>"", "managed"=>false, "name"=>"host.example.org", "domain_id"=>nil, "environment_id"=>"1", "hostgroup_id"=>"1", "operatingsystem_id"=>nil}}

whereas it should only get

{"host"=>{"build"=>false, "comment"=>"", "managed"=>false, "name"=>"host.example.org", "domain_id"=>nil, "environment_id"=>"1", "hostgroup_id"=>"1", "operatingsystem_id"=>nil}}

and the extra data was causing it to throw a Hostgroup not found by id error.

Fodoj pushed a commit to Fodoj/terraform-provider-foreman that referenced this pull request May 4, 2021
Add support for Location and Organization IDs on all API calls (Closes: wayfair#3, wayfair#7)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant