From c8ffa99edb295b2453340cd15c87e1e6000856ec Mon Sep 17 00:00:00 2001 From: rubenb Date: Wed, 18 Oct 2023 15:54:39 +0200 Subject: [PATCH] test --- .../base-config-debian/roles/config-fail2ban/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 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 799b53f..c393b4b 100644 --- a/linux/base-config-debian/roles/config-fail2ban/tasks/main.yaml +++ b/linux/base-config-debian/roles/config-fail2ban/tasks/main.yaml @@ -7,7 +7,7 @@ - name: Gather the package facts ansible.builtin.package_facts: manager: auto - register: packages + register: packages.stdout.find('fail2ban') # register: packages # print the package facts in var @@ -22,7 +22,7 @@ state: present # when: packages.stdout.find('fail2ban') == "" # when: "{{ packages['fail2ban'] | length }}" - when: packages.stdout.find('fail2ban') == -1 + when: packages == -1 # config fail2ban if is there is in the system #- name: config fail2ban