This commit is contained in:
Ruben Blanco 2023-10-19 07:13:17 +02:00
parent c934c2d114
commit 745b261ca4
1 changed files with 8 additions and 4 deletions

View File

@ -5,15 +5,19 @@
# comprobe if fail2ban is installed if not then install fail2ban
# Gather the package facts
- name: Gather the package facts
ansible.builtin.package_facts:
package_facts:
manager: auto
# register: ansible_facts.packages.stdout.find('fail2ban')
# register: packages
#- name: obtener paquete fail2ban
# set_fact:
# packages: "{{ ansible_facts.packages['fail2ban'] }}"
# 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