File tree Expand file tree Collapse file tree 4 files changed +3
-54
lines changed
cache_clear/cache_clear-drupal8/tasks
sync/database_sync/database_sync-mysql/tasks Expand file tree Collapse file tree 4 files changed +3
-54
lines changed Original file line number Diff line number Diff line change 116
116
ansible.builtin.set_fact :
117
117
live_symlink_build_dest : " {{ live_symlink_build_dest | default('{{ build_base_path }}/live.{{ project_name }}_{{ build_type }}') }}"
118
118
119
- - name : Set the previous deploy's path for later use where we need to manipulate the live site.
120
- ansible.builtin.set_fact :
121
- previous_deploy_path : " {{ previous_deploy_path | default('{{ deploy_path_prefix }}{{ previous_build_number }}') }}"
122
-
123
119
- name : Overwrite deploy and live_symlink paths if SquashFS deploy.
124
120
ansible.builtin.set_fact :
125
121
deploy_path : " {{ build_path | default('{{ build_path_prefix }}{{ build_number }}') }}"
Original file line number Diff line number Diff line change 8
8
- name : Override deploy_path.
9
9
set_fact :
10
10
deploy_path : " {{ live_symlink_dest }}"
11
-
12
- - name : Truncate table cache_container.
13
- ansible.builtin.command :
14
- cmd : " {{ drush_bin }} sql-query 'TRUNCATE TABLE cache_container'"
15
- chdir : " {{ deploy_path }}/{{ webroot }}/sites/{{ site_drupal.folder }}"
16
- become : " {{ 'no' if www_user == deploy_user else 'yes' }}"
17
- become_user : " {{ www_user }}"
18
- with_items : " {{ drupal.sites }}"
19
- loop_control :
20
- loop_var : site_drupal
21
- run_once : true
22
- register : _drush_output
23
- when : drupal.truncate_cache_table
24
-
25
- - name : Show drush output.
26
- ansible.builtin.debug :
27
- msg : " {{ _drush_output }}"
28
- when :
29
- - drupal.drush_verbose_output
30
- - drupal.truncate_cache_table
31
11
when :
32
12
- deploy_code.mount_type is defined
33
13
- deploy_code.mount_type == "squashfs"
Original file line number Diff line number Diff line change 35
35
state : present
36
36
when : drupal.cron_mailto is defined
37
37
delegate_to : " {{ 'localhost' if drupal.defer else inventory_hostname }}"
38
- become : true
39
-
40
- # - name: Remove existing MAILTO entry (if any)
41
- # community.general.cronvar:
42
- # name: MAILTO
43
- # state: absent
44
- # delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"
45
-
46
- # - name: Set global MAILTO for cron jobs (if defined)
47
- # community.general.cronvar:
48
- # name: MAILTO
49
- # value: "{{ drupal.cron_mailto | default(omit) }}"
50
- # state: present
51
- # when: drupal.cron_mailto is defined and drupal.cron_mailto | length > 0
52
- # delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"
53
38
54
39
- name : Setup Drupal cron tasks on app server.
55
40
ansible.builtin.cron :
Original file line number Diff line number Diff line change 47
47
when :
48
48
- mysql_sync.archival_method == 'gzip'
49
49
50
- - name : Register remote dump name (from database) - BZIP2 .
50
+ - name : Register remote dump name (from database).
51
51
ansible.builtin.set_fact :
52
52
mysql_sync_source_dump_path : " /tmp/{{ database.source.database }}_{{ build_number }}_source.sql.{{ archive_file_type }}"
53
53
when :
128
128
ansible.builtin.set_fact :
129
129
mysql_sync_target_dump_unpacked_path : " /tmp/{{ database.target.database }}_{{ build_number }}_target.sql"
130
130
131
- - name : Register tmp target dump name - GZIP.
132
- ansible.builtin.set_fact :
133
- mysql_sync_target_dump_path : " /tmp/{{ database.target.database }}_{{ build_number }}_target.sql.gz"
134
- when :
135
- - mysql_sync.use_gzip
136
-
137
- - name : Register tmp unpacked target dump name.
138
- ansible.builtin.set_fact :
139
- mysql_sync_target_dump_unpacked_path : " /tmp/{{ database.target.database }}_{{ build_number }}_target.sql"
140
-
141
131
- name : Get target last known good build number.
142
132
ansible.builtin.command :
143
133
argv :
180
170
ansible.builtin.shell : " {{ archival_command }} -d -c {{ mysql_sync_target_dump_path }} > {{ mysql_sync_target_dump_unpacked_path }}"
181
171
args :
182
172
executable : /bin/bash
183
- when :
184
- - not mysql_sync.use_gzip
185
173
186
- - name : Delete temporary unpacked dump file on target.
174
+ - name : Delete temporary dump file on target.
187
175
ansible.builtin.file :
188
- path : " {{ mysql_sync_target_dump_unpacked_path }}"
176
+ path : " {{ mysql_sync_target_dump_path }}"
189
177
state : absent
190
178
191
179
- name : Drop target database.
You can’t perform that action at this time.
0 commit comments