What does "localhost | FAILED => Missing become password" mean? How do I get past it?


Solution 1

The problem is related to sudo. In /etc/ansible/ansible.cfg there is a commented out setting called ask_sudo_pass which needs to be uncommented out and set to Yes. Alternatively you can set the group the user belongs to to be able to use sudo without a password, but that's a security risk in my opinion.

Solution 2

There was a bug introduced in Ansible 1.9 that may be the cause: ask_sudo_pass in ansible.cfg has no effect #10891


Related videos on Youtube

Author by



Updated on September 18, 2022


  • thenetimp
    thenetimp almost 2 years

    I have a Ubuntu 14.04 virtual machine set up in virtualbox and I am trying to follow these instructions.


    When I get to the module section and try to install nginx with this command. with "local" being set to "localhost" in /etc/ansible/hosts

    ansible local -s -m shell -a 'apt-get install nginx'

    I get the following error:

    localhost | FAILED => Missing become password

    I have searched google for a way to get past this, but I do not understand what I am doing wrong.

    This was a fresh install of the Server OS, and the only setup was done is in this tutorial.

    • ceejayoz
      ceejayoz about 9 years
      Sounds like the account you're running as doesn't have sudo privileges.
    • thenetimp
      thenetimp about 9 years
      It does. It's the account made at software installation. I even made it so it doesn't require a password because I thought that may have been related to the problem