|
|
|
@ -62,13 +62,13 @@
|
|
|
|
|
command: mount -a
|
|
|
|
|
when: fstab.changed
|
|
|
|
|
|
|
|
|
|
- name: Set MariaDB Cron to /etc/cron.d
|
|
|
|
|
template:
|
|
|
|
|
src: templates/cron_mariadb
|
|
|
|
|
dest: /etc/cron.d/vn
|
|
|
|
|
owner: root
|
|
|
|
|
group: root
|
|
|
|
|
mode: u=rw,g=r,o=r
|
|
|
|
|
# - name: Set MariaDB Cron to /etc/cron.d
|
|
|
|
|
# template:
|
|
|
|
|
# src: templates/cron_mariadb
|
|
|
|
|
# dest: /etc/cron.d/vn
|
|
|
|
|
# owner: root
|
|
|
|
|
# group: root
|
|
|
|
|
# mode: u=rw,g=r,o=r
|
|
|
|
|
|
|
|
|
|
- name: Insert MySQL certificates
|
|
|
|
|
copy:
|
|
|
|
@ -80,14 +80,6 @@
|
|
|
|
|
loop: "{{ certificates }}"
|
|
|
|
|
notify: restart-mariadb
|
|
|
|
|
|
|
|
|
|
- name: Configure MySQL master cert
|
|
|
|
|
copy:
|
|
|
|
|
content: "{{ lookup(passbolt, 'private_mysql', folder_parent_id=passbolt_folder).description }}"
|
|
|
|
|
dest: /etc/mysql/key.pem
|
|
|
|
|
owner: mysql
|
|
|
|
|
group: mysql
|
|
|
|
|
mode: u=rw,g=,o=
|
|
|
|
|
|
|
|
|
|
- when: production is true
|
|
|
|
|
block:
|
|
|
|
|
- name: Set MariaDB custom configuration Production
|
|
|
|
@ -125,41 +117,14 @@
|
|
|
|
|
- "files/mariaconfigfiles/z92-testing.cnf"
|
|
|
|
|
notify: restart-mariadb
|
|
|
|
|
|
|
|
|
|
# - name: Extracting passwords
|
|
|
|
|
# no_log: true
|
|
|
|
|
# set_fact:
|
|
|
|
|
# jenkins_token: "{{ lookup(passbolt, jenkins_user_name, folder_parent_id=passbolt_folder).password }}"
|
|
|
|
|
|
|
|
|
|
# - name: Debug variable
|
|
|
|
|
# debug:
|
|
|
|
|
# msg: "{{ jenkins_token }}"
|
|
|
|
|
|
|
|
|
|
- name: Set MariaBackup custom configuration Test
|
|
|
|
|
template:
|
|
|
|
|
src: "apply.config-test.sh"
|
|
|
|
|
dest: /root/mariabackup/apply.config.sh
|
|
|
|
|
owner: root
|
|
|
|
|
group: root
|
|
|
|
|
mode: u=rw,g=r,o=r
|
|
|
|
|
# - name: Set MariaBackup custom configuration Test
|
|
|
|
|
# template:
|
|
|
|
|
# src: "apply.config-test.sh"
|
|
|
|
|
# dest: /root/mariabackup/apply.config.sh
|
|
|
|
|
# owner: root
|
|
|
|
|
# group: root
|
|
|
|
|
# mode: u=rw,g=r,o=r
|
|
|
|
|
|
|
|
|
|
- name: Extracting dbusername
|
|
|
|
|
set_fact:
|
|
|
|
|
dbusername: "{{ lookup(passbolt, dbuser, folder_parent_id=passbolt_folder).username }}"
|
|
|
|
|
|
|
|
|
|
- name: Extracting dbpassword
|
|
|
|
|
no_log: true
|
|
|
|
|
set_fact:
|
|
|
|
|
dbpass: "{{ lookup(passbolt, dbuser, folder_parent_id=passbolt_folder).password }}"
|
|
|
|
|
|
|
|
|
|
- name: Extracting MariaBackup UserName
|
|
|
|
|
set_fact:
|
|
|
|
|
mariabackupusernametpl: "{{ lookup(passbolt, mariabackupusername, folder_parent_id=passbolt_folder).username }}"
|
|
|
|
|
|
|
|
|
|
- name: Extracting MariaBackup Password
|
|
|
|
|
no_log: true
|
|
|
|
|
set_fact:
|
|
|
|
|
mariabackuppasstpl: "{{ lookup(passbolt, mariabackupusername, folder_parent_id=passbolt_folder).password }}"
|
|
|
|
|
|
|
|
|
|
- name: Set MariaBackup custom template configuration Test
|
|
|
|
|
template:
|
|
|
|
|
src: "{{ item }}"
|
|
|
|
@ -168,7 +133,7 @@
|
|
|
|
|
group: root
|
|
|
|
|
mode: u=rw,g=,o=
|
|
|
|
|
with_items:
|
|
|
|
|
- "apply.cnf"
|
|
|
|
|
- "test-db/apply.config.sh"
|
|
|
|
|
- "my.cnf"
|
|
|
|
|
|
|
|
|
|
- name: Set MariaDB local configuration file
|
|
|
|
|
Tupla comentada para no hacer ruido mientras se testea. Se deberá descomentar cuando se suba a PRO.