diff options
author | Matthieu Saulnier <fantom@fedoraproject.org> | 2023-01-13 21:51:19 +0100 |
---|---|---|
committer | Matthieu Saulnier <fantom@fedoraproject.org> | 2023-01-13 21:51:19 +0100 |
commit | 656ae1644ecb35a6f31a87f8fcbbfa49066aa6c2 (patch) | |
tree | 5450ea37ea3282109d6dec2b1eefe1ce20a8eabc /roles/dbreplication/tasks | |
parent | c3000bf8d6d2ebf9b7d4bec6c19d33f97724a145 (diff) | |
download | playbooks-ansible-656ae1644ecb35a6f31a87f8fcbbfa49066aa6c2.tar.gz playbooks-ansible-656ae1644ecb35a6f31a87f8fcbbfa49066aa6c2.tar.xz playbooks-ansible-656ae1644ecb35a6f31a87f8fcbbfa49066aa6c2.zip |
Add stunnel config in dbreplication role
Diffstat (limited to 'roles/dbreplication/tasks')
-rw-r--r-- | roles/dbreplication/tasks/main.yml | 2 | ||||
-rw-r--r-- | roles/dbreplication/tasks/pkgs.yml | 4 | ||||
-rw-r--r-- | roles/dbreplication/tasks/stunnel.yml | 38 |
3 files changed, 44 insertions, 0 deletions
diff --git a/roles/dbreplication/tasks/main.yml b/roles/dbreplication/tasks/main.yml index a61319c..2b3975a 100644 --- a/roles/dbreplication/tasks/main.yml +++ b/roles/dbreplication/tasks/main.yml @@ -1 +1,3 @@ - import_tasks: crt.yml +- import_tasks: pkgs.yml +- import_tasks: stunnel.yml diff --git a/roles/dbreplication/tasks/pkgs.yml b/roles/dbreplication/tasks/pkgs.yml new file mode 100644 index 0000000..776de24 --- /dev/null +++ b/roles/dbreplication/tasks/pkgs.yml @@ -0,0 +1,4 @@ +- name: Installation de stunnel + package: + name: "stunnel" + state: present diff --git a/roles/dbreplication/tasks/stunnel.yml b/roles/dbreplication/tasks/stunnel.yml new file mode 100644 index 0000000..b24580d --- /dev/null +++ b/roles/dbreplication/tasks/stunnel.yml @@ -0,0 +1,38 @@ +- 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 + +- name: Création des fichiers du chroot + file: + path: "/var/stunnel/chroot/etc/{{ item }}" + state: touch + loop: + - hosts.allow + - hosts.deny |