Hello,
I’ve been working with bedrock-ansible and bedrock have a different folder structure than suggested in bedrock-ansible docs.
I changed deploy.sh
script to accept a thirs argument:
DEPLOY_CMD="ansible-playbook -i hosts/$1 deploy.yml --extra-vars="site=$2 theme=$3""
Then I wanted to utilize the {{ theme }}
variable here:
project_pre_build_commands_local:
- path: "{{ project.local_path }}/web/app/themes/{{ theme }}"
cmd: npm install
- path: "{{ project.local_path }}/web/app/themes/{{ theme }}"
cmd: bower install
- path: "{{ project.local_path }}/web/app/themes/{{ theme }}"
cmd: gulp --production
This way I cen run build command from one bedrock-ansible
install for every site separately and there are no directory confilicts.
However, the shell errors out:
msg: cannot change to directory ‘/home/ltarasiewicz/dev/bedrock-stack/bedrock-ansible/{# project.local_path #}/web/app/themes/{# theme #}’: path does not exist
As soon as I remove {{ theme }}
from paths in project_pre_build_commands_local
, everything is back to normal. {{ project.local_path }}
is interpreted correctly.
What am I missing here? Why am I not able to pass the {{ theme }}
parameter to my Ansible commands?