Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meraki_admin - Add documentation for tags and network access #51415

Merged
merged 6 commits into from
Mar 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions lib/ansible/modules/network/meraki/meraki_admin.py
Expand Up @@ -39,10 +39,29 @@
- Tags the administrator has privileges on.
- When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
- If C(none) is specified, C(network) or C(tags) must be specified.
suboptions:
tag:
description:
- Object tag which privileges should be assigned.
type: str
access:
description:
- The privilege of the dashboard administrator for the tag.
type: str
networks:
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.
suboptions:
id:
description:
- Network ID for which administrator should have privileges assigned.
type: str
access:
description:
- The privilege of the dashboard administrator on the network.
- Valid options are C(full), C(read-only), or C(none).
type: str
state:
description:
- Create or modify an organization
Expand Down Expand Up @@ -117,6 +136,32 @@
org_name: YourOrg
state: absent
email: jane@doe.com

- name: Create a new administrator with full access to two tags
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
- tag: corporate
access: read-only

- 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'''
Expand Down
3 changes: 2 additions & 1 deletion test/integration/targets/meraki_admin/tasks/main.yml
Expand Up @@ -57,7 +57,8 @@
orgAccess: none
tags:
- { "tag": "production", "access": "read-only" }
kbreit marked this conversation as resolved.
Show resolved Hide resolved
- { "tag": "beta", "access": "full" }
- tag: beta
access: full
delegate_to: localhost
register: create_tags

Expand Down