Repository: ansible/ansible
Pull request: meraki_admin - Add documentation for tags and network access
##### SUMMARY
Documentation now lists examples for the tags and network dictionary structure.

Fixes #42686

##### ISSUE TYPE
- Docs Pull Request

##### COMPONENT NAME
meraki_admin

Problem statement:
meraki_admin - Add examples for networks and tags
##### SUMMARY
The `meraki_admin` module accepts `tags` and `networks` parameters but they aren't well documented. It should

* State they need to be passed as dicts
* Provide examples

##### ISSUE TYPE
 - Documentation Report

##### COMPONENT NAME
meraki_admin

##### ANSIBLE VERSION
```
2.7
```

Hints from issue discussion:
Files identified in the description:
* [lib/ansible/modules/network/meraki/meraki_admin.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/meraki/meraki_admin.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 @dagwieers
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Commit message: Remove whitespace

Patch to review:
diff --git a/lib/ansible/modules/network/meraki/meraki_admin.py b/lib/ansible/modules/network/meraki/meraki_admin.py
index 832bbcd95e63dc..e8bef103e9a3e9 100644
--- a/lib/ansible/modules/network/meraki/meraki_admin.py
+++ b/lib/ansible/modules/network/meraki/meraki_admin.py
@@ -43,6 +43,8 @@
         description:
         - List of networks the administrator has privileges on.
         - When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
+        - C(id) is the network ID.
+        - C(access) is the access level to be assigned for the network ID.
     state:
         description:
         - Create or modify an organization
@@ -117,6 +119,28 @@
     org_name: YourOrg
     state: absent
     email: jane@doe.com
+
+- name: Create a new administrator with full access to a tag
+  meraki_admin:
+    auth_key: abc12345
+    org_name: YourOrg
+    state: present
+    name: Jane Doe
+    orgAccess: read-only
+    email: jane@doe.com
+    tags:
+        - {"tag": "tenant", "access": "full"}
+
+- name: Create a new administrator with full access to a network
+  meraki_admin:
+    auth_key: abc12345
+    org_name: YourOrg
+    state: present
+    name: Jane Doe
+    orgAccess: read-only
+    email: jane@doe.com
+    networks:
+        - {"id": "N_12345", "access": "full"}
 '''
 
 RETURN = r'''


Code review comments:
diff_hunk: @@ -117,6 +119,28 @@
     org_name: YourOrg
     state: absent
     email: jane@doe.com
+
+- name: Create a new administrator with full access to a tag
+  meraki_admin:
+    auth_key: abc12345
+    org_name: YourOrg
+    state: present
+    name: Jane Doe
+    orgAccess: read-only
+    email: jane@doe.com
+    tags:
+        - {"tag": "tenant", "access": "full"}
path: lib/ansible/modules/network/meraki/meraki_admin.py
text: @user1:
This tag/access isn't defined in the description for tags. Can you add that information like you did for the json dict for networks?

@author:
I've updated this so please take a look and let me know if what I have is more obvious.

diff_hunk: @@ -43,6 +43,8 @@
         description:
         - List of networks the administrator has privileges on.
         - When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
+        - C(id) is the network ID.
path: lib/ansible/modules/network/meraki/meraki_admin.py
text: @user1:
It wasn't clear to me what this new id and access referred to until I looked at the new examples. How about a line in the description that says something like "This list is a json dict with two parameters, C(id) and C(access)."  Also glancing at the code, it seems access can only be set to three choices. Would be worth adding that to this description as well.

@user2:
No, we have a construct for this already. Please use `suboptions`, check any of the modules using, like: *lib/ansible/modules/network/aci/mso_site.py*