From 5f182cc60d51eb7825981bdba528699e719e129d Mon Sep 17 00:00:00 2001 From: Paul Kremer Date: Thu, 15 Sep 2016 23:28:37 +0200 Subject: [PATCH 1/2] make ansible-lint happy --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index c9e3f66..7e84613 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,7 @@ - name: install apt: name: "{{ item }}" - state: latest + state: present update_cache: true cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" with_items: "{{ fail2ban_dependencies }}" From 60d0f8071e0b2e4e37b795ce34e91cb7a1130e6e Mon Sep 17 00:00:00 2001 From: Paul Kremer Date: Sat, 17 Sep 2016 08:16:19 +0200 Subject: [PATCH 2/2] Make the apt package state configurable --- README.md | 1 + defaults/main.yml | 1 + tasks/main.yml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca06cfb..c80e67a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ None #### Variables +- `fail2ban_install_state`: [default: `latest`]: apt state of fail2ban package (latest, present) - `fail2ban_loglevel`: [default: `INFO`]: Sets the loglevel output (CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG) - `fail2ban_logtarget`: [default: `/var/log/fail2ban.log`]: Sets the log target. This could be a file, SYSLOG, STDERR or STDOUT - `fail2ban_syslog_target`: [default: `/var/log/fail2ban.log`]: diff --git a/defaults/main.yml b/defaults/main.yml index a9e7e65..3701684 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,6 @@ # defaults file for fail2ban --- +fail2ban_install_state: latest fail2ban_loglevel: INFO fail2ban_logtarget: /var/log/fail2ban.log fail2ban_syslog_target: /var/log/fail2ban.log diff --git a/tasks/main.yml b/tasks/main.yml index 7e84613..f4790bc 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,7 @@ - name: install apt: name: "{{ item }}" - state: present + state: "{{ fail2ban_install_state }}" update_cache: true cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" with_items: "{{ fail2ban_dependencies }}"