community.general.manageiq_tenant module – Management of tenants in ManageIQ
Note
This module is part of the community.general collection (version 8.6.4).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.manageiq_tenant
.
Synopsis
The manageiq_tenant module supports adding, updating and deleting tenants in ManageIQ.
Aliases: remote_management.manageiq.manageiq_tenant
Requirements
The below requirements are needed on the host that executes this module.
manageiq-client
manageiq-client https://github.com/ManageIQ/manageiq-api-client-python/
Parameters
Parameter |
Comments |
---|---|
The tenant description. |
|
ManageIQ connection configuration information. |
|
The path to a CA bundle file or directory with certificates. |
|
ManageIQ password. |
|
ManageIQ token. |
|
ManageIQ environment URL. |
|
ManageIQ username. |
|
Whether SSL certificates should be verified for HTTPS requests. Choices:
|
|
The tenant name. |
|
The name of the parent tenant. If not supplied and no |
|
The tenant quotas. All parameters case sensitive. Valid attributes are:
Default: |
|
absent - tenant should not exist, present - tenant should be. Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Update the root tenant in ManageIQ
community.general.manageiq_tenant:
name: 'My Company'
description: 'My company name'
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: false # only do this when you trust the network!
- name: Create a tenant in ManageIQ
community.general.manageiq_tenant:
name: 'Dep1'
description: 'Manufacturing department'
parent_id: 1
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: false # only do this when you trust the network!
- name: Delete a tenant in ManageIQ
community.general.manageiq_tenant:
state: 'absent'
name: 'Dep1'
parent_id: 1
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: false # only do this when you trust the network!
- name: Set tenant quota for cpu_allocated, mem_allocated, remove quota for vms_allocated
community.general.manageiq_tenant:
name: 'Dep1'
parent_id: 1
quotas:
- cpu_allocated: 100
- mem_allocated: 50
- vms_allocated: null
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: false # only do this when you trust the network!
- name: Delete a tenant in ManageIQ using a token
community.general.manageiq_tenant:
state: 'absent'
name: 'Dep1'
parent_id: 1
manageiq_connection:
url: 'http://127.0.0.1:3000'
token: 'sometoken'
validate_certs: false # only do this when you trust the network!
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The tenant. Returned: success |
|
The tenant description Returned: success |
|
The tenant id Returned: success |
|
The tenant name Returned: success |
|
The id of the parent tenant Returned: success |
|
List of tenant quotas Returned: success Sample: |