Updating Trellis: SSL Error for 'site_uses_letsencrypt'

Hi guys!

I’ve updated Trellis (cherry picking; only the deploy-hooks are left behind). The following error appears when trying to run the ansible-playbook server.yml command. I’m guessing this has to do with the changes. Has anyone run into the same error?

And besides the error, what would be the best to get the latest changes to an existing install?

The error:

The conditional check 'site_uses_letsencrypt' failed. The error was: error
while evaluating conditional (site_uses_letsencrypt): 'ssl_enabled' is
undefined

The error appears to have been in
'Path../trellis/roles/letsencrypt/tasks/nginx.yml':
line 7, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Get list of hosts in current Nginx conf
  ^ here

fatal: [IP]: FAILED! => {"failed": true}

Thanks!

I use Chris’s subtree techniques he posted a while back.

The error you’re posting looks like it could be a YAML syntax issue (likely some bad spacing made its way into the playbook).

Try running the server.yml with the -vvvv flags to get more verbose output from your provision and check any playbooks on your end against the repo to make sure the spacing matches up.

@cfx Thanks for your reply. I’ve used the repo file for the server.yml, to make sure no indents or mistakes are left. Unfortunately without result.

Perhaps the changes related to Let’s Encrypt update could have something to do with it. #630

(The steps for) Existing servers that do NOT need to add hosts to site_hosts

  • Update trellis (get changes from this PR)
  • Run ansible-playbook server.yml -e env=< environment > --tags letsencrypt

Unfortunately the issue still remains. Previous update time was around #685 from the changelog.

Given the error 'ssl_enabled' is undefined, you could figure you likely have a problem with the ssl_enabled variable. Check where does ssl_enabled appear in Trellis and check that your own project includes it too.

Digging into the Trellis repo, you’ll see that ssl_enabled appeared in Trellis Dec 29, 2016 in roots/trellis#721 (several weeks before #630 was merged Jan 22, 2017).

2 Likes

@fullyint Your absolutely right. I have missed the variable two times inside group_vars/all/helpers.yml .

This shows that cherry picking (although using Kaleidoscope) is prone to errors. Thanks for helping me sort it out!

P.s.
For others: I had to reboot my droplet in order for the new PHP version (7.1) to be effective.

2 Likes