ansible / ansible.builtin / v2.9.27 / module / manageiq_tenant Management of tenants in ManageIQ. | "added in version" 2.8 of ansible.builtin" Authors: Evert Mulder (@evertmulder) preview | supported by communityansible.builtin.manageiq_tenant (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
The manageiq_tenant module supports adding, updating and deleting tenants in ManageIQ.
- 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
name: default: null description: - The tenant name. required: true state: choices: - absent - present default: present description: - absent - tenant should not exist, present - tenant should be. parent: default: null description: - The name of the parent tenant. If not supplied and no C(parent_id) is supplied the root tenant is used. required: false quotas: default: null description: - The tenant quotas. - All parameters case sensitive. - 'Valid attributes are:' - ' - C(cpu_allocated) (int): use null to remove the quota.' - ' - C(mem_allocated) (GB): use null to remove the quota.' - ' - C(storage_allocated) (GB): use null to remove the quota.' - ' - C(vms_allocated) (int): use null to remove the quota.' - ' - C(templates_allocated) (int): use null to remove the quota.' required: false parent_id: default: null description: - The id of the parent tenant. If not supplied the root tenant is used. - The C(parent_id) takes president over C(parent) when supplied required: false description: default: null description: - The tenant description. required: true 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
tenant: contains: description: description: The tenant description returned: success type: str id: description: The tenant id returned: success type: int name: description: The tenant name returned: success type: str parent_id: description: The id of the parent tenant returned: success type: int quotas: description: List of tenant quotas returned: success sample: cpu_allocated: 100 mem_allocated: 50 type: list description: The tenant. returned: success type: complex