Ansible sudo with multifactor authentication
Hi,
We use multifactor authenticaton provided by IPA. So for every login/sudo promt we have this kind of prompt (also on machines that doesn't require the second factor):
First Factor: Second Factor (optional):
I would like to run the following Ansible playbook on several computers:
- hosts: all vars_files: - secret tasks: - name: Do something as sudo command: whoami become_user: root
But it fails to sudo. Even on machines where the second factor is really optional, not needed.
Can I somehow use Ansible sudo with MFA authentication, where the server doesn't require the second factor?
Regards,
Stone
Responses