Hi,
I am writing a route53 module for internal usage. For that, I want to list
the alias records from route53.
---
> - name: retrieve details for lb.example.io
> strategy: debug
> hosts: localhost
> tasks:
> - route53:
> state: get
> zone: example.io
> record: lb.example.io
> type: A
> register: rec
> - name: Print record
> debug:
> var: rec
>
>
>
This is the run output
PLAY [retrieve details for lb.example.io]
******************************************************************************
TASK [Gathering Facts]
***********************************************************************************************
ok: [localhost]
TASK [route53]
*******************************************************************************************************
ok: [localhost]
TASK [Print record]
**************************************************************************************************
ok: [localhost] => {
"rec": {
"changed": false,
"failed": false,
"nameservers": [
"ns-464.awsdns-58.com.",
"ns-1140.awsdns-14.org.",
"ns-1893.awsdns-44.co.uk.",
"ns-691.awsdns-22.net."
],
"set": {}
}
}
PLAY RECAP
***********************************************************************************************************
localhost
When I list the record using *AWS CLI,* I get the following answer
⚡ aws route53 list-resource-record-sets --hosted-zone-id ***********
--query "ResourceRecordSets[?Name == 'lb.example.io.']" |jq
.[].AliasTarget.DNSName
"m1.example.io."
"m2.example.io."
"m3.example.io."
"m4.example.io."
"m5.example.io."
"m6.example.io."
"m7.example.io."
I am following route53 core module
<http://ansible-manual.readthedocs.io/en/latest/route53_module.html>. My
ansible version is
⚡ ansible --version
ansible 2.4.1.0
Please suggest if I am missing something here.
thanks
--
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/a7948aa0-448b-4578-8adc-a8eda2721a5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.