How do I escalate privilege of su when running Ansible Commands?

Solution Verified - Updated -


  • Setting ansible_become_method to either sudo or su both fails
  • The user specified in ansible_become_user only has sudo access to su
  • Can manually run commands with sudo su - <user> <command>


  • Ansible 2.4+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In