ansible.builtin.mso_role (v2.8.11) — module

Manage roles

| "added in version" 2.8 of ansible.builtin"

Authors: Dag Wieers (@dagwieers)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.8.11

Description

Manage roles on Cisco ACI Multi-Site.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add a new role
  mso_role:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    role: readOnly
    display_name: Read Only
    description: Read-only access for troubleshooting
    permissions:
    - view-roles
    - view-schemas
    - view-sites
    - view-tenants
    - view-tenant-schemas
    - view-users
    state: present
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove a role
  mso_role:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    role: readOnly
    state: absent
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query a role
  mso_role:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    role: readOnly
    state: query
  delegate_to: localhost
  register: query_result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query all roles
  mso_role:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    state: query
  delegate_to: localhost
  register: query_result

Inputs

    
host:
    aliases:
    - hostname
    description:
    - 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.
    type: str

port:
    description:
    - 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.
    type: int

role:
    aliases:
    - name
    description:
    - The name of the role.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    - query
    default: present
    description:
    - Use C(present) or C(absent) for adding or removing.
    - Use C(query) for listing an object or multiple objects.
    type: str

timeout:
    description:
    - 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.
    type: int

use_ssl:
    description:
    - 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).
    type: bool

password:
    description:
    - 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.
    type: str

username:
    description:
    - 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.
    type: str

use_proxy:
    description:
    - 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).
    type: bool

description:
    description:
    - The description of the role.
    type: str

permissions:
    choices:
    - backup-db
    - manage-audit-records
    - manage-labels
    - manage-roles
    - manage-schemas
    - manage-sites
    - manage-tenants
    - manage-tenant-schemas
    - manage-users
    - platform-logs
    - view-all-audit-records
    - view-labels
    - view-roles
    - view-schemas
    - view-sites
    - view-tenants
    - view-tenant-schemas
    - view-users
    description:
    - A list of permissions tied to this role.
    type: list

display_name:
    description:
    - The name of the role to be displayed in the web UI.
    type: str

login_domain:
    description:
    - 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.
    type: str

output_level:
    choices:
    - debug
    - info
    - normal
    default: normal
    description:
    - 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.
    type: str

validate_certs:
    description:
    - 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).
    type: bool