theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
146 stars 163 forks source link

Add overwrite to host module #1218

Open achevalet opened 3 years ago

achevalet commented 3 years ago
SUMMARY

overwrite=true is required to update a host and overwrite the existing DNS record when ip/hostname change

ISSUE TYPE
evgeni commented 3 years ago

Where is this parameter coming from? I don't see it in https://theforeman.org/api/2.4/apidoc/v2/hosts/create.html or https://theforeman.org/api/2.4/apidoc/v2/hosts/update.html

achevalet commented 3 years ago

Hey, I think this is an undocumented parameter passed from the UI. Hammer also supports it: https://github.com/theforeman/hammer-cli-foreman/blob/master/lib/hammer_cli_foreman/hosts/common_update_options.rb#L37

evgeni commented 3 years ago

Interesting. That parameter is not documented in the API at all. I've opened https://projects.theforeman.org/issues/32541 to fix that part.

achevalet commented 2 years ago

Just a heads-up :-) (https://github.com/theforeman/foreman/pull/8719)