Strange error: Do you have azure>=2.0.0 installed? Try `pip install ansible[azure]`- No module named containerservice

27 views
Skip to first unread message

tselios...@gmail.com

unread,
Mar 11, 2019, 2:10:08 AM3/11/19
to Ansible Project
Hello,
I am puzzled from the under subject error message.
I have a very simple playbook that creates an Azure Resource Group. However, when I execute it it generates this error message.
Of course, I have the latest packages installed:

rpm -qa | grep -i ansible
ansible-2.7.8-1.fc28.noarch

rpm -qa | grep -i azure
python2-azure-sdk-2.0.0-2.fc28.noarch
python2-azure-storage-0.36.0-2.fc28.noarch
python2-msrestazure-0.4.21-2.fc28.noarch
azure-cli-2.0.60-1.el7.x86_64


Also, the containerservice is in place:

sudo find / | grep "azure" | grep -i containerservice        
/usr/lib/python2.7/site-packages/azure/mgmt/compute/containerservice
/usr/lib/python2.7/site-packages/azure/mgmt/compute/containerservice/models.pyc


In the github similar errors resulted to an issue with packages versions and issues with AWX/Tower, but I don't run it in AWX.

Any ideas?

Wawrzek Niewodniczanski

unread,
Mar 11, 2019, 11:21:37 AM3/11/19
to ansible...@googlegroups.com
Have you tried to follow official ansible for azure installation
guide? AFAIR it is:

pip install ansible[azure]

On MacOSX I noticed that ansible is very dependent on the right
version of Azure libraries.

Wawrzek
> --
> 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 ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9b064172-9fa3-4159-b617-33d7f17cf477%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Dr Wawrzyniec Niewodniczański or Wawrzek for short
PhD in Quantum Chemistry & MSc in Molecular Engineering
WWW: http://wawrzek.name E-MAIL: jo...@wawrzek.name
Linux User #177124

tselios...@gmail.com

unread,
Mar 13, 2019, 9:27:20 AM3/13/19
to Ansible Project
Using pip in a virtualenv works but not perfectly fine. I had issues with other tasks/plays that are quite strange but that's another story.
I noticed that the packages between the rpm and the pip are exactly the same. I even did and md5sum on the containerservice and I found no diffs.

Personally I don't like pip. pip is not a system utility.
Reply all
Reply to author
Forward
0 new messages