Hi guys,
I searched a lot but I can’t find a solution for this issue.
My problem is based on this topic but is a little bit different. I’m trying to add a custom environment variable called ACF_PRO_KEY
inside the .env file, with its value set by an Ansible variable.
So I customized the group_vars/<environment>/vault.yml
file as follow:
# Documentation: https://roots.io/trellis/docs/vault/
vault_mysql_root_password: devpw
# Advanced Custom Field Pro license key, see https://github.com/PhilippBaschke/acf-pro-installer
vault_acf_pro_key: myACFkey
# Variables to accompany `group_vars/development/wordpress_sites.yml`
# Note: the site name (`example.com`) must match up with the site name in the above file.
vault_wordpress_sites:
example.com:
admin_password: admin
env:
db_password: example_dbpassword
acf_pro_key: "{{ vault_acf_pro_key }}"
When I re-provision/deploy (based on which environment we are interested in), the .env file contains the ACF_PRO_KEY
variable, but the value is ACF_PRO_KEY='{{ vault_acf_pro_key }}'
instead of ACF_PRO_KEY='myACFkey'
.
I’ve experienced this issue with Trellis 0.9.9 and the latest version downloaded directly from the GitHub master branch. But it works as expected with Trellis 0.9.6.
Is this a bug with the latest versions? I would like to use Ansible variables as value for custom environment variables, thank you.