Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/roles/cache_clear/cache_clear-opcache.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cache_clear_opcache:
# Bins to clear.
clear_opcache: true
clear_apcu: false
clear_stat: false
clear_stat: true
# cachetool_bin: "/path/to/cachetool.phar" # see _init for paths if undefined

```
Expand Down
3 changes: 3 additions & 0 deletions docs/roles/database_backup/database_backup-mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ mysql_backup:
handling: rolling
dumps_directory: "/home/{{ deploy_user }}/shared/{{ project_name }}_{{ build_type }}/db_backups/mysql/build"
mysqldump_params: "{{ _mysqldump_params }}" # set in _init but you can override here
# Location on deploy server where the generated MySQL password will be stashed - should be temporary storage
mysql_password_path: "/tmp/.ce-deploy/{{ project_name }}_{{ build_type }}_{{ build_number }}"
# Number of dumps/db to keep. Note this is independant from the build codebases.
keep: 10
# This can be one of the following:
Expand All @@ -27,6 +29,7 @@ mysql_backup:
credentials_file: "/home/{{ deploy_user }}/.mysql.creds"
#handling: static # optional override to the main handling method on a per database basis


```

<!--ENDROLEVARS-->
Expand Down
2 changes: 1 addition & 1 deletion roles/cache_clear/cache_clear-opcache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cache_clear_opcache:
# Bins to clear.
clear_opcache: true
clear_apcu: false
clear_stat: false
clear_stat: true
# cachetool_bin: "/path/to/cachetool.phar" # see _init for paths if undefined

```
Expand Down
3 changes: 3 additions & 0 deletions roles/database_backup/database_backup-mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ mysql_backup:
handling: rolling
dumps_directory: "/home/{{ deploy_user }}/shared/{{ project_name }}_{{ build_type }}/db_backups/mysql/build"
mysqldump_params: "{{ _mysqldump_params }}" # set in _init but you can override here
# Location on deploy server where the generated MySQL password will be stashed - should be temporary storage
mysql_password_path: "/tmp/.ce-deploy/{{ project_name }}_{{ build_type }}_{{ build_number }}"
# Number of dumps/db to keep. Note this is independant from the build codebases.
keep: 10
# This can be one of the following:
Expand All @@ -27,6 +29,7 @@ mysql_backup:
credentials_file: "/home/{{ deploy_user }}/.mysql.creds"
#handling: static # optional override to the main handling method on a per database basis


```

<!--ENDROLEVARS-->
Expand Down
2 changes: 2 additions & 0 deletions roles/database_backup/database_backup-mysql/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ mysql_backup:
handling: rolling
dumps_directory: "/home/{{ deploy_user }}/shared/{{ project_name }}_{{ build_type }}/db_backups/mysql/build"
mysqldump_params: "{{ _mysqldump_params }}" # set in _init but you can override here
# Location on deploy server where the generated MySQL password will be stashed - should be temporary storage
mysql_password_path: "/tmp/.ce-deploy/{{ project_name }}_{{ build_type }}_{{ build_number }}"
# Number of dumps/db to keep. Note this is independant from the build codebases.
keep: 10
# This can be one of the following:
Expand Down
7 changes: 6 additions & 1 deletion roles/database_backup/database_backup-mysql/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
- _legacy_static_creds.stat.exists
### End of legacy handling.

- name: Ensure the temporary password directory exists.
ansible.builtin.file:
state: directory
path: "{{ mysql_backup.mysql_password_path }}"

- ansible.builtin.set_fact:
_mysql_build_password: "{{ lookup('password', '{{ _ce_deploy_data_dir }}/{{ project_name }}_{{ build_type }}/mysql/{{ _mysql_host }}/{{ database.database }}') }}"
when: mysql_backup.credentials_handling == 'static'
Expand All @@ -79,7 +84,7 @@
_mysql_build_user_name: "{{ database.user }}_{{ build_number }}"
when: mysql_backup.credentials_handling == 'rotate'
- ansible.builtin.set_fact:
_mysql_build_password: "{{ lookup('password', '/dev/shm/{{ project_name }}_{{ build_type }}_{{ build_number }}') }}"
_mysql_build_password: "{{ lookup('password', '{{ mysql_backup.mysql_password_path }}') }}"
when: mysql_backup.credentials_handling == 'rotate'

- name: "Set database handling type to {{ mysql_backup.handling }}."
Expand Down