Hi Team,
I tried many times by destroying droplet and with fresh setup of trellis, But whenever I enabled SSL(letsencrypt), provision is falling with below error.
Without SSL both provisioning and deployment are success.
I also tried by switching below lines in server.yml, but no luck
- { role: wordpress-setup, tags: [wordpress, wordpress-setup, letsencrypt] }
- { role: letsencrypt, tags: [letsencrypt], when: sites_using_letsencrypt | count }
Provision Error - AnsibleUndefinedVariable:
NOTE: Replaced quicktorial.com to quicktorialcom, due to post rules.
TASK [wordpress-setup : Copy SSL cert] *******************************************************************************************************************************************
skipping: [157.230.128.248] => (item=quicktorialcom)
TASK [wordpress-setup : Copy SSL key] ********************************************************************************************************************************************
skipping: [157.230.128.248] => (item=quicktorialcom)
TASK [wordpress-setup : disable temporary challenge sites] ***********************************************************************************************************************
ok: [XXX.230.128.248] => (item=quicktorialcom)
TASK [wordpress-setup : Create Nginx available sites] ****************************************************************************************************************************
changed: [XXX.230.128.248] => (item={âsrcâ: âno-default.conf.j2â})
changed: [XXX.230.128.248] => (item={âsrcâ: âssl.no-default.conf.j2â, âenabledâ: True})
TASK [wordpress-setup : Enable or disable Nginx sites] ***************************************************************************************************************************
changed: [XXX.230.128.248] => (item={âsrcâ: âno-default.conf.j2â})
changed: [XXX.230.128.248] => (item={âsrcâ: âssl.no-default.conf.j2â, âenabledâ: True})
TASK [wordpress-setup : Create Nginx conf for challenges location] ***************************************************************************************************************
changed: [XXX.230.128.248]
TASK [wordpress-setup : Create WordPress configuration for Nginx] ****************************************************************************************************************
System info:
Ansible 2.7.5; Darwin
Trellis 1.0.0: December 27th, 2018
AnsibleUndefinedVariable: âdict objectâ has no attribute âquicktorialcomâ
failed: [157.230.128.248] (item=quicktorialcom) => {âchangedâ: false, âitemâ: {âkeyâ: âquicktorialcomâ, âvalueâ: {âbranchâ: âmasterâ, âcacheâ: {âenabledâ: true}, âlocal_pathâ: ââŠ/siteâ, âmultisiteâ: {âenabledâ: false}, ârepoâ: "git@github.com:NallaRK/quicktorial.git", ârepo_subtree_pathâ: âsiteâ, âsite_hostsâ: [{âcanonicalâ: âquicktorialcomâ, âredirectsâ: [âwww.quicktorialcomâ]}], âsslâ: {âenabledâ: true, âproviderâ: âletsencryptâ}}}}
RUNNING HANDLER [common : restart memcached] *************************************************************************************************************************************
changed: [157.230.128.248]
I double checked all my configuration, it looks good for me, but must be missing something, please take a look and help me out - Thank you!
production - wordpress_sites.yml:
wordpress_sites:
quicktorial.com:
site_hosts:
- canonical: quicktorial.com
redirects:
- www.quicktorial.com
local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
repo: git@github.com:NallaRK/quicktorial.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: true
staging - wordpress_sites.yml:
No changes, left as is, as I donât need of any staging server at this moment.
development - wordpress_sites.yml:
Modified as per document and working as expected.