W3cubDocs

/Ansible 2.9

manageiq_group – Management of groups in ManageIQ

New in version 2.8.

Synopsis

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

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
belongsto_filters
list
Default:
null
A list of strings with a reference to the allowed host, cluster or folder
belongsto_filters_merge_mode
-
    Choices:
  • merge
  • replace
In merge mode existing settings are merged with the supplied belongsto_filters.
In replace mode current values are replaced with the supplied belongsto_filters.
description
- / required
Default:
null
The group description.
managed_filters
dictionary
Default:
null
The tag values per category
managed_filters_merge_mode
-
    Choices:
  • merge
  • replace
In merge mode existing categories are kept or updated, new categories are added.
In replace mode all categories will be replaced with the supplied managed_filters.
manageiq_connection
dictionary / required
ManageIQ connection configuration information.
ca_cert
path
The path to a CA bundle file or directory with certificates. defaults to None.

aliases: ca_bundle_path
password
string
ManageIQ password. MIQ_PASSWORD env var if set. otherwise, required if no token is passed in.
token
string
ManageIQ token. MIQ_TOKEN env var if set. otherwise, required if no username or password is passed in.
url
string / required
ManageIQ environment url. MIQ_URL env var if set. otherwise, it is required to pass it.
username
string
ManageIQ username. MIQ_USERNAME env var if set. otherwise, required if no token is passed in.
validate_certs
boolean
    Choices:
  • no
  • yes
Whether SSL certificates should be verified for HTTPS requests. defaults to True.

aliases: verify_ssl
role
-
Default:
null
The the group role name
The role_id has precedence over the role when supplied.
role_id
-
Default:
null
The the group role id
state
-
    Choices:
  • absent
  • present
absent - group should not exist, present - group should be.
tenant
-
Default:
null
The tenant for the group identified by the tenant name.
The tenant_id has precedence over the tenant when supplied.
Tenant names are case sensitive.
tenant_id
-
Default:
null
The tenant for the group identified by the tenant id.

Examples

- 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

- 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

- 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

- 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'

- 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'

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
group
complex
success
The group.

belongsto_filters
list
success
A list of strings with a reference to the allowed host, cluster or folder

created_on
string
success
Group creation date

Sample:
2018-08-12T08:37:55+00:00
description
string
success
The group description

group_type
string
success
The group type, system or user

id
integer
success
The group id

managed_filters
dictionary
success
The tag values per category

role
string
success
The group role name

tenant
string
success
The group tenant name

updated_on
integer
success
Group update date

Sample:
2018-08-12T08:37:55+00:00


Status

Authors

  • Evert Mulder (@evertmulder)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/manageiq_group_module.html