Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect warning for "systemctl reset-failed firewalld" #4255

Closed
gorsing opened this issue Jul 11, 2024 · 2 comments · Fixed by #4301
Closed

Incorrect warning for "systemctl reset-failed firewalld" #4255

gorsing opened this issue Jul 11, 2024 · 2 comments · Fixed by #4301
Assignees
Labels

Comments

@gorsing
Copy link

gorsing commented Jul 11, 2024

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
  • 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
  1. 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 .
    
  2. Run the playbook and observe the warning message.
    

Example playbook:

- name: Reset if any errors happened
  ansible.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 happened
  ansible.builtin.systemd:
    name: firewalld
    state: 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.

@gorsing gorsing added bug new Triage required labels Jul 11, 2024
@audgirka audgirka removed the new Triage required label Jul 17, 2024
@tanwigeetika1618 tanwigeetika1618 self-assigned this Aug 20, 2024
@tanwigeetika1618
Copy link
Contributor

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.

@gorsing
Copy link
Author

gorsing commented Sep 3, 2024

@audgirka Thanks for your time!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants