How to debug trellis provision?

I’m trying to debug a failure during provisioning (specifically, for letsencrypt).

I’ve read Troubleshooting | Trellis Docs | Roots

The example it gives (in step 3) is specific for deploying, rather than provisioning:

Re-run the command in verbose mode ansible-playbook deploy.yml -vvvv -e "site=<domain> env=<environment>" if necessary to get more details.

I’ve tried to modify that for provision (server.yml) rather than deployment:

ansible-playbook server.yml -i hosts/production -vvvv -e "env=production" --tags letsencrypt

However, it hangs at the step “Get Ubuntu version”. This is weird, because I normally run trellis provision --tags letsencrypt production and it gets past that step.

I do have a bit of an esoteric SSH setup involving some jump hosts. Ideally trellis CLI and ansible-playbook would operate the same way but they appear not to be, so I’m wondering if it’s possible to just pass some flag to trellis CLI to make it pass the “-vvvv” flags?

Thanks

1 Like

Am I correct in that the trellis CLI does not have any mechanism to call ansible-playbook with the “-vvv” (verbose) option?

I notice there is no verbose option in the source code:

I’ve also tried making it move verbose by passing an environment variable (below) but that didn’t seem to have any verbosity-increasing effect.

trellis provision --extra-vars "ANSIBLE_DEBUG=true ANSIBLE_VERBOSITY=4" --tags letsencrypt production
1 Like

Yeah unfortunately that’s not supported yet, but I’ll open an issue for that and hopefully added it soon.

2 Likes

Added this feature in Add verbose option for Ansible commands by swalkinshaw · Pull Request #231 · roots/trellis-cli · GitHub

I’ll release a new version soon.

edit: released in v1.3.0

2 Likes

This topic was automatically closed after 42 days. New replies are no longer allowed.