Trellis provisioning ansible server yml fails when root login not permitted

@merchantguru
I discovered several hours ago that Ansible 2.2.1.0 was handling the sudo password differently than earlier versions. A fix was pushed in roots/trellis#758.

Assuming you are running 2.2.1.0 and were affected by the issue in roots/trellis#758, I believe your procedure effectively changed the password on your server to
{% raw %}my_password{% endraw %}

I recommend these steps to get your password back to normal and working:

  1. Apply the fix from roots/trellis#758

  2. Run the users role to change your password back to normal on the server
    ansible-playbook server.yml -e env=production --tags users -K
    When prompted, enter your password as {% raw %}my_password{% endraw %}
    which just allows admin to invoke sudo this time, and change your password back to the version that omits {% raw %}.

Going forward, you shouldn’t need --ask-become-pass. Things should be back to normal.

Most users will only need step #1. Step #2 is necessary only for users who took steps similar to what @merchantguru described, and now need to change the password back to normal on the server.

3 Likes