wunderio/WunderMachina

php-fpm role fails in template file

Closed this issue · 1 comments

./provision.sh -t php-fpm stage
...

TASK [php-fpm : template] ******************************************************************************************************************
fatal: [hostname]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'unicode object' has no attribute 'key'"}

Traced the issue to a template file...

{% for variable in php_env_vars %}
env[{{ variable.key }}] = "{{ variable.value }}"
{% endfor %}

... that loads the following:

php_env_vars:
  - key: "WKV_SITE_ENV"
    value: "{{ wkv_site_env }}"
❯ ansible --version
ansible 2.3.0.0

Databases need to have host: defined.