Repository: ansible/ansible

Issue:
How to use next_marker in route53_facts module
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master branch are affected too.
-->

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Documentation Report

##### COMPONENT NAME
<!--- Name of the module/plugin/task/feature -->
- module

##### ANSIBLE VERSION
<!--- Paste verbatim output from “ansible --version” between quotes below -->
```
Ansible 2.2
```

##### CONFIGURATION
<!---
Mention any settings you have changed/added/removed in ansible.cfg
(or using the ANSIBLE_* environment variables).
-->

##### OS / ENVIRONMENT
<!---
Ubuntu, Amazon Linux
-->

##### SUMMARY
<!--- Explain the problem briefly -->
The documentation is not clear how to use "next_marker" argument with "route53_facts" if you want to list more than 100 record sets. No example is given related to this and its difficult to understand what value that argument  will take.

Plz specify some example for same as it could be a common use case to list more than 100 record sets to make changes to your private domain.


##### STEPS TO REPRODUCE
<!---
For bugs, show exactly how to reproduce the problem, using a minimal test-case.
For new features, show how the feature would be used.
-->

<!--- Paste example playbooks or commands between quotes below -->
```yaml

```

<!--- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- What did you expect to happen when running the steps above? -->

##### ACTUAL RESULTS
<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes below -->
```

```

How to use next_marker in route53_facts module
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master branch are affected too.
-->

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Documentation Report

##### COMPONENT NAME
<!--- Name of the module/plugin/task/feature -->
- module

##### ANSIBLE VERSION
<!--- Paste verbatim output from “ansible --version” between quotes below -->
```
Ansible 2.2
```

##### CONFIGURATION
<!---
Mention any settings you have changed/added/removed in ansible.cfg
(or using the ANSIBLE_* environment variables).
-->

##### OS / ENVIRONMENT
<!---
Ubuntu, Amazon Linux
-->

##### SUMMARY
<!--- Explain the problem briefly -->
The documentation is not clear how to use "next_marker" argument with "route53_facts" if you want to list more than 100 record sets. No example is given related to this and its difficult to understand what value that argument  will take.

Plz specify some example for same as it could be a common use case to list more than 100 record sets to make changes to your private domain.


##### STEPS TO REPRODUCE
<!---
For bugs, show exactly how to reproduce the problem, using a minimal test-case.
For new features, show how the feature would be used.
-->

<!--- Paste example playbooks or commands between quotes below -->
```yaml

```

<!--- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- What did you expect to happen when running the steps above? -->

##### ACTUAL RESULTS
<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes below -->
```

```



Discussion:

Resolving patch:
diff --git a/lib/ansible/modules/cloud/amazon/route53_facts.py b/lib/ansible/modules/cloud/amazon/route53_facts.py
--- a/lib/ansible/modules/cloud/amazon/route53_facts.py
+++ b/lib/ansible/modules/cloud/amazon/route53_facts.py
@@ -56,9 +56,10 @@
   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 @@
     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(


Test patch:
diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt
--- 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