Reputation: 2295
I'm trying a simple thing like creating a Resource group in Azure via an Ansible Playbook, but I need the Azure Python SDK for it. I can't install the SDK with pip install azure
because Microsoft doesn't support it anymore, which is completely illogical because Ansible keeps showing ModuleNotFoundError
errors every time I execute the playbook, and I have to install them all manually...
Any more efficient way to do this?
Upvotes: 2
Views: 4111
Reputation: 581
I believe you're looking to install Ansible Azure module. So please try the following,
If you already have python
and pip
installed, use the command pip install ansible[azure]
, to install Azure modules.
Otherwise Try the following, and see if that helps,
On Windows,
python
and pip
installation path to Windows PATH variablepip install ansible[azure]
On CentOS 7.4,
Install python
and pip
:
sudo yum check-update; sudo yum install -y gcc libffi-devel python-devel openssl-devel epel-release
sudo yum install -y python-pip python-wheel
Install Ansible Azure Module:
sudo pip install ansible[azure]
On Ubuntu 16.04 LTS,
Install python
and pip
:
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev python-pip
Install Ansible Azure Module:
sudo pip install ansible[azure]
Upvotes: 3