Manpreet
Manpreet

Reputation: 139

Ansible Azure Modules

I'm trying to use the Azure modules for Ansible on Red Hat. I followed the official documentation for Ansible installation on site. While executing the Ansible playbook I ran into below problem.

Failed to import the required Python library (ansible[azure] (azure >= 2.0.0)) on azure-redhat Python /usr/bin/python2.

I removed Ansible and pip packages and reinstalled them. The problem still persists. Can anyone help me with it?

Upvotes: 5

Views: 5668

Answers (1)

Nancy Xiong
Nancy Xiong

Reputation: 28224

As the comment points it out, you could follow this document to install Ansible on an Azure Linux virtual machine.

  • Install the required packages for the Azure Python SDK modules.

    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 the required packages for the Azure Python SDK modules.

    sudo pip install ansible[azure]

This works for me on RedHat 7.4 azure VM. enter image description here

Upvotes: 1

Related Questions