I have two sites within a Trellis-managed server:
trellis
example.com
example2.com
I want to run certain build_before tasks for each deploy
./bin/deploy.sh env example.com
./bin/deploy.sh env example2.com
In this case the only change are the paths to the theme directories:
- name: Install npm dependencies site one
command: yarn
delegate_to: localhost
args:
chdir: "{{ project_local_path }}/web/app/themes/example-theme"
etc...
- name: Install npm dependencies site two
command: yarn
delegate_to: localhost
args:
chdir: "{{ project_local_path }}/web/app/themes/example-two-theme"
etc...
I imagine I need to check for the wordpress_sites
value, but I’m not sure how or where I would reference that key
and make the comparison.