Hello, I get this error when attempting to provision my development environment.
TASK [nginx : Generate strong unique Diffie-Hellman group.] ********************
System info:
Ansible 2.4.3.0; Vagrant 2.0.2; Darwin
Trellis at "Add support for includes.d on all sites"
---------------------------------------------------
The conditional check 'sites_use_ssl' failed. The error was: error while
evaluating conditional (sites_use_ssl): 'sites_use_ssl' is undefined
The error appears to have been in
'/path/trellis/roles/nginx/tasks/main.yml':
line 19, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Generate strong unique Diffie-Hellman group.
^ here
fatal: [default]: FAILED! => {}
As implied by @ben, could you double-check that your group_vars/all/helpers.yml has the sites_use_ssl variable definition?
Sometimes people clone or update Trellis, then copy in their existing group_vars files, not realizing the copying effectively removes vars that were new in group_vars.
I have a similar question but not identical.
Not sure if it’s best to post here or to start a new thread.
I have a problem with ‘dict object’
The conditional check ‘sites_use_ssl’ failed. The error was: error while
evaluating conditional (sites_use_ssl): ‘dict object’ has no attribute ‘ssl’
The error appears to have been in
‘/Users/axyz/sites/navfe2.com/trellis/roles/nginx/tasks/main.yml’: line 19,
column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
Your server needs to be publicly accessible on the domain you’re attempting to generate a certificate for in order for Let’s Encrypt to generate a certificate.
To add on to @alwaysblank’s answer, you can provision a server with SSL set to false and then repoint DNS, and reprovision with SSL set to true after propagation completes. This is completely safe and it’s how I tend to launch sites. The world sees a non-SSL version of the site for about 10 minutes while DNS and provisioning catch up.