When trying to provision my production environment I get an error at the following task:
TASK [letsencrypt : Create needed Nginx confs for challenges]
As far as I can tell I’ve done everything correctly for setting up LetsEncrypt. However, this is my first time trying out Trellis.
I am running:
Host:
macOS 10.12.2
Vagrant 1.9.1
VirtualBox 5.1.12
vagrant-bindfs
vagrant-hostmanager
Development VM (Setup with Vagrant):
Ubuntu 16.04
Ansible 2.2.0.0
Remote Server:
DigitalOcean
Ubuntu 16.04
GitHub Repo:
here
Here is the full error report:
TASK [letsencrypt : Create needed Nginx confs for challenges] ****************** task path: /Users/kasey/GitHub/trellis-test/trellis/roles/letsencrypt/tasks/nginx.yml:15 System info: Ansible 2.2.0.0; Darwin Trellis at "Fix #727 - HSTS: default preload to off" --------------------------------------------------- UnboundLocalError: local variable 'l_1_item' referenced before assignment failed: [138.197.204.24] (item={'_ansible_parsed': True, u'stat': {u'exists': False}, '_ansible_item_result': True, '_ansible_no_log': False, u'changed': False, 'item': {'value': {u'repo_subtree_path': u'site', u'multisite': {u'enabled': False}, u'env': {u'wp_home': u'https://staging.kcfeatures.com', u'wp_siteurl': u'https://staging.kcfeatures.com/wp'}, u'cache': {u'enabled': True}, u'repo': u'git@github.com:kculmback/trellis-test.git', u'ssl': {u'enabled': True, u'provider': u'letsencrypt'}, u'local_path': u'../site', u'branch': u'master', u'site_hosts': [{u'canonical': u'staging.kcfeatures.com'}]}, 'key': u'staging.kcfeatures.com'}, 'invocation': {'module_name': u'stat', u'module_args': {u'checksum_algorithm': u'sha1', u'mime': False, u'get_checksum': True, u'follow': False, u'path': u'/etc/nginx/sites-enabled/staging.kcfeatures.com.conf', u'get_md5': True}}}) => { "failed": true, "invocation": { "module_args": { "dest": "/etc/nginx/sites-available/letsencrypt-staging.kcfeatures.com.conf", "src": "nginx-challenge-site.conf.j2" }, "module_name": "template" }, "item": { "changed": false, "invocation": { "module_args": { "checksum_algorithm": "sha1", "follow": false, "get_checksum": true, "get_md5": true, "mime": false, "path": "/etc/nginx/sites-enabled/staging.kcfeatures.com.conf" }, "module_name": "stat" }, "item": { "key": "staging.kcfeatures.com", "value": { "branch": "master", "cache": { "enabled": true }, "env": { "wp_home": "https://staging.kcfeatures.com", "wp_siteurl": "https://staging.kcfeatures.com/wp" }, "local_path": "../site", "multisite": { "enabled": false }, "repo": "git@github.com:kculmback/trellis-test.git", "repo_subtree_path": "site", "site_hosts": [ { "canonical": "staging.kcfeatures.com" } ], "ssl": { "enabled": true, "provider": "letsencrypt" } } }, "stat": { "exists": false } } }
Any help would be greatly appreciated!