Unable to run server.yml till the end of the file for missing lsb_release

I’m trying to solve some issues with SSL letsencrypt certificates for local development and when I run

sudo ansible-playbook server.yml -e env=environment --tags wordpress

At the task TASK [python_interpreter: Get Ubuntu release] I get the following error

non-zero return code /bin/sh: lsb_release: command not found
fatal: []: FAILED! => {"changed": false, "rc": 127, "stderr_lines": ["/bin/sh: lsb_release: command not found"], "stdout": "", "stdout_lines": []} to retry, use: --limit @/Users/***/***/trellis/server.retry

PLAY RECAP ********************************************************************************************************* : ok=4 changed=0 unreachable=0 failed=1

I’ve ssh into the vagrant machine and checked if lsb_release is there and it’s actually installed.

Have you experienced a similar issue?

What’s your local environment like? Are you on OSX just running this as usual on a Vagrant VM?

Local development should all be done through the dev.yml playbook and not server.yml.

1 Like

MacOS Mojave 10.14.2 as os and, yes, I’m running a new trellis installation (Vagrant).
I’m running this command sudo ansible-playbook server.yml -e env=environment --tags wordpress cause I discovered it in the Troubleshooting Let’s Encrypt section here

I was getting something similar… except it was complaining “Incorrect sudo password” which I thought was a bit weird since lsb_release doesn’t need sudo…

Fixed by adding become: false to role, but not sure thats actually the fix as it seems to keep putting in a bad sudo elsewhere…

one thing I have noticed… ansible’s errors are sometimes waay off track…
in my case it was because the host name was incorrect in my inventory… So you might want to check all your hosts and vars for typos first

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