summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSloane Hertel <shertel@redhat.com>2017-04-20 16:34:43 -0400
committerRyan Brown <sb@ryansb.com>2017-04-20 16:34:43 -0400
commit11c292bac2849e963d6e2843a9fbea6b367739e7 (patch)
tree83f703476785951652f6b6093d66783a49314fa0
parent0c2a0c7bce7c75eb00bad3e06404b7da85cc6d9d (diff)
downloadansible-11c292bac2849e963d6e2843a9fbea6b367739e7.tar.gz
route53_facts: add example for how to use next_marker option - fixes #23625 (#23802)
* Add example for using route53 next_marker option * make route53_facts pep8 and remove from legacy files
-rw-r--r--lib/ansible/modules/cloud/amazon/route53_facts.py20
-rw-r--r--test/sanity/pep8/legacy-files.txt1
2 files changed, 16 insertions, 5 deletions
diff --git a/lib/ansible/modules/cloud/amazon/route53_facts.py b/lib/ansible/modules/cloud/amazon/route53_facts.py
index 909a09c6b8..5906e1f79d 100644
--- a/lib/ansible/modules/cloud/amazon/route53_facts.py
+++ b/lib/ansible/modules/cloud/amazon/route53_facts.py
@@ -56,9 +56,10 @@ options:
next_marker:
description:
- "Some requests such as list_command: hosted_zones will return a maximum
- number of entries - EG 100. If the number of entries exceeds this maximum
- another request can be sent using the NextMarker entry from the first response
- to get the next page of results"
+ number of entries - EG 100 or the number specified by max_items.
+ If the number of entries exceeds this maximum another request can be sent
+ using the NextMarker entry from the first response to get the next page
+ of results"
required: false
delegation_set_id:
description:
@@ -163,6 +164,17 @@ EXAMPLES = '''
delegation_set_id: delegation id
register: delegation_sets
+- name: setup of example for using next_marker
+ route53_facts:
+ query: hosted_zone
+ max_items: 1
+ register: first_facts
+- name: example for using next_marker
+ route53_facts:
+ query: hosted_zone
+ next_marker: "{{ first_facts.NextMarker }}"
+ max_items: 1
+ when: "{{ 'NextMarker' in first_facts }}"
'''
try:
import boto
@@ -404,7 +416,7 @@ def main():
'count',
'tags',
], default='list'),
- )
+ )
)
module = AnsibleModule(
diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt
index 879ff33879..dc758774bc 100644
--- a/test/sanity/pep8/legacy-files.txt
+++ b/test/sanity/pep8/legacy-files.txt
@@ -207,7 +207,6 @@ lib/ansible/modules/cloud/amazon/rds.py
lib/ansible/modules/cloud/amazon/rds_param_group.py
lib/ansible/modules/cloud/amazon/rds_subnet_group.py
lib/ansible/modules/cloud/amazon/redshift.py
-lib/ansible/modules/cloud/amazon/route53_facts.py
lib/ansible/modules/cloud/amazon/route53_health_check.py
lib/ansible/modules/cloud/amazon/s3.py
lib/ansible/modules/cloud/amazon/s3_bucket.py