From 2a67ff1a755e09cd6efc00892df7debaf59a0c5d Mon Sep 17 00:00:00 2001 From: ipvsean Date: Mon, 3 Dec 2018 17:25:40 -0500 Subject: [PATCH] adding example for route53_facts using start_record_name this example shows two things not shown here already-> - dynamically looking up hosted zone id using the route53_zone module (vs knowing the ID we can use the name) - showing an example of start_record_name which takes an entire record, not just a partial name --- lib/ansible/modules/cloud/amazon/route53_facts.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/route53_facts.py b/lib/ansible/modules/cloud/amazon/route53_facts.py index ae07ff8eec9..4b3d9075438 100644 --- a/lib/ansible/modules/cloud/amazon/route53_facts.py +++ b/lib/ansible/modules/cloud/amazon/route53_facts.py @@ -177,6 +177,21 @@ EXAMPLES = ''' next_marker: "{{ first_facts.NextMarker }}" max_items: 1 when: "{{ 'NextMarker' in first_facts }}" + +- name: retrieve host entries starting with host1.workshop.test.io + block: + - name: grab zone id + route53_zone: + zone: "test.io" + register: AWSINFO + + - name: GRAB ROUTE53 INFORMATION + route53_facts: + type: A + query: record_sets + hosted_zone_id: "{{AWSINFO.zone_id}}" + start_record_name: "host1.workshop.test.io" + register: RECORDS ''' try: import boto