manageiq_tenant – Management of tenants in ManageIQ
manageiq_tenant – Management of tenants in ManageIQ
New in version 2.8.
Synopsis
- The manageiq_tenant module supports adding, updating and deleting tenants in ManageIQ.
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 | Choices/Defaults | Comments | |
---|---|---|---|
description - / required |
Default: null |
The tenant description. | |
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.
| ||
password string |
ManageIQ password. | ||
token string |
ManageIQ token. | ||
url string / required |
ManageIQ environment url. | ||
username string |
ManageIQ username. | ||
validate_certs boolean |
|
Whether SSL certificates should be verified for HTTPS requests. defaults to True.
| |
name - / required |
Default: null |
The tenant name. | |
parent - |
Default: null |
The name of the parent tenant. If not supplied and no | |
parent_id - |
Default: null |
The id of the parent tenant. If not supplied the root tenant is used. The | |
quotas - |
Default: null |
The tenant quotas. All parameters case sensitive. Valid attributes are: - - - - - | |
state - |
|
absent - tenant should not exist, present - tenant should be. |
Examples
- name: Update the root tenant in ManageIQ
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
- name: Create a tenant in ManageIQ
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
- name: Delete a tenant in ManageIQ
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
- name: Set tenant quota for cpu_allocated, mem_allocated, remove quota for vms_allocated
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
- name: Delete a tenant in ManageIQ using a token
manageiq_tenant:
state: 'absent'
name: 'Dep1'
parent_id: 1
manageiq_connection:
url: 'http://127.0.0.1:3000'
token: 'sometoken'
validate_certs: False
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
tenant complex |
success |
The tenant.
| |
description string |
success |
The tenant description
| |
id integer |
success |
The tenant id
| |
name string |
success |
The tenant name
| |
parent_id integer |
success |
The id of the parent tenant
| |
quotas list |
success |
List of tenant quotas
Sample: {'cpu_allocated': 100, 'mem_allocated': 50} |
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- Evert Mulder (@evertmulder)
© 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_tenant_module.html