summaryrefslogtreecommitdiffstats
path: root/roles/dbreplication/tasks/stunnel.yml
blob: 81eed03f1fe25178e87e9118fb4338980facf410 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
- name: Installation des config stunnel
  template:
    src: "{{ item.name }}"
    dest: "/etc/stunnel/{{ item.dest }}"
    mode: 0644
  loop:
    - { name: 'mariadb-nsa.conf.j2', dest: 'mariadb-nsa.conf' }
    - { name: 'mariadb-nsa-2.conf.j2', dest: 'mariadb-nsa-2.conf' }

- name: Installation des unités systemd
  copy:
    src: "{{ item }}"
    dest: "/etc/systemd/system/"
    owner: root
    group: root
    mode: 0644
  notify:
    - reload systemd
    - launch mariadb nsa
    - launch mariadb nsa 2
  loop:
    - stunnel-mariadb-nsa-2@.service
    - stunnel-mariadb-nsa-2.socket
    - stunnel-mariadb-nsa@.service
    - stunnel-mariadb-nsa.socket

- name: Création du répertoire du chroot
  file:
    path: /var/stunnel/chroot/etc
    state: directory
    mode: 0755

- name: Création des fichiers du chroot
  file:
    path: "/var/stunnel/chroot/etc/{{ item }}"
    state: touch
    mode: 0644
  loop:
    - hosts.allow
    - hosts.deny