Browse Source

some fixes for debian 10

Thomas Buck 3 years ago
parent
commit
36571bace7
2 changed files with 25 additions and 0 deletions
  1. 13
    0
      roles/common/tasks/postgres.yml
  2. 12
    0
      roles/common/tasks/security.yml

+ 13
- 0
roles/common/tasks/postgres.yml View File

11
     - python-psycopg2
11
     - python-psycopg2
12
   tags:
12
   tags:
13
     - dependencies
13
     - dependencies
14
+  when: ansible_distribution_version == '9'
15
+
16
+- name: Install Postgres
17
+  apt:
18
+    name: "{{ packages }}"
19
+    state: present
20
+  vars:
21
+    packages:
22
+    - postgresql
23
+    - python-psycopg2
24
+  tags:
25
+    - dependencies
26
+  when: ansible_distribution_version == '10'
14
 
27
 
15
 - name: Set password for PostgreSQL admin user
28
 - name: Set password for PostgreSQL admin user
16
   become: true
29
   become: true

+ 12
- 0
roles/common/tasks/security.yml View File

12
 
12
 
13
 - name: add stretch-backport for fail2ban with IPv6 support
13
 - name: add stretch-backport for fail2ban with IPv6 support
14
   apt_repository: repo='deb http://deb.debian.org/debian stretch-backports main' state=present update_cache=yes
14
   apt_repository: repo='deb http://deb.debian.org/debian stretch-backports main' state=present update_cache=yes
15
+  tags:
16
+    - dependencies
17
+  when: ansible_distribution_version == '9'
15
 
18
 
16
 - name: Install newer fail2ban with IPv6 support
19
 - name: Install newer fail2ban with IPv6 support
17
   apt:
20
   apt:
20
     default_release: stretch-backports
23
     default_release: stretch-backports
21
   tags:
24
   tags:
22
     - dependencies
25
     - dependencies
26
+  when: ansible_distribution_version == '9'
27
+
28
+- name: Install fail2ban
29
+  apt:
30
+    name: "fail2ban"
31
+    state: present
32
+  tags:
33
+    - dependencies
34
+  when: ansible_distribution_version == '10'
23
 
35
 
24
 - name: Copy fail2ban configuration into place
36
 - name: Copy fail2ban configuration into place
25
   template: src=etc_fail2ban_jail.local.j2 dest=/etc/fail2ban/jail.local
37
   template: src=etc_fail2ban_jail.local.j2 dest=/etc/fail2ban/jail.local

Loading…
Cancel
Save