foreman_subnet – Manage Foreman Subnets using Foreman API¶
Requirements¶
The below requirements are needed on the host that executes this module.
apypie
ipaddress
Parameters¶
Parameter | Choices/Defaults | Comments | |
---|---|---|---|
boot_mode
string
|
|
Boot mode used by hosts in this subnet
|
|
cidr
integer
|
CIDR prefix length; Required if no mask provided
|
||
description
string
|
Description of the subnet
|
||
dhcp_proxy
string
|
DHCP Smart proxy for this subnet
|
||
discovery_proxy
string
|
Discovery Smart proxy for this subnet
This option is only available, if the discovery plugin is installed.
|
||
dns_primary
string
|
Primary DNS server for this subnet
|
||
dns_proxy
string
|
DNS Smart proxy for this subnet
|
||
dns_secondary
string
|
Secondary DNS server for this subnet
|
||
domains
list
|
List of DNS domains the subnet should assigned to
|
||
from_ip
string
|
First IP address of the host IP allocation pool
|
||
gateway
string
|
Subnet gateway IP address
|
||
httpboot_proxy
string
|
HTTP Boot Smart proxy for this subnet
|
||
ipam
string
|
|
IPAM mode for this subnet
|
|
locations
list
|
List of locations the subnet should be assigned to
|
||
mask
string
|
Subnet netmask. Required if no cidr prefix length provided
|
||
mtu
integer
|
MTU
|
||
name
string
/ required
|
Subnet name
|
||
network
string
/ required
|
Subnet IP address
|
||
network_type
string
|
|
Subnet type
|
|
organizations
list
|
List of oganizations the subnet should be assigned to
|
||
parameters
list
/ elements=dictionary
|
Subnet specific host parameters
|
||
name
string
/ required
|
Name of the parameter
|
||
parameter_type
string
|
|
Type of the parameter
|
|
value
raw
/ required
|
Value of the parameter
|
||
password
string
/ required
|
Password of the user accessing the Foreman server
|
||
remote_execution_proxies
list
|
Remote execution Smart proxies for this subnet
This option is only available, if the remote_execution plugin is installed.
|
||
server_url
string
/ required
|
URL of the Foreman server
|
||
state
string
|
|
subnet presence
|
|
tftp_proxy
string
|
TFTP Smart proxy for this subnet
|
||
to_ip
string
|
Last IP address of the host IP allocation pool
|
||
updated_name
string
|
New subnet name. When this parameter is set, the module will not be idempotent.
|
||
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 |
|
vlanid
integer
|
VLAN ID
|
Examples¶
- name: My subnet
foreman_subnet:
name: "My subnet"
description: "My description"
network: "192.168.0.0"
mask: "255.255.255.192"
gateway: "192.168.0.1"
from_ip: "192.168.0.2"
to_ip: "192.168.0.42"
boot_mode: "Static"
dhcp_proxy: "smart-proxy1.foo.example.com"
tftp_proxy: "smart-proxy1.foo.example.com"
dns_proxy: "smart-proxy2.foo.example.com"
vlanid: 452
mtu: 9000
domains:
- "foo.example.com"
- "bar.example.com"
organizations:
- "Example Org"
locations:
- "Toulouse"
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¶
Baptiste Agasse (@bagasse)
Hint
If you notice any issues in this documentation you can edit this document to improve it.