'sudoer_passwords' is undefined (LXD)

I’ve run into this issue and I can’t find a solution.

I’m trying to provision a local development environment, using admin_user: root.

I’ve run through the steps numerous times but I keep seeing the same error:

'sudoer_passwords' is undefined fatal: []: FAILED! => {"failed": true}

Am I correct in thinking I only need to set up sudoer passwords if using the admin user?

I’ve got the latest version of trellis.

I’m running ansible on Ubuntu 14.04.4 on both host and VM.

So I tried going back to Vagrant/Virtualbox and everything works fine.

This issue seems to only affect LXD based containers.

Now I wonder what might be causing this?

Both Ansible and LXD have had major upgrades recently.

@treb0r The sudoer password definitions are used in the users role. Standard Trellis runs dev.yml for development and server.yml for staging/production. Given that dev.yml does not run the users role, roots/trellis#560 removed the unused sudoer password definitions from group_vars/development.

However, I see that you are probably provisioning your LXD container as development using server.yml. This means the users role will run and need the sudoer password definitions, but will no longer find them in group_vars/development.

You could evaluate whether it better suits your needs to use dev.yml instead, or to add back in the sudoer password definitions that were removed in roots/trellis#560.

1 Like

@fullyint that’s great, thanks.

I decided to add back the sudoer definitions for now and I’m back up and running in LXD land.

I need to keep a closer eye on the commit log for trellis!