ansible.builtin.manageiq_group (v2.9.27) — module

Management of groups in ManageIQ.

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

Authors: Evert Mulder (@evertmulder)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

The manageiq_group module supports adding, updating and deleting groups in ManageIQ.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a group in ManageIQ with the role EvmRole-user and tenant 'my_tenant'
  manageiq_group:
    description: 'MyGroup-user'
    role: 'EvmRole-user'
    tenant: 'my_tenant'
    manageiq_connection:
      url: 'https://manageiq_server'
      username: 'admin'
      password: 'smartvm'
      validate_certs: False
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a group in ManageIQ with the role EvmRole-user and tenant with tenant_id 4
  manageiq_group:
    description: 'MyGroup-user'
    role: 'EvmRole-user'
    tenant_id: 4
    manageiq_connection:
      url: 'https://manageiq_server'
      username: 'admin'
      password: 'smartvm'
      validate_certs: False
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name:
  - Create or update a group in ManageIQ with the role EvmRole-user and tenant my_tenant.
  - Apply 3 prov_max_cpu and 2 department tags to the group.
  - Limit access to a cluster for the group.
  manageiq_group:
    description: 'MyGroup-user'
    role: 'EvmRole-user'
    tenant: my_tenant
    managed_filters:
      prov_max_cpu:
      - '1'
      - '2'
      - '4'
      department:
      - defense
      - engineering
    managed_filters_merge_mode: replace
    belongsto_filters:
    - "/belongsto/ExtManagementSystem|ProviderName/EmsFolder|Datacenters/EmsFolder|dc_name/EmsFolder|host/EmsCluster|Cluster name"
    belongsto_filters_merge_mode: merge
    manageiq_connection:
      url: 'https://manageiq_server'
      username: 'admin'
      password: 'smartvm'
      validate_certs: False
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete a group in ManageIQ
  manageiq_group:
    state: 'absent'
    description: 'MyGroup-user'
    manageiq_connection:
      url: 'http://127.0.0.1:3000'
      username: 'admin'
      password: 'smartvm'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete a group in ManageIQ using a token
  manageiq_group:
    state: 'absent'
    description: 'MyGroup-user'
    manageiq_connection:
      url: 'http://127.0.0.1:3000'
      token: 'sometoken'

Inputs

    
role:
    default: null
    description:
    - The the group role name
    - The C(role_id) has precedence over the C(role) when supplied.
    required: false

state:
    choices:
    - absent
    - present
    default: present
    description:
    - absent - group should not exist, present - group should be.

tenant:
    default: null
    description:
    - The tenant for the group identified by the tenant name.
    - The C(tenant_id) has precedence over the C(tenant) when supplied.
    - Tenant names are case sensitive.
    required: false

role_id:
    default: null
    description:
    - The the group role id
    required: false

tenant_id:
    default: null
    description:
    - The tenant for the group identified by the tenant id.
    required: false

description:
    default: null
    description:
    - The group description.
    required: true

managed_filters:
    default: null
    description: The tag values per category
    required: false
    type: dict

belongsto_filters:
    default: null
    description: A list of strings with a reference to the allowed host, cluster or folder
    required: false
    type: list

manageiq_connection:
    description:
    - ManageIQ connection configuration information.
    required: false
    suboptions:
      ca_cert:
        aliases:
        - ca_bundle_path
        description:
        - The path to a CA bundle file or directory with certificates. defaults to None.
        type: str
      password:
        description:
        - ManageIQ password. C(MIQ_PASSWORD) env var if set. otherwise, required if no
          token is passed in.
        type: str
      token:
        description:
        - ManageIQ token. C(MIQ_TOKEN) env var if set. otherwise, required if no username
          or password is passed in.
        type: str
      url:
        description:
        - ManageIQ environment url. C(MIQ_URL) env var if set. otherwise, it is required
          to pass it.
        required: false
        type: str
      username:
        description:
        - ManageIQ username. C(MIQ_USERNAME) env var if set. otherwise, required if no
          token is passed in.
        type: str
      validate_certs:
        aliases:
        - verify_ssl
        default: true
        description:
        - Whether SSL certificates should be verified for HTTPS requests. defaults to
          True.
        type: bool
    type: dict

managed_filters_merge_mode:
    choices:
    - merge
    - replace
    default: replace
    description:
    - In merge mode existing categories are kept or updated, new categories are added.
    - In replace mode all categories will be replaced with the supplied C(managed_filters).

belongsto_filters_merge_mode:
    choices:
    - merge
    - replace
    default: replace
    description:
    - In merge mode existing settings are merged with the supplied C(belongsto_filters).
    - In replace mode current values are replaced with the supplied C(belongsto_filters).

Outputs

group:
  contains:
    belongsto_filters:
      description: A list of strings with a reference to the allowed host, cluster
        or folder
      returned: success
      type: list
    created_on:
      description: Group creation date
      returned: success
      sample: '2018-08-12T08:37:55+00:00'
      type: str
    description:
      description: The group description
      returned: success
      type: str
    group_type:
      description: The group type, system or user
      returned: success
      type: str
    id:
      description: The group id
      returned: success
      type: int
    managed_filters:
      description: The tag values per category
      returned: success
      type: dict
    role:
      description: The group role name
      returned: success
      type: str
    tenant:
      description: The group tenant name
      returned: success
      type: str
    updated_on:
      description: Group update date
      returned: success
      sample: '2018-08-12T08:37:55+00:00'
      type: int
  description: The group.
  returned: success
  type: complex