How to configure passwordless privileged execution in Ansible Automation Platform without using 'NOPASSWD' in sudoers file?
Issue
- How to configure Ansible Credential to run privileged commands (sudo) without specifying a password and not using NOPASSWD
- Due to security restrictions, NOPASSWD clause cannot be used in sudoers files as well as a static password cannot be set in users accounts.
- How to setup Ansible Automation Platform to work using ssh-agent in order to run sudo commands without password prompting.
Environment
- Ansible Automation Platform 2.4
- Ansible Automation Platform 2.5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.