you need to install azure (pip install azure==2.0.0rc2"
On Monday, July 18, 2016 at 9:35:20 PM UTC+2, Mohamed Ghaleb wrote:
>
> hey, any luck with the problem? is it solved?
>
> On Saturday, July 9, 2016 at 12:09:43 AM UTC+2, Adnan Khan wrote:
>>
>> Hi,
>>
>> I;m getting the following error when trying to sun a very simple playbook
>> on a new Ubuntu server. See log for more details below.
>>
>> Error: global name 'VirtuaMachineSizeTypes' is not defined
>>
>>
>> ansible...@AnsibleControl:~$ lsb_release -a
>> No LSB modules are available.
>> Distributor ID: Ubuntu
>> Description: Ubuntu 14.04.4 LTS
>> Release: 14.04
>> Codename: trusty
>>
>>
>> ansible...@AnsibleControl:~$ ansible --version
>> ansible 2.1.0.0
>> config file = /etc/ansible/ansible.cfg
>> configured module search path = Default w/o overrides
>>
>>
>> /////// Playbook /////////
>>
>> - hosts: localhost
>> connection: local
>> gather_facts: no
>> tasks:
>> - name: Create VM
>> azure_rm_virtualmachine:
>> resource_group: Ansible
>> name: amktestvm01
>> vm_size: Standard_D1
>> admin_username: username
>> admin_password: password
>> image:
>> offer: CentOS
>> publisher: OpenLogic
>> sku: '7.1'
>> version: latest
>>
>> /////// AD Credentials /////////
>> AD Credentials are in the credentials files at .azure/Credential in the
>> format:
>>
>> [default]
>> ad_user=
>> password=
>> subscription_id=
>>
>>
>> /////// Error Message /////////
>> ansible...@AnsibleControl:~$ ansible-playbook azuredeployvmtest.yml -vvv
>> Using /etc/ansible/ansible.cfg as config file
>> [WARNING]: provided hosts list is empty, only localhost is available
>>
>>
>> PLAYBOOK: azuredeployvmtest.yml
>> ************************************************
>> 1 plays in azuredeployvmtest.yml
>>
>> PLAY [localhost]
>> ***************************************************************
>>
>> TASK [Create VM]
>> ***************************************************************
>> task path: /home/ansiblecontrol/azuredeployvmtest.yml:6
>> <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: ansiblecontrol
>> <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo
>> $HOME/.ansible/tmp/ansible-tmp-1468013697.75-124132492023031 `" && echo
>> ansible-tmp-1468013697.75-124132492023031="` echo
>> $HOME/.ansible/tmp/ansible-tmp-1468013697.75-124132492023031 `" ) && sleep
>> 0'
>> <127.0.0.1> PUT /tmp/tmpJSKuVv TO
>> /home/ansiblecontrol/.ansible/tmp/ansible-tmp-1468013697.75-124132492023031/azure_rm_virtualmachine
>> <127.0.0.1> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
>> LC_MESSAGES=en_US.UTF-8 /usr/bin/python
>> /home/ansiblecontrol/.ansible/tmp/ansible-tmp-1468013697.75-124132492023031/azure_rm_virtualmachine;
>>
>> rm -rf
>> "/home/ansiblecontrol/.ansible/tmp/ansible-tmp-1468013697.75-124132492023031/"
>>
>> > /dev/null 2>&1 && sleep 0'
>> An exception occurred during task execution. The full traceback is:
>> Traceback (most recent call last):
>> File "/tmp/ansible_OV5bER/ansible_module_azure_rm_virtualmachine.py",
>> line 1284, in <module>
>> main()
>> File "/tmp/ansible_OV5bER/ansible_module_azure_rm_virtualmachine.py",
>> line 1281, in main
>> AzureRMVirtualMachine()
>> File "/tmp/ansible_OV5bER/ansible_module_azure_rm_virtualmachine.py",
>> line 487, in __init__
>> for key in VirtualMachineSizeTypes:
>> NameError: global name 'VirtualMachineSizeTypes' is not defined
>>
>> fatal: [localhost]: FAILED! => {"changed": false, "failed": true,
>> "invocation": {"module_name": "azure_rm_virtualmachine"}, "module_stderr":
>> "Traceback (most recent call last):\n File
>> \"/tmp/ansible_OV5bER/ansible_module_azure_rm_virtualmachine.py\", line
>> 1284, in <module>\n main()\n File
>> \"/tmp/ansible_OV5bER/ansible_module_azure_rm_virtualmachine.py\", line
>> 1281, in main\n AzureRMVirtualMachine()\n File
>> \"/tmp/ansible_OV5bER/ansible_module_azure_rm_virtualmachine.py\", line
>> 487, in __init__\n for key in VirtualMachineSizeTypes:\nNameError:
>> global name 'VirtualMachineSizeTypes' is not defined\n", "module_stdout":
>> "", "msg": "MODULE FAILURE", "parsed": false}
>>
>> NO MORE HOSTS LEFT
>> *************************************************************
>> to retry, use: --limit @azuredeployvmtest.retry
>>
>> PLAY RECAP
>> *********************************************************************
>> localhost : ok=0 changed=0 unreachable=0
>> failed=1
>>
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ab9a29dc-438c-4fb8-9960-1c3c62779229%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.