foreman_compute_resource – Manage Foreman Compute resources using Foreman API¶
Parameters¶
Parameter | Choices/Defaults | Comments | |
---|---|---|---|
description
string
|
compute resource description
|
||
locations
list
/ elements=string
|
List of locations the entity should be assigned to
|
||
name
string
/ required
|
compute resource name
|
||
organizations
list
/ elements=string
|
List of organizations the entity should be assigned to
|
||
password
string
/ required
|
Password of the user accessing the Foreman server
|
||
provider
string
|
|
Compute resource provider. Required if state=present_with_defaults.
|
|
provider_params
dictionary
|
Parameter specific to compute resource provider. Required if state=present_with_defaults.
|
||
app_ident
string
|
AzureRM client id
|
||
datacenter
string
|
Datacenter the compute resource is in, not valid for provider=libvirt
|
||
display_type
string
|
Display type to use for the remote console, only valid for provider=libvirt
|
||
email
string
|
Email for provider=GCE
|
||
key_path
string
|
Certificate path for provider=GCE
|
||
ovirt_quota
string
|
oVirt quota ID, only valid for provider=ovirt
|
||
password
string
|
Password for the compute resource connection, not valid for provider=libvirt
|
||
project
string
|
Project id for provider=GCE
|
||
region
string
|
AWS region, AZURE region
|
||
tenant
string
|
AzureRM tenant
|
||
url
string
|
URL of the compute resource
|
||
use_v4
boolean
|
|
Use oVirt API v4, only valid for provider=ovirt
|
|
user
string
|
Username for the compute resource connection, not valid for provider=libvirt
|
||
zone
string
|
zone for provider=GCE
|
||
server_url
string
/ required
|
URL of the Foreman server
|
||
state
string
|
|
State of the entity in Foreman
present_with_defaults will ensure the entity exists, but won't update existing ones |
|
updated_name
string
|
new compute resource name
|
||
username
string
/ required
|
Username accessing the Foreman server
|
||
validate_certs
boolean
|
|
Whether or not to verify the TLS certificates of the Foreman server
aliases: verify_ssl |
Examples¶
- name: Create livirt compute resource
foreman_compute_resource:
name: example_compute_resource
locations:
- Munich
organizations:
- ATIX
provider: libvirt
provider_params:
url: libvirt.example.com
display_type: vnc
server_url: "https://foreman.example.com"
username: admin
password: secret
state: present
- name: Update livirt compute resource
foreman_compute_resource:
name: example_compute_resource
description: updated compute resource
locations:
- Munich
organizations:
- ATIX
provider: libvirt
provider_params:
url: libvirt.example.com
display_type: vnc
server_url: "https://foreman.example.com"
username: admin
password: secret
state: present
- name: Delete livirt compute resource
foreman_compute_resource:
name: example_compute_resource
server_url: "https://foreman.example.com"
username: admin
password: secret
state: absent
- name: Create vmware compute resource
foreman_compute_resource:
name: example_compute_resource
locations:
- Munich
organizations:
- ATIX
provider: vmware
provider_params:
url: vsphere.example.com
user: admin
password: secret
datacenter: ax01
server_url: "https://foreman.example.com"
username: admin
password: secret
state: present
- name: Create ovirt compute resource
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: secret
state: present
- name: create EC2 compute resource
foreman_compute_resource:
name: EC2_compute_resource
description: EC2
locations:
- AWS
organizations:
- ATIX
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: secret
state: present
- name: create Azure compute resource
foreman_compute_resource:
name: AzureRm_compute_resource
description: AzureRm
locations:
- Azure
organizations:
- ATIX
provider: AzureRm
provider_params:
user: SUBSCRIPTION_ID
tenant: TENANT_ID
app_ident: CLIENT_ID
password: CLIENT_SECRET
region: westeurope
server_url: "https://foreman.example.com"
username: admin
password: secret
state: present
- name: create GCE compute resource
foreman_compute_resource:
name: GCE compute resource
description: Google Cloud Engine
locations:
- GCE
organizations:
- ATIX
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: secret
state: present
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Philipp Joos (@philippj)
Baptiste Agasse (@bagasse)
Manisha Singhal (@Manisha15) ATIX AG
Mark Hlawatschek (@hlawatschek) ATIX AG
Hint
If you notice any issues in this documentation, you can edit this document to improve it.