library/roles: Try and fix the fail2ban conditionals, again.

xen/host_vars/dlib28x.dom0.research-infrastructures.eu: add dlib28x.dom0.research-infrastructures.eu
This commit is contained in:
Andrea Dell'Amico 2015-08-07 11:25:06 +02:00
parent 954ee7c25a
commit 4b06f84618
6 changed files with 8 additions and 7 deletions

View File

@ -2,16 +2,14 @@
# Fail2ban # Fail2ban
# Needed by the fail2ban template # Needed by the fail2ban template
cm_ip: 146.48.123.18
monitoring_ip: 146.48.123.23
# ban time in seconds. 86400 == 1 day # ban time in seconds. 86400 == 1 day
f2b_ban_time: 86400 f2b_ban_time: 86400
f2b_findtime: 600 f2b_findtime: 600
f2b_maxretry: 5 f2b_maxretry: 5
f2b_default_backend: auto f2b_default_backend: auto
f2b_usedns: warn f2b_usedns: warn
f2b_dest_email: sysadmin@research-infrastructures.eu f2b_dest_email: 'sysadmin@{{ domain_name }}'
f2b_sender_email: denyhosts@research-infrastructures.eu f2b_sender_email: 'denyhosts@{{ domain_name }}'
f2b_default_banaction: iptables-multiport f2b_default_banaction: iptables-multiport
# Default action: ban. Not send email # Default action: ban. Not send email
f2b_default_action: action_ f2b_default_action: action_

View File

@ -1,6 +1,6 @@
--- ---
- name: Restart fail2ban - name: Restart fail2ban
service: name=fail2ban state=restarted enabled=yes service: name=fail2ban state=restarted enabled=yes
when: ( is_trusty ) or ( is_debian8 ) when: has_fail2ban

View File

@ -1,3 +1,3 @@
--- ---
- include: fail2ban.yml - include: fail2ban.yml
when: ( is_trusty ) or ( is_debian8 ) when: has_fail2ban

View File

@ -22,5 +22,5 @@
- name: Restart fail2ban - name: Restart fail2ban
service: name=fail2ban state=restarted enabled=yes service: name=fail2ban state=restarted enabled=yes
when: ( is_trusty ) or ( is_debian8 ) when: has_fail2ban

View File

@ -103,6 +103,8 @@ has_htop: "'{{ ansible_distribution }}' == 'Ubuntu' and ({{ ansible_distribution
has_apt: "('{{ ansible_distribution }}' == 'Debian' or '{{ ansible_distribution }}' == 'Ubuntu') and '{{ ansible_distribution_version }}' != 'lenny/sid' and '{{ ansible_lsb['major_release'] }}' >= 5" has_apt: "('{{ ansible_distribution }}' == 'Debian' or '{{ ansible_distribution }}' == 'Ubuntu') and '{{ ansible_distribution_version }}' != 'lenny/sid' and '{{ ansible_lsb['major_release'] }}' >= 5"
has_fail2ban: "(('{{ ansible_distribution }}' == 'Ubuntu') and ({{ ansible_distribution_major_version }} >= 14)) or (('{{ ansible_distribution }}' == 'Debian') and ({{ ansible_lsb['major_release'] }} >= 8))"
is_debian: "'{{ ansible_distribution }}' == 'Debian'" is_debian: "'{{ ansible_distribution }}' == 'Debian'"
is_debian8: "'{{ ansible_distribution_release }}' == 'jessie'" is_debian8: "'{{ ansible_distribution_release }}' == 'jessie'"
is_debian7: "'{{ ansible_distribution_release }}' == 'wheezy'" is_debian7: "'{{ ansible_distribution_release }}' == 'wheezy'"

View File

@ -80,5 +80,6 @@
- name: Install additional packages, if any - name: Install additional packages, if any
apt: pkg={{ item }} state={{ pkg_state }} apt: pkg={{ item }} state={{ pkg_state }}
with_items: additional_packages with_items: additional_packages
when: additional_packages is defined
tags: [ 'packages', 'common_pkgs', 'additional_packages' ] tags: [ 'packages', 'common_pkgs', 'additional_packages' ]