Repository: ansible/ansible
Pull request: fix ansible/ansible#54223
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
Fixes #54223 by dropping gratuitous comma in argument_spec
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->

##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bugfix Pull Request

##### COMPONENT NAME
cloudflare_dns



Problem statement:
TypeError: unhashable type: 'list' in cloudflare_dns module (from extra comma in argument_spec)
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
works in 2.7.9 but not in 2.8.0dev0. 

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
modules/net_tools/cloudflare_dns.py
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.0.dev0
  config file = /home/mz0/do3/ansible.cfg
  configured module search path = [u'/home/mz0/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /shr/bemigot/do2/lib/ansible
  executable location = /shr/bemigot/do2/bin/ansible
  python version = 2.7.15+ (default, Oct  2 2018, 22:12:08) [GCC 8.2.0]
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
RETRY_FILES_ENABLED(/home/mz0/do3/ansible.cfg) = False
```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Same behavior when running with (virtualenv) Python 3.7

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
Any playbook will fail i suppose. The problem is internal to this module and is easy to fix.
<!--- Paste example playbooks or commands between quotes below -->
```yaml

```

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->


##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes -->
```paste below

```

Hints from issue discussion:
Files identified in the description:
* [lib/ansible/modules/net_tools/cloudflare_dns.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/net_tools/cloudflare_dns.py)

If these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @andreaso @mgruener
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Commit message: fix ansible/ansible#54223

Patch to review:
diff --git a/lib/ansible/modules/net_tools/cloudflare_dns.py b/lib/ansible/modules/net_tools/cloudflare_dns.py
index 1e1bb6aa4a26af..2f3644f98d91e8 100644
--- a/lib/ansible/modules/net_tools/cloudflare_dns.py
+++ b/lib/ansible/modules/net_tools/cloudflare_dns.py
@@ -794,7 +794,7 @@ def main():
             ('state', 'absent', ['record']),
             ('type', 'SRV', ['proto', 'service']),
             ('type', 'TLSA', ['proto', 'port']),
-        ],
+        ]
         ),
     )
 


Code review comments:
diff_hunk: @@ -794,7 +794,7 @@ def main():
             ('state', 'absent', ['record']),
             ('type', 'SRV', ['proto', 'service']),
             ('type', 'TLSA', ['proto', 'port']),
-        ],
+        ]
path: lib/ansible/modules/net_tools/cloudflare_dns.py
text: @user1:
How about - 

```python
required_if=[
            ('state', 'present', ['record', 'type', 'value']),
            ('state', 'absent', ['record']),
            ('type', 'SRV', ['proto', 'service']),
            ('type', 'TLSA', ['proto', 'port']),
        ],
```

@author:
that's even better! Thanks @user1