when deploying to my staging environment with this command -
ansible-playbook server.yml -e env=staging -vvv
I get the error message (see below).
The conditional check ‘letsencrypt_enabled’ failed. The error was: error
while evaluating conditional (letsencrypt_enabled): [{% for name, site in
wordpress_sites.iteritems() if site.ssl.enabled and site.ssl.provider |
default(‘manual’) == ‘letsencrypt’ %}’{{ name }}’,{% endfor %}]: {u’lc-
dev1.co.uk’: {u’repo_subtree_path’: u’site’, u’multisite’: {u’enabled’:
False}, u’env’: {u’wp_home’: u"{{ item.value.ssl.enabled | default(false) |
ternary(‘https’, ‘http’) }}://${HTTP_HOST}", u’wp_siteurl’:
u’${WP_HOME}/wp’}, u’cache’: {u’enabled’: False}, u’repo’: u’git@github.com
:sb-lc/lc-blogs-trellis.git’, u’ssl’: {u’enabled’: True, u’provider’:
u’letsencrypt’}, u’local_path’: u’…/site’, u’branch’: u’master’,
u’site_hosts’: [u’lc-dev1.co.uk’], u’www_redirect’: True}}: ‘dict object’ has
no attribute 'value’
fatal: [lc-dev1.co.uk]: FAILED! => {“failed”: true}
my group_vars/staging/wordpress_sites.yml -
wordpress_sites:
lc-dev1.co.uk:
site_hosts:
- lc-dev1.co.uk
#www_redirect: true
local_path: …/site # path targeting local Bedrock site directory (relative to Ansible root)
repo: git@github.com:sb-lc/lc-blogs-trellis.git # replace with your Git repo URL
repo_subtree_path: site # relative path to your Bedrock/WP directory in your repo
branch: master
multisite:
enabled: false
ssl:
enabled: true
provider: letsencrypt
cache:
enabled: false
env:
wp_home: "{{ item.value.ssl.enabled | default(false) | ternary(‘https’, ‘http’) }}://${HTTP_HOST}"
wp_siteurl: “${WP_HOME}/wp”