community / community.general / 6.6.8 / module / manageiq_group Management of groups in ManageIQ Authors: Evert Mulder (@evertmulder)community.general.manageiq_group (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
The manageiq_group module supports adding, updating and deleting groups in ManageIQ.
- name: Create a group in ManageIQ with the role EvmRole-user and tenant 'my_tenant' community.general.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 community.general.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. community.general.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 community.general.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 community.general.manageiq_group: state: 'absent' description: 'MyGroup-user' manageiq_connection: url: 'http://127.0.0.1:3000' token: 'sometoken'
role: default: null description: - The the group role name - The C(role_id) has precedence over the C(role) when supplied. required: false type: str state: choices: - absent - present default: present description: - absent - group should not exist, present - group should be. type: str 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 type: str role_id: default: null description: - The the group role id required: false type: int tenant_id: default: null description: - The tenant for the group identified by the tenant id. required: false type: int description: default: null description: - The group description. required: true type: str 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 elements: str 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). type: str 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). type: str
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