Fix an incorrect variable name
This commit is contained in:
@@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Check that the fail2ban service is active"
|
- name: "Check that the fail2ban service is active"
|
||||||
register: sshd_rhel_fail2ban_service
|
register: fail2ban_rhel_fail2ban_service
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: fail2ban
|
name: fail2ban
|
||||||
|
|
||||||
- name: "Assert fail2ban is running"
|
- name: "Assert fail2ban is running"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that: sshd_rhel_fail2ban_service.status.ActiveState == "active"
|
that: fail2ban_rhel_fail2ban_service.status.ActiveState == "active"
|
||||||
success_msg: "fail2ban service is running"
|
success_msg: "fail2ban service is running"
|
||||||
fail_msg: "fail2ban service is not active"
|
fail_msg: "fail2ban service is not active"
|
||||||
|
|||||||
Reference in New Issue
Block a user