` for details.
To use it in a playbook, specify: :code:`theforeman.foreman.compute_resource`.
.. version_added
.. rst-class:: ansible-version-added
New in theforeman.foreman 1.0.0
.. contents::
:local:
:depth: 1
.. Deprecated
Synopsis
--------
.. Description
- Create, update, and delete Compute Resources
.. Aliases
Aliases: foreman_compute_resource
.. Requirements
.. _ansible_collections.theforeman.foreman.compute_resource_module_requirements:
Requirements
------------
The below requirements are needed on the host that executes this module.
- requests
.. Options
Parameters
----------
.. tabularcolumns:: \X{1}{3}\X{2}{3}
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table
* - Parameter
- Comments
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-ca_path:
.. rst-class:: ansible-option-title
**ca_path**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`path`
.. raw:: html
- .. raw:: html
PEM formatted file that contains a CA certificate to be used for validation.
If the value is not specified in the task, the value of environment variable :literal:`FOREMAN\_CA\_PATH` will be used instead.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-description:
.. rst-class:: ansible-option-title
**description**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
compute resource description
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-locations:
.. rst-class:: ansible-option-title
**locations**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=string`
.. raw:: html
- .. raw:: html
List of locations the entity should be assigned to
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-name:
.. rst-class:: ansible-option-title
**name**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
compute resource name
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-organizations:
.. rst-class:: ansible-option-title
**organizations**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=string`
.. raw:: html
- .. raw:: html
List of organizations the entity should be assigned to
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-password:
.. rst-class:: ansible-option-title
**password**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Password of the user accessing the Foreman server.
If the value is not specified in the task, the value of environment variable :literal:`FOREMAN\_PASSWORD` will be used instead.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider:
.. rst-class:: ansible-option-title
**provider**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Compute resource provider. Required if :emphasis:`state=present\_with\_defaults`.
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`"vmware"`
- :ansible-option-choices-entry:`"libvirt"`
- :ansible-option-choices-entry:`"ovirt"`
- :ansible-option-choices-entry:`"proxmox"`
- :ansible-option-choices-entry:`"EC2"`
- :ansible-option-choices-entry:`"AzureRm"`
- :ansible-option-choices-entry:`"GCE"`
- :ansible-option-choices-entry:`"Openstack"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params:
.. rst-class:: ansible-option-title
**provider_params**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
.. raw:: html
- .. raw:: html
Parameter specific to compute resource provider. Required if :emphasis:`state=present\_with\_defaults`.
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/app_ident:
.. rst-class:: ansible-option-title
**app_ident**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
AzureRM client id
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/caching_enabled:
.. rst-class:: ansible-option-title
**caching_enabled**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
enable caching for :emphasis:`provider=vmware`
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`false`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/cloud:
.. rst-class:: ansible-option-title
**cloud**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
:ansible-option-versionadded:`added in theforeman.foreman 2.1.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
cloud for :emphasis:`provider=AzureRm`
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`"azure"`
- :ansible-option-choices-entry:`"azureusgovernment"`
- :ansible-option-choices-entry:`"azurechina"`
- :ansible-option-choices-entry:`"azuregermancloud"`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/datacenter:
.. rst-class:: ansible-option-title
**datacenter**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Datacenter the compute resource is in, not valid for :emphasis:`provider=libvirt`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/display_type:
.. rst-class:: ansible-option-title
**display_type**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Display type to use for the remote console, only valid for :emphasis:`provider=libvirt`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/domain:
.. rst-class:: ansible-option-title
**domain**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Auth domain for users, only valid for :emphasis:`provider=Openstack`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/email:
.. rst-class:: ansible-option-title
**email**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Email for :emphasis:`provider=GCE`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/key_path:
.. rst-class:: ansible-option-title
**key_path**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Certificate path for :emphasis:`provider=GCE`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/keyboard_layout:
.. rst-class:: ansible-option-title
**keyboard_layout**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
:ansible-option-versionadded:`added in theforeman.foreman 2.0.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Default VNC Keyboard for :emphasis:`provider=ovirt`
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`"ar"`
- :ansible-option-choices-entry:`"da"`
- :ansible-option-choices-entry:`"de"`
- :ansible-option-choices-entry:`"de-ch"`
- :ansible-option-choices-entry:`"en-gb"`
- :ansible-option-choices-entry:`"en-us"`
- :ansible-option-choices-entry:`"es"`
- :ansible-option-choices-entry:`"et"`
- :ansible-option-choices-entry:`"fi"`
- :ansible-option-choices-entry:`"fo"`
- :ansible-option-choices-entry:`"fr"`
- :ansible-option-choices-entry:`"fr-be"`
- :ansible-option-choices-entry:`"fr-ca"`
- :ansible-option-choices-entry:`"fr-ch"`
- :ansible-option-choices-entry:`"hr"`
- :ansible-option-choices-entry:`"hu"`
- :ansible-option-choices-entry:`"is"`
- :ansible-option-choices-entry:`"it"`
- :ansible-option-choices-entry:`"ja"`
- :ansible-option-choices-entry:`"lt"`
- :ansible-option-choices-entry:`"lv"`
- :ansible-option-choices-entry:`"mk"`
- :ansible-option-choices-entry:`"nl"`
- :ansible-option-choices-entry:`"nl-be"`
- :ansible-option-choices-entry:`"no"`
- :ansible-option-choices-entry:`"pl"`
- :ansible-option-choices-entry:`"pt"`
- :ansible-option-choices-entry:`"pt-br"`
- :ansible-option-choices-entry:`"ru"`
- :ansible-option-choices-entry:`"sl"`
- :ansible-option-choices-entry:`"sv"`
- :ansible-option-choices-entry:`"th"`
- :ansible-option-choices-entry:`"tr"`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/ovirt_quota:
.. rst-class:: ansible-option-title
**ovirt_quota**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
oVirt quota ID, only valid for :emphasis:`provider=ovirt`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/password:
.. rst-class:: ansible-option-title
**password**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Password for the compute resource connection, not valid for :emphasis:`provider=libvirt`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/project:
.. rst-class:: ansible-option-title
**project**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Project id for :emphasis:`provider=GCE`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/project_domain_id:
.. rst-class:: ansible-option-title
**project_domain_id**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Project domain id, only valid for :emphasis:`provider=Openstack`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/project_domain_name:
.. rst-class:: ansible-option-title
**project_domain_name**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Project domain name, only valid for :emphasis:`provider=Openstack`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/public_key:
.. rst-class:: ansible-option-title
**public_key**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
:ansible-option-versionadded:`added in theforeman.foreman 2.0.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
X509 Certification Authorities, only valid for :emphasis:`provider=ovirt`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/region:
.. rst-class:: ansible-option-title
**region**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
AWS region, AZURE region
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/set_console_password:
.. rst-class:: ansible-option-title
**set_console_password**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
:ansible-option-versionadded:`added in theforeman.foreman 2.0.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Set a randomly generated password on the display connection for :emphasis:`provider=vmware` and :emphasis:`provider=libvirt`
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`false`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/ssl_verify_peer:
.. rst-class:: ansible-option-title
**ssl_verify_peer**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
verify ssl from provider :emphasis:`provider=proxmox`
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`false`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/sub_id:
.. rst-class:: ansible-option-title
**sub_id**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
:ansible-option-versionadded:`added in theforeman.foreman 2.1.0`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Subscription ID for :emphasis:`provider=AzureRm`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/tenant:
.. rst-class:: ansible-option-title
**tenant**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
AzureRM tenant, Openstack project name
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/url:
.. rst-class:: ansible-option-title
**url**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
URL of the compute resource
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/use_v4:
.. rst-class:: ansible-option-title
**use_v4**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Use oVirt API v4, only valid for :emphasis:`provider=ovirt`
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`false`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/user:
.. rst-class:: ansible-option-title
**user**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
Username for the compute resource connection, not valid for :emphasis:`provider=libvirt`
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-provider_params/zone:
.. rst-class:: ansible-option-title
**zone**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
zone for :emphasis:`provider=GCE`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-server_url:
.. rst-class:: ansible-option-title
**server_url**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string` / :ansible-option-required:`required`
.. raw:: html
- .. raw:: html
URL of the Foreman server.
If the value is not specified in the task, the value of environment variable :literal:`FOREMAN\_SERVER\_URL` will be used instead.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-state:
.. rst-class:: ansible-option-title
**state**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
State of the entity
:literal:`present\_with\_defaults` will ensure the entity exists, but won't update existing ones
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`"present\_with\_defaults"`
- :ansible-option-choices-entry:`"absent"`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-updated_name:
.. rst-class:: ansible-option-title
**updated_name**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
new compute resource name
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-use_gssapi:
.. rst-class:: ansible-option-title
**use_gssapi**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
Requires the Python library \ `requests-gssapi `__ to be installed.
If the value is not specified in the task, the value of environment variable :literal:`FOREMAN\_USE\_GSSAPI` will be used instead.
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
- :ansible-option-choices-entry:`true`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-username:
.. rst-class:: ansible-option-title
**username**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
Username accessing the Foreman server.
If the value is not specified in the task, the value of environment variable :literal:`FOREMAN\_USERNAME` will be used instead.
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__parameter-validate_certs:
.. rst-class:: ansible-option-title
**validate_certs**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`boolean`
.. raw:: html
- .. raw:: html
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 :literal:`FOREMAN\_VALIDATE\_CERTS` will be used instead.
.. rst-class:: ansible-option-line
:ansible-option-choices:`Choices:`
- :ansible-option-choices-entry:`false`
- :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)`
.. raw:: html
.. Attributes
Attributes
----------
.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table
* - Attribute
- Support
- Description
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__attribute-check_mode:
.. rst-class:: ansible-option-title
**check_mode**
.. raw:: html
.. raw:: html
- .. raw:: html
:ansible-attribute-support-label:`Support: \ `\ :ansible-attribute-support-full:`full`
.. raw:: html
- .. raw:: html
Can run in check\_mode and return changed status prediction without modifying the entity
.. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__attribute-diff_mode:
.. rst-class:: ansible-option-title
**diff_mode**
.. raw:: html
.. raw:: html
- .. raw:: html
:ansible-attribute-support-label:`Support: \ `\ :ansible-attribute-support-full:`full`
.. raw:: html
- .. raw:: html
Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
.. raw:: html
.. Notes
.. Seealso
.. Examples
Examples
--------
.. code-block:: yaml+jinja
- name: Create libvirt compute resource
theforeman.foreman.compute_resource:
name: example_compute_resource
locations:
- Munich
organizations:
- ACME
provider: libvirt
provider_params:
url: qemu+ssh://root@libvirt.example.com/system
display_type: spice
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
- name: Update libvirt compute resource
theforeman.foreman.compute_resource:
name: example_compute_resource
description: updated compute resource
locations:
- Munich
organizations:
- ACME
provider: libvirt
provider_params:
url: qemu+ssh://root@libvirt.example.com/system
display_type: spice
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
- name: Delete libvirt compute resource
theforeman.foreman.compute_resource:
name: example_compute_resource
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: absent
- name: Create vmware compute resource
theforeman.foreman.compute_resource:
name: example_compute_resource
locations:
- Munich
organizations:
- ACME
provider: vmware
provider_params:
caching_enabled: false
url: vsphere.example.com
user: admin
password: secret
datacenter: ax01
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
- name: Create ovirt compute resource
theforeman.foreman.compute_resource:
name: ovirt_compute_resource
locations:
- France/Toulouse
organizations:
- Example Org
provider: ovirt
provider_params:
url: ovirt.example.com
user: ovirt-admin@example.com
password: ovirtsecret
datacenter: aa92fb54-0736-4066-8fa8-b8b9e3bd75ac
ovirt_quota: 24868ab9-c2a1-47c3-87e7-706f17d215ac
use_v4: true
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
- name: Create proxmox compute resource
theforeman.foreman.compute_resource:
name: proxmox_compute_resource
locations:
- Munich
organizations:
- ACME
provider: proxmox
provider_params:
url: https://proxmox.example.com:8006/api2/json
user: root@pam
password: secretpassword
ssl_verify_peer: true
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
- name: create EC2 compute resource
theforeman.foreman.compute_resource:
name: EC2_compute_resource
description: EC2
locations:
- AWS
organizations:
- ACME
provider: EC2
provider_params:
user: AWS_ACCESS_KEY
password: AWS_SECRET_KEY
region: eu-west-1
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
- name: create Azure compute resource
theforeman.foreman.compute_resource:
name: AzureRm_compute_resource
description: AzureRm
locations:
- Azure
organizations:
- ACME
provider: AzureRm
provider_params:
sub_id: SUBSCRIPTION_ID
tenant: TENANT_ID
app_ident: CLIENT_ID
password: CLIENT_SECRET
region: westeurope
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
- name: create GCE compute resource
theforeman.foreman.compute_resource:
name: GCE compute resource
description: Google Cloud Engine
locations:
- GCE
organizations:
- ACME
provider: GCE
provider_params:
project: orcharhino
email: myname@atix.de
key_path: "/usr/share/foreman/gce_orcharhino_key.json"
zone: europe-west3-b
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
- name: create Openstack compute resource
theforeman.foreman.compute_resource:
name: Openstack compute resource
description: Openstack
locations:
- DC1
organizations:
- ACME
provider: Openstack
provider_params:
url: "https://Openstack.example.com:5000/v3"
user: admin
password: secret
tenant: "MyProject"
domain: "example.com"
project_domain_name: "example.com"
project_domain_id: "0123456789a0123456789b0123456789"
server_url: "https://foreman.example.com"
username: "admin"
password: "changeme"
state: present
.. Facts
.. Return values
Return Values
-------------
Common return values are documented :ref:`here `, the following are the fields unique to this module:
.. tabularcolumns:: \X{1}{3}\X{2}{3}
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table
* - Key
- Description
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.compute_resource_module__return-entity:
.. rst-class:: ansible-option-title
**entity**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
.. raw:: html
- .. raw:: html
Final state of the affected entities grouped by their type.
.. rst-class:: ansible-option-line
:ansible-option-returned-bold:`Returned:` success
.. raw:: html
* - .. raw:: html
.. raw:: latex
\hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth}
.. _ansible_collections.theforeman.foreman.compute_resource_module__return-entity/compute_resources:
.. rst-class:: ansible-option-title
**compute_resources**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary`
.. raw:: html
.. raw:: latex
\end{minipage}
- .. raw:: html
List of compute resources.
.. rst-class:: ansible-option-line
:ansible-option-returned-bold:`Returned:` success
.. raw:: html
.. Status (Presently only deprecated)
.. Authors
Authors
~~~~~~~
- Philipp Joos (@philippj)
- Baptiste Agasse (@bagasse)
- Manisha Singhal (@Manisha15) ATIX AG
- Mark Hlawatschek (@hlawatschek) ATIX AG
.. Extra links
Collection links
~~~~~~~~~~~~~~~~
.. ansible-links::
- title: "Issue Tracker"
url: "https://github.com/theforeman/foreman-ansible-modules/issues"
external: true
- title: "Homepage"
url: "https://theforeman.org/"
external: true
- title: "Repository (Sources)"
url: "https://github.com/theforeman/foreman-ansible-modules"
external: true
.. Parsing errors