mso_role
Manage roles on Cisco Multi-Site Orchestrator
Collection: cisco.mso
Full Name: cisco.mso.mso_role
Synopsis
Manage roles on Cisco Multi-Site Orchestrator
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| host | string | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable C(MSO_HOST) will be used instead. | ||
| port | int | Port number to be used for the REST connection. The default value depends on parameter use_ssl. If the value is not specified in the task, the value of environment variable C(MSO_PORT) will be used instead. | ||
| username | string | The username to use for authentication. If the value is not specified in the task, the value of environment variables C(MSO_USERNAME) or C(ANSIBLE_NET_USERNAME) will be used instead. | ||
| password | string | The password to use for authentication. If the value is not specified in the task, the value of environment variables C(MSO_PASSWORD) or C(ANSIBLE_NET_PASSWORD) will be used instead. | ||
| output_level | string | normal | Influence the output of this MSO module. C(normal) means the standard output, incl. C(current) dict C(info) adds informational output, incl. C(previous), C(proposed) and C(sent) dicts C(debug) adds debugging output, incl. C(filter_string), C(method), C(response), C(status) and C(url) information If the value is not specified in the task, the value of environment variable C(MSO_OUTPUT_LEVEL) will be used instead. | |
| timeout | int | The socket level timeout in seconds. The default value is 30 seconds. If the value is not specified in the task, the value of environment variable C(MSO_TIMEOUT) will be used instead. | ||
| use_proxy | bool | If C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. If the value is not specified in the task, the value of environment variable C(MSO_USE_PROXY) will be used instead. The default is C(true). | ||
| use_ssl | bool | If C(false), an HTTP connection will be used instead of the default HTTPS connection. If the value is not specified in the task, the value of environment variable C(MSO_USE_SSL) will be used instead. When using a HTTPAPI connection plugin the inventory variable C(ansible_httpapi_use_ssl) will be used if this attribute is not specified. The default is C(false) when using a HTTPAPI connection plugin (mso or nd) and C(true) when using the legacy connection method (only for mso). | ||
| validate_certs | bool | If C(false), SSL certificates will not be validated. This should only set to C(false) when used on personally controlled sites using self-signed certificates. If the value is not specified in the task, the value of environment variable C(MSO_VALIDATE_CERTS) will be used instead. The default is C(true). | ||
| login_domain | string | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable C(MSO_LOGIN_DOMAIN) will be used instead. When using a HTTPAPI connection plugin the inventory variable C(ansible_httpapi_login_domain) will be used if this attribute is not specified. | ||
| role | string | The name of the role. | ||
| display_name | string | The name of the role to be displayed in the web UI. | ||
| description | string | The description of the role. | ||
| read_permissions | list | A list of read permissions tied to this role. | ||
| write_permissions | list | A list of write permissions tied to this role. | ||
| state | string | present | Use C(present) or C(absent) for adding or removing. Use C(query) for listing an object or multiple objects. |
Example
yaml
- cisco.mso.mso_role:
description: Read-only access for troubleshooting
display_name: Read Only
host: mso_host
password: SomeSecretPassword
read_permissions:
- view-roles
- view-schemas
- view-sites
- view-tenants
- view-tenant-schemas
- view-users
role: readOnly
state: present
username: admin
write_permissions:
- manage-roles
- manage-schemas
- manage-sites
- manage-tenants
- manage-tenant-schemas
- manage-users
name: Add a new role
- cisco.mso.mso_role:
host: mso_host
password: SomeSecretPassword
role: readOnly
state: absent
username: admin
name: Remove a role
- cisco.mso.mso_role:
host: mso_host
password: SomeSecretPassword
role: readOnly
state: query
username: admin
name: Query a role
register: query_result
- cisco.mso.mso_role:
host: mso_host
password: SomeSecretPassword
state: query
username: admin
name: Query all roles
register: query_result