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'.
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'.