Nosmoht / ansible-module-foreman

Ansible module to manage configuration of Foreman
49 stars 32 forks source link

host: do not try to retrieve host power status if not needed #95

Closed tmmorin closed 5 years ago

tmmorin commented 5 years ago

With the current code, for a baremetal host not controlled via BMC, even when state is simply "present" or "absent", the ansible-module-foreman code will try to retrieve power information from foreman, which will fail ("Power operations are not enabled on this host."").

With this error will only appear in the relevant cases: the cases where state was set to 'rebooted','running' or 'stopped'.