Hi Everyone, I'm attempting to use the ansible api to query a bunch of servers (programmatically) .
I'm running into an issue where all of my servers require a MFA-authentication+passcode. Is there a way I can have my python/ansible script prompt me for the password? Obviously in a playbook or commandline call I can do an --ask-pass; however I need to leverage python for a bunch of 'other' processing tasks. I'm using this basic code as a starter: (lifted from the ansible api docs/examples) ### ansible_hosts [testservers] vmdsxwo83 vmdsxwo84 vmdsxwo85 vmdsxwo86 vmdsxwo87 ### test.py #!/usr/local/bin/python import ansible.runner runner = ansible.runner.Runner( module_name='command', module_args='uptime', pattern='testservers', forks=10 ) datastructure = runner.run() print datastructure Thanks. --mike -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f03cda7e-d021-49e0-8bdd-18500442c1e1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
