update
This commit is contained in:
parent
e9a9533a14
commit
b23f0c01e0
|
@ -7,18 +7,19 @@
|
|||
- name: Gather the package facts
|
||||
ansible.builtin.package_facts:
|
||||
manager: auto
|
||||
register: packages
|
||||
|
||||
# print the package facts in var
|
||||
- name: print the package facts in var
|
||||
ansible.builtin.debug:
|
||||
var: ansible_facts.packages
|
||||
#- name: print the package facts in var
|
||||
# ansible.builtin.debug:
|
||||
# var: ansible_facts.packages
|
||||
|
||||
# install packages if is not in the system
|
||||
- name: install fail2ban package if is not in the system
|
||||
apt:
|
||||
name: fail2ban
|
||||
state: present
|
||||
when: "{{ ansible_facts.packages['fail2ban'] }} is not defined "
|
||||
when: "{{ packages['fail2ban'] }} is not defined "
|
||||
|
||||
# config fail2ban if is there is in the system
|
||||
#- name: config fail2ban
|
||||
|
|
Loading…
Reference in New Issue