Ansible Dynamic Inventory for Azure does not work on Ubuntu 16.04 Agent

83 views
Skip to first unread message

ameya agashe

unread,
Feb 26, 2019, 9:49:44 PM2/26/19
to ansible...@googlegroups.com

Hi Guys,

 

I'm getting the below error when I try to run Ansible Dynamic inventory on Ubuntu 16.04, the source of python script is here:


wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/azure_rm.py



##[debug]cmdToRun = ansible-playbook -i /home/vsts/work/r1/a/_IaaC-Build/drop/scripts/azure_rm.py /home/vsts/work/r1/a/_IaaC-Build/drop/playbooks/common.yml ERROR! The file /home/vsts/work/r1/a/_IaaC-Build/drop/scripts/azure_rm.py is marked as executable, but failed to execute correctly. If this is not supposed to be an executable script, correct this with `chmod -x /home/vsts/work/r1/a/_IaaC-Build/drop/scripts/azure_rm.py`. ERROR! Inventory script (/home/vsts/work/r1/a/_IaaC-Build/drop/scripts/azure_rm.py) had an execution error: Traceback (most recent call last): File "/home/vsts/work/r1/a/_IaaC-Build/drop/scripts/azure_rm.py", line 212, in <module> import ansible.module_utils.six.moves.urllib.parse as urlparse ImportError: No module named six.moves.urllib.parse ERROR! /home/vsts/work/r1/a/_IaaC-Build/drop/scripts/azure_rm.py:22: Error parsing host definition ''''': No closing quotation


The agent is Ubuntu 16.04 machine


Appreciate any guidance.


Thank you.



Kind Regards

Ameya Agashe

 

Reply all
Reply to author
Forward
0 new messages