theforeman.foreman.subnet – Manage Subnets¶
Note
This plugin is part of the theforeman.foreman collection.
To install it use: ansible-galaxy collection install theforeman.foreman
.
To use it in a playbook, specify: theforeman.foreman.subnet
.
New in version 1.0.0: of theforeman.foreman
Requirements¶
The below requirements are needed on the host that executes this module.
ipaddress
requests
Parameters¶
Examples¶
- name: My subnet
theforeman.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"
template_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: "changeme"
state: present
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
entity
dictionary
|
success |
Final state of the affected entities grouped by their type.
|
|
subnets
list
/ elements=dictionary
|
success |
List of subnets.
|
Authors¶
Baptiste Agasse (@bagasse)