ansible ec2.py discovery with assume_role & MFA

Hi

Before using Ansible with some roles I prepared, I wanted to check the ec2.py autodiscovery script. However, all the accounts I have setup on AWS need to login to a first account which uses MFA & then assume a role before being able to do something.
It appears that I cannot make it work, even if I have created the right ~/.aws/config & ~/.aws/credentials files.
ec2.py just seems missing to assume_role, read MFA & ask the token…
I have found a fork of ec2.py for the assume_role part, but I am still missing the MFA part.
Does someone have the solution?

Thanks in advance.

I think you are looking this thing:

`
#!/bin/bash

Requirement:

- awscli

- jq