diff --git a/README.md b/README.md index a257873..6528d1c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ None #### Variables -- `fail2ban_install_state`: [default: `latest`]: apt state of fail2ban package (latest, present) - `fail2ban_loglevel`: [default: `3`, or `INFO` in Ubuntu 16.04]: Sets the loglevel output (e.g. `1 = ERROR`, `2 = WARN`, `3 = INFO`, `4 = 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 d5a63ac..09aa9ab 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,5 @@ # defaults file for fail2ban --- -fail2ban_install_state: latest fail2ban_loglevel: "{{ 'INFO' if (ansible_distribution == 'Ubuntu' and ansible_distribution_version | version_compare('16.04', '>=')) else 3 }}" fail2ban_logtarget: /var/log/fail2ban.log fail2ban_syslog_target: /var/log/fail2ban.log diff --git a/tasks/main.yml b/tasks/main.yml index 9eaa878..820083d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,7 @@ - name: install apt: name: "{{ item }}" - state: "{{ fail2ban_install_state }}" + state: "{{ apt_install_state | default('latest') }}" update_cache: true cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" with_items: "{{ fail2ban_dependencies }}"