azure_rm_virtualmachine: error to import AzureRMModuleBase

19 views
Skip to first unread message

Irfan Sayed

unread,
May 16, 2018, 4:05:08 AM5/16/18
to Ansible Project
Hello,

I am trying to create the azure VM using ansible module : azure_rm_virtualmachine
document referred : https://docs.ansible.com/ansible/2.4/azure_rm_virtualmachine_module.html


Actual error

TASK [azure_vm_create : Create azure vm] ****************************************************************************************************************************************************
fatal: [worker1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to worker1 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File "/tmp/ansible_3PPl_f/ansible_module_azure_rm_virtualmachine.py", line 556, in \r\n from ansible.module_utils.azure_rm_common import AzureRMModuleBase, azure_id_to_dict\r\n File "/tmp/ansible_3PPl_f/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py", line 28, in \r\nImportError: No module named packaging.version\r\n", "msg": "MODULE FAILURE", "rc": 0}

Environment :
Ansible version : ansible 2.4.2.0
python version = 2.7.5
Ansible controller machine : centos 7
ansible managed node : centos 7


azure packages :
python2-msrestazure-0.4.21-1.el7.noarch
azure-repo-svc-1.0-0.el7.centos.noarch
python2-azure-sdk-2.0.0-2.el7.noarch


expected behavior :
provision the VM without any issue


I am not getting what is the issue. my other playbooks are just working fine. do I need to install any other dependency OR module ??


please suggest.

 

Regards,

Irfan Sayed

unread,
May 16, 2018, 9:43:06 AM5/16/18
to Ansible Project
please suggest. I m stuck

Nick Rogers

unread,
May 16, 2018, 10:33:57 AM5/16/18
to Ansible Project
Have you tried running

    pip install packaging

Irfan Sayed

unread,
May 16, 2018, 11:04:34 AM5/16/18
to Ansible Project
yes. I did that already and here is the output.

[root@centos]# pip install packaging
Requirement already satisfied (use --upgrade to upgrade): packaging in /usr/lib/python2.7/site-packages

Irfan Sayed

unread,
May 17, 2018, 9:36:48 AM5/17/18
to Ansible Project
please suggest
Reply all
Reply to author
Forward
0 new messages