Created
November 22, 2017 11:38
-
-
Save chris-short/4a5630e48f1ae1717e5720a51a805835 to your computer and use it in GitHub Desktop.
Failing Azure A Record Creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cshort@wile ~/r/chrisshort.net-dns> ansible-playbook site.yml -vvv | |
ansible-playbook 2.4.1.0 | |
config file = /Users/cshort/repo/chrisshort.net-dns/ansible.cfg | |
configured module search path = [u'/Users/cshort/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] | |
ansible python module location = /Library/Python/2.7/site-packages/ansible | |
executable location = /usr/local/bin/ansible-playbook | |
python version = 2.7.10 (default, Jul 15 2017, 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] | |
Using /Users/cshort/repo/chrisshort.net-dns/ansible.cfg as config file | |
Parsed /Users/cshort/repo/chrisshort.net-dns/inventory/azure_rm.py inventory source with script plugin | |
[WARNING]: Could not match supplied host pattern, ignoring: all | |
[WARNING]: provided hosts list is empty, only localhost is available | |
PLAYBOOK: site.yml ************************************************************************************************ | |
1 plays in site.yml | |
PLAY [Deploy DNS to Azure] **************************************************************************************** | |
META: ran handlers | |
TASK [Create Resource Group] ************************************************************************************** | |
task path: /Users/cshort/repo/chrisshort.net-dns/site.yml:7 | |
Using module file /Library/Python/2.7/site-packages/ansible/modules/core/cloud/azure/azure_rm_resourcegroup.py | |
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: cshort | |
<127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0' | |
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/cshort/.ansible/tmp/ansible-tmp-1511350691.41-3118879012882 `" && echo ansible-tmp-1511350691.41-3118879012882="` echo /Users/cshort/.ansible/tmp/ansible-tmp-1511350691.41-3118879012882 `" ) && sleep 0' | |
<127.0.0.1> PUT /var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/tmpy7Yq8l TO /Users/cshort/.ansible/tmp/ansible-tmp-1511350691.41-3118879012882/azure_rm_resourcegroup.py | |
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/cshort/.ansible/tmp/ansible-tmp-1511350691.41-3118879012882/ /Users/cshort/.ansible/tmp/ansible-tmp-1511350691.41-3118879012882/azure_rm_resourcegroup.py && sleep 0' | |
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /Users/cshort/.ansible/tmp/ansible-tmp-1511350691.41-3118879012882/azure_rm_resourcegroup.py; rm -rf "/Users/cshort/.ansible/tmp/ansible-tmp-1511350691.41-3118879012882/" > /dev/null 2>&1 && sleep 0' | |
The full traceback is: | |
File "/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_tw_5MG/ansible_module_azure_rm_resourcegroup.py",line 243, in resources_exist | |
response = self.rm_client.resource_groups.list_resources(self.name) | |
fatal: [localhost]: FAILED! => { | |
"changed": false, | |
"failed": true, | |
"invocation": { | |
"module_args": { | |
"ad_user": null, | |
"append_tags": true, | |
"cli_default_profile": null, | |
"client_id": null, | |
"cloud_environment": null, | |
"force": false, | |
"location": "centralus", | |
"name": "chrisshort.net", | |
"password": null, | |
"profile": "default", | |
"secret": null, | |
"state": "present", | |
"subscription_id": null, | |
"tags": null, | |
"tenant": null | |
} | |
}, | |
"msg": "Error checking for resource existence in chrisshort.net - 'ResourceGroupsOperations' object has no attribute 'list_resources'" | |
} | |
...ignoring | |
TASK [Create Zone] ************************************************************************************************ | |
task path: /Users/cshort/repo/chrisshort.net-dns/site.yml:15 | |
Using module file /Library/Python/2.7/site-packages/ansible/modules/cloud/azure/azure_rm_dnszone.py | |
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: cshort | |
<127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0' | |
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/cshort/.ansible/tmp/ansible-tmp-1511350693.0-173333967249282 `" && echo ansible-tmp-1511350693.0-173333967249282="` echo /Users/cshort/.ansible/tmp/ansible-tmp-1511350693.0-173333967249282 `" ) && sleep 0' | |
<127.0.0.1> PUT /var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/tmprU0BGx TO /Users/cshort/.ansible/tmp/ansible-tmp-1511350693.0-173333967249282/azure_rm_dnszone.py | |
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/cshort/.ansible/tmp/ansible-tmp-1511350693.0-173333967249282/ /Users/cshort/.ansible/tmp/ansible-tmp-1511350693.0-173333967249282/azure_rm_dnszone.py && sleep 0' | |
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /Users/cshort/.ansible/tmp/ansible-tmp-1511350693.0-173333967249282/azure_rm_dnszone.py; rm -rf "/Users/cshort/.ansible/tmp/ansible-tmp-1511350693.0-173333967249282/" > /dev/null 2>&1 && sleep 0' | |
ok: [localhost] => { | |
"changed": false, | |
"check_mode": false, | |
"failed": false, | |
"invocation": { | |
"module_args": { | |
"ad_user": null, | |
"append_tags": true, | |
"cli_default_profile": null, | |
"client_id": null, | |
"cloud_environment": null, | |
"name": "chrisshort.net", | |
"password": null, | |
"profile": null, | |
"resource_group": "chrisshort.net", | |
"secret": null, | |
"state": "present", | |
"subscription_id": null, | |
"tags": null, | |
"tenant": null | |
} | |
}, | |
"state": { | |
"id": "/subscriptions/f4c5a52e-981d-4dcc-8ae1-23759d7a65c2/resourceGroups/chrisshort.net/providers/Microsoft.Network/dnszones/chrisshort.net", | |
"name": "chrisshort.net", | |
"name_servers": [ | |
"ns1-01.azure-dns.com.", | |
"ns2-01.azure-dns.net.", | |
"ns3-01.azure-dns.org.", | |
"ns4-01.azure-dns.info." | |
], | |
"number_of_record_sets": 2, | |
"tags": {} | |
} | |
} | |
TASK [Create A Record] ******************************************************************************************** | |
task path: /Users/cshort/repo/chrisshort.net-dns/site.yml:21 | |
Using module file /Library/Python/2.7/site-packages/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py | |
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: cshort | |
<127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0' | |
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/cshort/.ansible/tmp/ansible-tmp-1511350695.41-54637781349479 `" && echo ansible-tmp-1511350695.41-54637781349479="` echo /Users/cshort/.ansible/tmp/ansible-tmp-1511350695.41-54637781349479 `" ) && sleep 0' | |
<127.0.0.1> PUT /var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/tmpaOsUp6 TO /Users/cshort/.ansible/tmp/ansible-tmp-1511350695.41-54637781349479/azure_rm_dnsrecordset.py | |
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/cshort/.ansible/tmp/ansible-tmp-1511350695.41-54637781349479/ /Users/cshort/.ansible/tmp/ansible-tmp-1511350695.41-54637781349479/azure_rm_dnsrecordset.py && sleep 0' | |
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /Users/cshort/.ansible/tmp/ansible-tmp-1511350695.41-54637781349479/azure_rm_dnsrecordset.py; rm -rf "/Users/cshort/.ansible/tmp/ansible-tmp-1511350695.41-54637781349479/" > /dev/null 2>&1 && sleep 0' | |
The full traceback is: | |
Traceback (most recent call last): | |
File "/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_module_azure_rm_dnsrecordset.py", line 391, in <module> | |
main() | |
File "/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_module_azure_rm_dnsrecordset.py", line 388, in main | |
AzureRMRecordSet() | |
File "/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_module_azure_rm_dnsrecordset.py", line 276, in __init__ | |
super(AzureRMRecordSet, self).__init__(self.module_arg_spec, required_if=required_if, supports_check_mode=True) | |
File "/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py", line 256, in __init__ | |
File "/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_module_azure_rm_dnsrecordset.py", line 340, in exec_module | |
record_set = RecordSet(**record_set_args) | |
TypeError: __init__() got an unexpected keyword argument 'type' | |
fatal: [localhost]: FAILED! => { | |
"changed": false, | |
"failed": true, | |
"module_stderr": "Traceback (most recent call last):\n File \"/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_module_azure_rm_dnsrecordset.py\", line 391, in <module>\n main()\n File \"/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_module_azure_rm_dnsrecordset.py\", line 388, in main\n AzureRMRecordSet()\n File \"/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_module_azure_rm_dnsrecordset.py\", line 276, in __init__\n super(AzureRMRecordSet, self).__init__(self.module_arg_spec, required_if=required_if, supports_check_mode=True)\n File \"/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py\", line 256, in __init__\n File \"/var/folders/sk/swm5j_n54098b1jbt32xlw1h0000gn/T/ansible_U4C0Kq/ansible_module_azure_rm_dnsrecordset.py\", line 340, in exec_module\n record_set = RecordSet(**record_set_args)\nTypeError: __init__() got an unexpected keyword argument 'type'\n", | |
"module_stdout": "", | |
"msg": "MODULE FAILURE", | |
"rc": 0 | |
} | |
PLAY RECAP ******************************************************************************************************** | |
localhost : ok=2 changed=0 unreachable=0 failed=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Deploy DNS to Azure | |
hosts: localhost | |
connection: local | |
gather_facts: no | |
become: False | |
tasks: | |
- name: Create Resource Group | |
azure_rm_resourcegroup: | |
name: chrisshort.net | |
location: centralus | |
profile: default | |
state: present | |
ignore_errors: True | |
- name: Create Zone | |
azure_rm_dnszone: | |
resource_group: chrisshort.net | |
name: chrisshort.net | |
state: present | |
- name: Create A Record | |
azure_rm_dnsrecordset: | |
resource_group: chrisshort.net | |
relative_name: "@" | |
zone_name: chrisshort.net | |
record_type: A | |
state: present | |
records: | |
- entry: 104.198.14.52 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment