You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I receive an incorrect warning when using ansible.builtin.command to reset the state of the ceph-iscsi service. The warning suggests using ansible.builtin.systemd instead. However, there is no clear documentation or example for resetting the failed state using the ansible.builtin.systemd module.
Issue Type
Bug Report
OS / ENVIRONMENT
ansible-lint 24.7.0 using ansible-core:2.14.11 ansible-compat:24.6.1 ruamel-yaml:0.18.5 ruamel-yaml-clib:0.2.7
ansible installation method: OS package
ansible-lint installation method: pip
STEPS TO REPRODUCE
Create a playbook that uses the **ansible.builtin.command** module to reset the failed state of example service **firewalld** on fedora 38 OS or up .
Run the playbook and observe the warning message.
Example playbook:
- name: Reset if any errors happenedansible.builtin.command:
cmd: systemctl reset-failed ceph-iscsi
Desired Behavior
The playbook should run without warnings, or there should be clear documentation on how to reset the failed state using the ansible.builtin.systemd module.
Actual Behavior
I receive an error message indicating that I should use the ansible.builtin.systemd module instead of the ansible.builtin.command module. However, the ansible.builtin.systemd module does not support the reset-failed state directly
- name: Reset if any errors happenedansible.builtin.systemd:
name: firewalldstate: reset-failed
args[module]: value of state must be one of: reloaded, restarted, started, stopped, got: reset-failed (warning)
cloudcw/my_plr.yml:315 Task/Handler: Reset if any errors happened
Please provide a valid example in the future, or update the documentation on how to use the ansible.builtin.systemd module to reset the failed state of a service.
The text was updated successfully, but these errors were encountered:
Hi @gorsing, A fix has been implemented that addresses the incorrect warning when using the ansible.builtin.command module to set a service’s state to reset-failed. This means the issue you encountered should no longer occur with the steps you provided. Therefore, I will proceed to close this issue based on the current findings.
Summary
I receive an incorrect warning when using ansible.builtin.command to reset the state of the ceph-iscsi service. The warning suggests using ansible.builtin.systemd instead. However, there is no clear documentation or example for resetting the failed state using the ansible.builtin.systemd module.
Issue Type
OS / ENVIRONMENT
ansible-lint 24.7.0 using ansible-core:2.14.11 ansible-compat:24.6.1 ruamel-yaml:0.18.5 ruamel-yaml-clib:0.2.7
STEPS TO REPRODUCE
Example playbook:
Desired Behavior
The playbook should run without warnings, or there should be clear documentation on how to reset the failed state using the ansible.builtin.systemd module.
Actual Behavior
I receive an error message indicating that I should use the ansible.builtin.systemd module instead of the ansible.builtin.command module. However, the ansible.builtin.systemd module does not support the reset-failed state directly
Please provide a valid example in the future, or update the documentation on how to use the ansible.builtin.systemd module to reset the failed state of a service.
The text was updated successfully, but these errors were encountered: