redhat.satellite.compute_profile module – Manage Compute Profiles
Note
This module is part of the redhat.satellite collection (version 3.3.0).
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 redhat.satellite
.
To use it in a playbook, specify: redhat.satellite.compute_profile
.
New in version 1.0.0: of redhat.satellite
Synopsis
Create, update, and delete Compute Profiles
Requirements
The below requirements are needed on the host that executes this module.
requests
Parameters
Parameter |
Comments |
---|---|
Compute attributes related to this compute profile. Some of these attributes are specific to the underlying compute resource type |
|
Name of the compute resource the attribute should be for |
|
Hash containing the data of vm_attrs |
|
compute profile name |
|
Password of the user accessing the Foreman server. If the value is not specified in the task, the value of environment variable |
|
URL of the Foreman server. If the value is not specified in the task, the value of environment variable |
|
State of the entity Choices:
|
|
new compute profile name |
|
Username accessing the Foreman server. If the value is not specified in the task, the value of environment variable |
|
Whether or not to verify the TLS certificates of the Foreman server. If the value is not specified in the task, the value of environment variable Choices:
|
Examples
- name: compute profile
redhat.satellite.compute_profile:
name: example_compute_profile
server_url: "https://satellite.example.com"
username: "admin"
password: "changeme"
state: present
- name: another compute profile
redhat.satellite.compute_profile:
name: another_example_compute_profile
compute_attributes:
- compute_resource: ovirt_compute_resource1
vm_attrs:
cluster: 'a96d44a4-f14a-1015-82c6-f80354acdf01'
template: 'c88af4b7-a24a-453b-9ac2-bc647ca2ef99'
instance_type: 'cb8927e7-a404-40fb-a6c1-06cbfc92e077'
server_url: "https://satellite.example.com"
username: "admin"
password: "changeme"
state: present
- name: compute profile2
redhat.satellite.compute_profile:
name: example_compute_profile2
compute_attributes:
- compute_resource: ovirt_compute_resource01
vm_attrs:
cluster: a96d44a4-f14a-1015-82c6-f80354acdf01
cores: 1
sockets: 1
memory: 1073741824
ha: 0
interfaces_attributes:
0:
name: ""
network: 390666e1-dab3-4c99-9f96-006b2e2fd801
interface: virtio
volumes_attributes:
0:
size_gb: 16
storage_domain: 19c50090-1ab4-4023-a63f-75ee1018ed5e
preallocate: '1'
wipe_after_delete: '0'
interface: virtio_scsi
bootable: 'true'
- compute_resource: libvirt_compute_resource03
vm_attrs:
cpus: 1
memory: 2147483648
nics_attributes:
0:
type: bridge
bridge: ""
model: virtio
volumes_attributes:
0:
pool_name: default
capacity: 16G
allocation: 16G
format_type: raw
server_url: "https://satellite.example.com"
username: "admin"
password: "changeme"
state: present
- name: Remove compute profile
redhat.satellite.compute_profile:
name: example_compute_profile2
server_url: "https://satellite.example.com"
username: "admin"
password: "changeme"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Final state of the affected entities grouped by their type. Returned: success |
|
List of compute profiles. Returned: success |
|
Attributes for this compute profile. Returned: success |
|
Database id of the compute profile. Returned: success |
|
Name of the compute profile. Returned: success |