diff --git a/roles/database_backup/database_backup-mysql/tasks/deploy-rolling.yml b/roles/database_backup/database_backup-mysql/tasks/deploy-rolling.yml index 6a264be1..d5d9f941 100644 --- a/roles/database_backup/database_backup-mysql/tasks/deploy-rolling.yml +++ b/roles/database_backup/database_backup-mysql/tasks/deploy-rolling.yml @@ -37,7 +37,8 @@ # Making it clear if we skipped the population of the new database - name: Populating database skipped. - ansible.builtin.debug: "### Attention - the new database was NOT populated!" + ansible.builtin.debug: + msg: "### Attention - the new database was NOT populated!" when: - previous_build_number > 0 - _previous_db_status.rc != 0 diff --git a/roles/database_backup/database_backup-mysql/tasks/deploy.yml b/roles/database_backup/database_backup-mysql/tasks/deploy.yml index 6e60a96d..f6d75658 100644 --- a/roles/database_backup/database_backup-mysql/tasks/deploy.yml +++ b/roles/database_backup/database_backup-mysql/tasks/deploy.yml @@ -82,15 +82,18 @@ _mysql_build_password: "{{ lookup('password', '/dev/shm/{{ project_name }}_{{ build_type }}_{{ build_number }}') }}" when: mysql_backup.credentials_handling == 'rotate' -- ansible.builtin.set_fact: +- name: Set database handling type. + ansible.builtin.set_fact: _mysql_handling: "{{ mysql_backup.handling }}" # If we have a specific instruction for handling this database differently, use it. -- ansible.builtin.set_fact: +- name: Override database handling type for this database, if specified. + ansible.builtin.set_fact: _mysql_handling: "{{ mysql_backup.database.handling }}" when: - mysql_backup.database.handling is defined - mysql_backup.database.handling | length > 0 -- ansible.builtin.include_tasks: "deploy-{{ _mysql_handling }}.yml" +- name: Execute backup tasks. + ansible.builtin.include_tasks: "deploy-{{ _mysql_handling }}.yml" # We append privileges instead of replacing, # to allow this role to be looped over,