when trying to run:
- hosts: localhost
connection: local
gather_facts: yes
vars:
azure_region: ‘eastus’
tasks:
- name: Get facts for one resource group
azure_rm_resourcegroup_facts:
name: stevenca-csr
I get:
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “invocation”: {“module_args”: {“ad_user”: null, “client_id”: null, “name”: “stevenca-csr”, “password”: null, “profile”: null, “secret”: null, “subscription_id”: null, “tags”: null, “tenant”: null}, “module_name”: “azure_rm_resourcegroup_facts”}, “msg”: “Expecting azure.mgmt.compute.version to be >= 2016-03-30. Found version 0.30.0rc5 Do you have Azure >= 2.0.0rc2 installed?”}
This seems to be related to:
https://github.com/ansible/ansible/issues/16480
Although I am using Ansible 2.1.0.0. When I work around that issue by replacing:
AZURE_MIN_VERSION = “2016-03-30” with AZURE_MIN_VERSION = “0.30.0rc5” in /usr/lib/python2.7/site-packages/ansible/module_utils/azure_rm_common.py
I still get:
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File “/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py”, line 172, in
main()
File “/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py”, line 169, in main
AzureRMResourceGroupFacts()
File “/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py”, line 125, in init
facts_module=True)
File “/tmp/ansible_J5TjZd/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py”, line 178, in init
File “/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py”, line 133, in exec_module
self.results[‘objects’] = self.get_item()
File “/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py”, line 145, in get_item
item = self.rm_client.resource_groups.get(self.name)
File “/tmp/ansible_J5TjZd/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py”, line 621, in rm_client
TypeError: init() takes at least 3 arguments (2 given)
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “invocation”: {“module_name”: “azure_rm_resourcegroup_facts”}, “module_stderr”: “Traceback (most recent call last):\n File "/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py", line 172, in \n main()\n File "/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py", line 169, in main\n AzureRMResourceGroupFacts()\n File "/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py", line 125, in init\n facts_module=True)\n File "/tmp/ansible_J5TjZd/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py", line 178, in init\n File "/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py", line 133, in exec_module\n self.results[‘objects’] = self.get_item()\n File "/tmp/ansible_J5TjZd/ansible_module_azure_rm_resourcegroup_facts.py", line 145, in get_item\n item = self.rm_client.resource_groups.get(self.name)\n File "/tmp/ansible_J5TjZd/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py", line 621, in rm_client\nTypeError: init() takes at least 3 arguments (2 given)\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE”, “parsed”: false}
This leads me to believe that I I have some substantial version problems with my setup or this stuff just does not work yet. Can someone make me less ignorant here (at least with this specific topic)?
Thanks,
Steven.