foreman_host – Manage Foreman hosts¶
Synopsis¶
Manage Foreman host Entities
This beta version can create and delete hosts from preexisting host groups
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
build
boolean
|
|
Whether or not to setup build context for the host
|
enabled
boolean
|
|
Include this host within Foreman reporting
|
hostgroup
string
|
Name of related hostgroup.
Required if state=present and (managed=true or build=true)
|
|
location
string
|
Name of related location
|
|
managed
boolean
|
|
Whether a host is managed or unmanaged.
Forced to true when build=true
|
name
string
/ required
|
Fully Qualified Domain Name of host
|
|
organization
string
|
Name of related organization
|
|
password
string
/ required
|
Password of the user accessing the Foreman server
|
|
server_url
string
/ required
|
URL of the Foreman server
|
|
state
string
|
|
host presence
|
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 a host"
foreman_host:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
name: "new_host"
hostgroup: my_hostgroup
state: present
- name: "Create a host with build context"
foreman_host:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
name: "new_host"
hostgroup: my_hostgroup
build: true
state: present
- name: "Create an unmanaged host"
foreman_host:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
name: "new_host"
managed: false
state: present
- name: "Delete a host"
foreman_host:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
name: "new_host"
state: absent
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Bernhard Hopfenmueller (@Fobhep) ATIX AG
Hint
If you notice any issues in this documentation you can edit this document to improve it.