Why am I getting 'sudo: sorry, you must have a tty to run sudo' when running an Ansible playbook?

Solution Verified - Updated -

Issue

I am receiving the following error message when running the Ansible Automation Platform installer or running any playbook against a managed host.

TASK [awx_install : Migrate the Tower database schema (may take awhile when upgrading).] ***
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "sudo: sorry, you must have a tty to run sudo\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}

Environment

  • Ansible Automation Platform 1.2+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content