diff --git a/roles/db/defaults/main.yaml b/roles/db/defaults/main.yaml index 81e7852..61f6c73 100644 --- a/roles/db/defaults/main.yaml +++ b/roles/db/defaults/main.yaml @@ -44,3 +44,8 @@ downloads: - url: https://repo.percona.com/apt/percona-release_latest.generic_all.deb dest: /tmp/percona-release_latest.generic_all.deb mode: u=rw,g=r,o=r +clean_config_and_scripts: + - { path: /root/scripts/events-promote.sh } + - { path: /root/scripts/events-demote.sh } + - { path: /root/scripts/promote-master.sh } + - { path: /root/scripts/promote-slave.sh } \ No newline at end of file diff --git a/roles/db/tasks/mariadb.yml b/roles/db/tasks/mariadb.yml index 806125a..db09ac0 100644 --- a/roles/db/tasks/mariadb.yml +++ b/roles/db/tasks/mariadb.yml @@ -122,3 +122,9 @@ - name: Mount all filesystems from /etc/fstab command: mount -a when: fstab.changed + +- name: Clean old configs or scripts + file: + path: "{{ item.path }}" + state: absent + loop: "{{ clean_config_and_scripts }}"