community.general
community.general copied to clipboard
hpiLo_boot force should be exclusive with poweroff
Summary
While using the hpiLo_boot module, I was trying to force the system power off. I made the mistake of setting both the force argument and the state of poweroff. The behavior in this case is counter to what I'd expect; rebooting instead of powering off. The force flag should either throw an error with the state poweroff, or just ignore the force flag in this case.
Issue Type
Feature Idea
Component Name
hpilo_boot
Additional Information
- hosts: localhost
connection: local
gather_facts: no
vars:
baseuri: iloIP
username: foo
password: bar
tasks:
- name: Force the system off in case it's stuck in POST
hpilo_boot:
host: "{{ baseuri }}"
login: "{{ username }}"
password: "{{ password }}"
state: poweroff
force: true
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
Files identified in the description:
-
lib/ansible/plugins/connection
-
plugins/modules/remote_management/hpilo/hpilo_boot.py
-
tests/integration/targets/aix_devices/tasks/main.yml
-
tests/integration/targets/alternatives/vars/Debian.yml
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @MorrisA @bcoca @d-little @flynn1973 @gforster @haad @kairoaraujo @marvin-sinister @mator @molekuul @mulby @ramooncamacho @wtcross click here for bot help
https://github.com/ansible-collections/community.general/blob/b10d707a8baa2530deb98a218c820762a2ce879a/plugins/modules/remote_management/hpilo/hpilo_boot.py#L173
@jhg03a Thanks for reporting this. You could submit a PR to fix the issue - we would be more than happy to review it. Else, it will have to wait for someone to pick it up.
!component =plugins/modules/remote_management/hpilo/hpilo_boot.py
Please note that this must not be simply changed (both ignoring the flag, or erroring out is a change in behavior). The current behavior needs to be deprecated, as there might be users which depend on it, and only changed in +2 major versions.
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @dagwieers click here for bot help