DNS - Listing Domains - Ansible
Aim
Further details for the output from Ansible.
Ansible
$ cd ansible/
$ ansible-playbook playbook.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Collection community.aws does not support Ansible version 2.10.8
[WARNING]: Collection amazon.aws does not support Ansible version 2.10.8
PLAY [DNS - Listing Domains] *************************************************************************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************************************************************
ok: [localhost]
TASK [List all hosted zones] *******************************************************************************************************************************************************************************
[DEPRECATION WARNING]: The 'CamelCase' return values with key 'HostedZones' and 'list' are deprecated and will be replaced by 'snake_case' return values with key 'hosted_zones'. Both case values are
returned for now. This feature will be removed from amazon.aws in a release after 2025-01-01. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost]
TASK [Debug Hosted Zones] **********************************************************************************************************************************************************************************
ok: [localhost] => {
"hosted_zones": {
"HostedZones": [
{
"CallerReference": "8d943433e0fa60b3",
"Config": {
"Comment": "",
"PrivateZone": false
},
"Id": "8d943433e0fa60b3",
"Name": "apubliczone.com.",
"ResourceRecordSetCount": 1
},
{
"CallerReference": "a3391bb2513ef830",
"Config": {
"Comment": "",
"PrivateZone": false
},
"Id": "a3391bb2513ef830",
"Name": "testfromawscli1.com.",
"ResourceRecordSetCount": 1
},
{
"CallerReference": "fdb4ef5452d6359d",
"Config": {
"Comment": "",
"PrivateZone": false
},
"Id": "fdb4ef5452d6359d",
"Name": "testfromawscli3.com.",
"ResourceRecordSetCount": 1
}
],
"changed": false,
"deprecations": [
{
"collection_name": "amazon.aws",
"date": "2025-01-01",
"msg": "The 'CamelCase' return values with key 'HostedZones' and 'list' are deprecated and will be replaced by 'snake_case' return values with key 'hosted_zones'. Both case values are returned for now."
}
],
"failed": false,
"hosted_zones": [
{
"caller_reference": "8d943433e0fa60b3",
"config": {
"comment": "",
"private_zone": false
},
"id": "8d943433e0fa60b3",
"name": "apubliczone.com.",
"resource_record_set_count": 1
},
{
"caller_reference": "a3391bb2513ef830",
"config": {
"comment": "",
"private_zone": false
},
"id": "a3391bb2513ef830",
"name": "testfromawscli1.com.",
"resource_record_set_count": 1
},
{
"caller_reference": "fdb4ef5452d6359d",
"config": {
"comment": "",
"private_zone": false
},
"id": "fdb4ef5452d6359d",
"name": "testfromawscli3.com.",
"resource_record_set_count": 1
}
],
"list": [
{
"CallerReference": "8d943433e0fa60b3",
"Config": {
"Comment": "",
"PrivateZone": false
},
"Id": "8d943433e0fa60b3",
"Name": "apubliczone.com.",
"ResourceRecordSetCount": 1
},
{
"CallerReference": "a3391bb2513ef830",
"Config": {
"Comment": "",
"PrivateZone": false
},
"Id": "a3391bb2513ef830",
"Name": "testfromawscli1.com.",
"ResourceRecordSetCount": 1
},
{
"CallerReference": "fdb4ef5452d6359d",
"Config": {
"Comment": "",
"PrivateZone": false
},
"Id": "fdb4ef5452d6359d",
"Name": "testfromawscli3.com.",
"ResourceRecordSetCount": 1
}
]
}
}
PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0