From b23f0c01e06ea18c6f827603c40e0dc4ab618505 Mon Sep 17 00:00:00 2001 From: rubenb Date: Wed, 18 Oct 2023 14:39:33 +0200 Subject: [PATCH] update --- .../roles/config-fail2ban/tasks/main.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linux/base-config-debian/roles/config-fail2ban/tasks/main.yaml b/linux/base-config-debian/roles/config-fail2ban/tasks/main.yaml index 39002d1..ffb60f3 100644 --- a/linux/base-config-debian/roles/config-fail2ban/tasks/main.yaml +++ b/linux/base-config-debian/roles/config-fail2ban/tasks/main.yaml @@ -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