Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 0a0f3f8

Browse files
committed
Updating 'default()' filter paths in _init as an initial test.
1 parent 92cd722 commit 0a0f3f8

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

roles/_init/tasks/drupal8.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
- name: Define path to drush for this build.
33
ansible.builtin.set_fact:
4-
drush_bin: "{{ drush_bin | default('{{ deploy_path }}/vendor/bin/drush') }}"
4+
drush_bin: "{{ drush_bin | default(deploy_path + '/vendor/bin/drush') }}"
55

66
- name: Define path to drush for previous build.
77
ansible.builtin.set_fact:
8-
previous_drush_bin: "{{ previous_drush_bin | default('{{ previous_deploy_path }}/vendor/bin/drush') }}"
8+
previous_drush_bin: "{{ previous_drush_bin | default(previous_deploy_path + '/vendor/bin/drush') }}"
99

1010
- name: Define path to drush for currently live build.
1111
ansible.builtin.set_fact:
12-
drush_live_bin: "{{ drush_live_bin | default('{{ live_symlink_dest }}/vendor/bin/drush') }}"
12+
drush_live_bin: "{{ drush_live_bin | default(live_symlink_dest + '/vendor/bin/drush') }}"
1313

1414
- name: Ensure we have a cachetool binary and configuration.
1515
ansible.builtin.import_role:

roles/_init/tasks/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232

3333
- name: Define deploy base path.
3434
ansible.builtin.set_fact:
35-
deploy_base_path: "{{ deploy_base_path | default('/home/{{ deploy_user }}/deploy/{{ project_name }}_{{ build_type }}') }}"
35+
deploy_base_path: "{{ deploy_base_path | default('/home/' + deploy_user + '/deploy/' + project_name + '_' + build_type) }}"
3636

3737
- name: Define mounted directory for assets.
3838
ansible.builtin.set_fact:
39-
deploy_assets_base_path: "{{ deploy_assets_base_path | default('/home/{{ deploy_user }}/shared/{{ project_name }}_{{ build_type }}/assets') }}"
39+
deploy_assets_base_path: "{{ deploy_assets_base_path | default('/home/' + deploy_user + '/shared/' + project_name + '_' + build_type + '/assets') }}"
4040

4141
- name: Define webroot.
4242
ansible.builtin.set_fact:
@@ -53,11 +53,11 @@
5353

5454
- name: Define build deploy path.
5555
ansible.builtin.set_fact:
56-
deploy_path: "{{ deploy_path | default('{{ deploy_path_prefix }}{{ build_number }}') }}"
56+
deploy_path: "{{ deploy_path | default(deploy_path_prefix + build_number) }}"
5757

5858
- name: Define live_symlink dest.
5959
ansible.builtin.set_fact:
60-
live_symlink_dest: "{{ live_symlink_dest | default('{{ deploy_base_path }}/live.{{ project_name }}_{{ build_type }}') }}"
60+
live_symlink_dest: "{{ live_symlink_dest | default(deploy_base_path + '/live.' + project_name + '_' + build_type) }}"
6161

6262
- name: Read the live symlink to get the path to the current build.
6363
ansible.builtin.stat:
@@ -114,11 +114,11 @@
114114

115115
- name: Define live_symlink dest for image builds.
116116
ansible.builtin.set_fact:
117-
live_symlink_build_dest: "{{ live_symlink_build_dest | default('{{ build_base_path }}/live.{{ project_name }}_{{ build_type }}') }}"
117+
live_symlink_build_dest: "{{ live_symlink_build_dest | default(build_base_path + '/live.' + project_name + '_' + build_type) }}"
118118

119119
- name: Overwrite deploy and live_symlink paths if SquashFS deploy.
120120
ansible.builtin.set_fact:
121-
deploy_path: "{{ build_path | default('{{ build_path_prefix }}{{ build_number }}') }}"
121+
deploy_path: "{{ build_path | default(build_path_prefix + build_number) }}"
122122

123123
- name: Overwrite cachetool path if SquashFS deploy and path not provided.
124124
ansible.builtin.set_fact:
@@ -206,7 +206,7 @@
206206

207207
- name: Set the previous deploy's path for later use where we need to manipulate the live site.
208208
ansible.builtin.set_fact:
209-
previous_deploy_path: "{{ previous_deploy_path | default('{{ deploy_path_prefix }}{{ previous_build_number }}') }}"
209+
previous_deploy_path: "{{ previous_deploy_path | default(deploy_path_prefix + previous_build_number) }}"
210210

211211
# Make sure the deploy target exists.
212212
- name: Ensure deploy target directory exists.

0 commit comments

Comments
 (0)