summaryrefslogtreecommitdiffstats
path: root/roles/dbreplication/tasks/stunnel.yml
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2023-01-13 21:51:19 +0100
committerMatthieu Saulnier <fantom@fedoraproject.org>2023-01-13 21:51:19 +0100
commit656ae1644ecb35a6f31a87f8fcbbfa49066aa6c2 (patch)
tree5450ea37ea3282109d6dec2b1eefe1ce20a8eabc /roles/dbreplication/tasks/stunnel.yml
parentc3000bf8d6d2ebf9b7d4bec6c19d33f97724a145 (diff)
downloadplaybooks-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/stunnel.yml')
-rw-r--r--roles/dbreplication/tasks/stunnel.yml38
1 files changed, 38 insertions, 0 deletions
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