mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-09 12:10:31 -07:00
fix: fix hpilo_boot.py module failing when trying to power on an already powered-on server
For this module to be idempotent, it should be successful when trying to reach a power state which is already there. It was already the case for "poweroff", however when running the module with "boot_once" state, it was failing if the server was already powered_on, which is not an idempotent behavior
This commit is contained in:
parent
8749da7756
commit
02616ec6b3
1 changed files with 2 additions and 3 deletions
|
@ -188,9 +188,8 @@ def main():
|
|||
power_status = ilo.get_host_power_status()
|
||||
|
||||
if not force and power_status == 'ON':
|
||||
module.fail_json(msg='HP iLO (%s) reports that the server is already powered on !' % host)
|
||||
|
||||
if power_status == 'ON':
|
||||
pass
|
||||
elif power_status == 'ON':
|
||||
ilo.warm_boot_server()
|
||||
# ilo.cold_boot_server()
|
||||
changed = True
|
||||
|
|
Loading…
Add table
Reference in a new issue