From 2ca88c2711a940badfdf548e7206e91b16a13871 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 12 Apr 2021 16:56:48 +0200 Subject: [PATCH] add message to warn the user + Added a message that will warn the user that fail2ban is not installed. + Increased the version integer for the simple versionscheck. --- tasks/fail2ban.yml | 6 ++++++ vars/main.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/fail2ban.yml b/tasks/fail2ban.yml index d1bce60..913127d 100644 --- a/tasks/fail2ban.yml +++ b/tasks/fail2ban.yml @@ -20,3 +20,9 @@ mode: 0444 notify: systemctl restart fail2ban when: "'fail2ban' in ansible_facts.packages" + +- name: warn if fail2ban is not installed + ansible.builtin.fail: + msg: "the package fail2ban is not installed. no fail2ban filters deployed." + when: "'fail2ban' not in ansible_facts.packages" + ignore_errors: true diff --git a/vars/main.yml b/vars/main.yml index 1cdd648..c38f978 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -20,5 +20,5 @@ gitea_variables: paths: - 'vars' -playbook_version_number: 8 # should be int +playbook_version_number: 9 # should be int playbook_version_path: 'do1jlr.gitea.version'