mnecas / mnecas.ovirt / 1.5.5 / module / ovirt_quota Module to manage datacenter quotas in oVirt/RHV | "added in version" 1.0.0 of mnecas.ovirt" Authors: Ondra Machacek (@machacekondra), Martin Necas (@mnecas)mnecas.ovirt.ovirt_quota (1.5.5) — module
Install with ansible-galaxy collection install mnecas.ovirt:==1.5.5
collections: - name: mnecas.ovirt version: 1.5.5
Module to manage datacenter quotas in oVirt/RHV
# Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: # Add cluster quota to cluster cluster1 with memory limit 20GiB and CPU limit to 10: - mnecas.ovirt.ovirt_quota: name: quota1 data_center: dcX clusters: - name: cluster1 memory: 20 cpu: 10
# Add cluster quota to all clusters with memory limit 30GiB and CPU limit to 15: - mnecas.ovirt.ovirt_quota: name: quota2 data_center: dcX clusters: - memory: 30 cpu: 15
# Add storage quota to storage data1 with size limit to 100GiB - mnecas.ovirt.ovirt_quota: name: quota3 data_center: dcX storage_grace: 40 storage_threshold: 60 storages: - name: data1 size: 100
# Remove quota quota1 (Note the quota must not be assigned to any VM/disk): - mnecas.ovirt.ovirt_quota: state: absent data_center: dcX name: quota1
# Change Quota Name - mnecas.ovirt.ovirt_quota: id: 00000000-0000-0000-0000-000000000000 name: "new_quota_name" data_center: dcX
id: description: - ID of the quota to manage. type: str auth: description: - 'Dictionary with values needed to create HTTP/HTTPS connection to oVirt:' required: true suboptions: ca_file: description: - A PEM file containing the trusted CA certificates. - The certificate presented by the server will be verified using these CA certificates. - If C(ca_file) parameter is not set, system wide CA certificate store is used. - Default value is set by C(OVIRT_CAFILE) environment variable. type: str compress: default: true description: Flag indicating if compression is used for connection. type: bool headers: description: - Dictionary of HTTP headers to be added to each API call. type: dict hostname: description: - A string containing the hostname of the server, usually something like `I(server.example.com)`. - Default value is set by C(OVIRT_HOSTNAME) environment variable. - Either C(url) or C(hostname) is required. type: str insecure: default: false description: - A boolean flag that indicates if the server TLS certificate and host name should be checked. type: bool kerberos: description: - A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. type: bool password: description: - The password of the user. - Default value is set by C(OVIRT_PASSWORD) environment variable. required: true type: str timeout: description: Number of seconds to wait for response. type: int token: description: - Token to be used instead of login with username/password. - Default value is set by C(OVIRT_TOKEN) environment variable. type: str url: description: - A string containing the API URL of the server, usually something like `I(https://server.example.com/ovirt-engine/api)`. - Default value is set by C(OVIRT_URL) environment variable. - Either C(url) or C(hostname) is required. type: str username: description: - The name of the user, something like I(admin@internal). - Default value is set by C(OVIRT_USERNAME) environment variable. required: true type: str type: dict name: description: - Name of the quota to manage. required: true type: str wait: default: true description: - C(yes) if the module should wait for the entity to get into desired state. type: bool state: choices: - present - absent default: present description: - Should the quota be present/absent. type: str timeout: default: 180 description: - The amount of time in seconds the module should wait for the instance to get into desired state. type: int clusters: description: - List of dictionary of cluster limits, which is valid to specific cluster. - 'If cluster isn''t specified it''s valid to all clusters in system:' elements: dict suboptions: cluster: description: - Name of the cluster. cpu: description: - CPU limit. memory: description: - Memory limit (in GiB). type: list storages: description: - List of dictionary of storage limits, which is valid to specific storage. - 'If storage isn''t specified it''s valid to all storages in system:' elements: dict suboptions: size: description: - Size limit (in GiB). storage: description: - Name of the storage. type: list data_center: description: - Name of the datacenter where quota should be managed. required: true type: str description: description: - Description of the quota to manage. type: str fetch_nested: default: false description: - If I(True) the module will fetch additional data from the API. - It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying C(nested_attributes). type: bool cluster_grace: aliases: - cluster_hard_limit description: - Cluster grace(hard limit) defined in percentage (1-100). type: int poll_interval: default: 3 description: - Number of the seconds the module waits until another poll request on entity status is sent. type: int storage_grace: aliases: - storage_hard_limit description: - Storage grace(hard limit) defined in percentage (1-100). type: int cluster_threshold: aliases: - cluster_soft_limit description: - Cluster threshold(soft limit) defined in percentage (0-100). type: int nested_attributes: description: - Specifies list of the attributes which should be fetched from the API. - This parameter apply only when C(fetch_nested) is I(true). elements: str type: list storage_threshold: aliases: - storage_soft_limit description: - Storage threshold(soft limit) defined in percentage (0-100). type: int
id: description: ID of the quota which is managed returned: On success if quota is found. sample: 7de90f31-222c-436c-a1ca-7e655bd5b60c type: str quota: description: 'Dictionary of all the quota attributes. Quota attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/quota.' returned: On success if quota is found. type: dict