qiyutech.foreman.hl_subnet module – Foreman 子网操作

备注

This module is part of the qiyutech.foreman collection (version 1.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install qiyutech.foreman.

To use it in a playbook, specify: qiyutech.foreman.hl_subnet.

1.0.0 新版功能: of qiyutech.foreman

Synopsis

  • Foreman 子网操作

  • 当前不允许更新配置

备注

This module has a corresponding action plugin.

Parameters

Parameter

Comments

location_id

integer

Set the current location context for the request

location_name

string

如果 location_id 没有设置, 则使用此值 获取 location_id

organization_id

integer

Set the current organization context for the request

organization_name

string

如果 organization_id 没有设置,则使用此值 获取 organization_id

password

string

Foreman password

此参数是必须的

获取参数顺序:

1 password 任务参数

2 foreman_password 变量 (aka: task_vars 中的 foreman_password 变量)

3 FOREMAN_PASSWORD 任务环境变量

4 FOREMAN_PASSWORD 全局环境变量

server_url

string

Foreman Server URL

此参数是必须的

获取参数顺序:

1 server_url 任务参数

2 foreman_server_url 变量 (aka: task_vars 中的 foreman_server_url 变量)

3 FOREMAN_SERVER_URL 任务环境变量

4 FOREMAN_SERVER_URL 全局环境变量

state

string

状态

Choices:

  • present ← (default)

  • absent

subnet

dictionary

subnet

bmc_id

integer

BMC Proxy ID to use within this subnet

实际上支持此功能的 smart proxy id

bmc_name

string

BMC Proxy Name to use within this subnet

实际上支持此功能的 smart proxy 名称

boot_mode

string

Default boot mode for interfaces assigned to this subnet.

Choices:

  • Static

  • DHCP

cidr

string

Network prefix in CIDR notation

description

string

Subnet description

dhcp_id

integer

DHCP Proxy ID to use within this subnet

实际上支持此功能的 smart proxy id

dhcp_name

string

DHCP Proxy name to use within this subnet

use this value auto fill dhcp_id if None

实际上支持此功能的 smart proxy 名称

dns_id

integer

DNS Proxy ID to use within this subnet

实际上支持此功能的 smart proxy id

dns_name

string

DNS Proxy Name to use within this subnet

实际上支持此功能的 smart proxy 名称

dns_primary

string

Primary DNS for this subnet

dns_secondary

string

Secondary DNS for this subnet

domain_ids

list / elements=integer

Domains in which this subnet is part

domain_names

list / elements=string

Domains in which this subnet is part

auto fill domain_ids use this value if domain_ids is empty

externalipam_group

string

External IPAM group - only relevant when IPAM is set to external

externalipam_id

integer

External IPAM Proxy ID to use within this subnet

externalipam_name

string

External IPAM Proxy Name to use within this subnet

from_

string

Starting IP Address for IP auto suggestion

gateway

string

Subnet gateway

httpboot_id

integer

HTTPBoot Proxy ID to use within this subnet

实际上支持此功能的 smart proxy id

httpboot_name

string

HTTPBoot Proxy Name to use within this subnet

实际上支持此功能的 smart proxy 名称

ipam

string

IP Address auto suggestion mode for this subnet.

for IPv4 you can use DHCP, for IPv6 use EUI-64

Choices:

  • DHCP

  • Internal DB

  • Random DB

  • EUI-64

  • External IPAM

  • None

location_ids

list / elements=integer

REPLACE locations with given ids

location_names

list / elements=string

REPLACE locations with given names

mask

string

Netmask for this subnet

mtu

integer

MTU for this subnet

Default: 1500

name

string / required

Subnet name

network

string / required

Subnet network

network_type

string

Type or protocol, IPv4 or IPv6, defaults to IPv4

Choices:

  • IPv4 ← (default)

  • IPv6

organization_ids

list / elements=integer

REPLACE organizations with given ids.

organization_names

list / elements=string

REPLACE organizations with given names.

subnet_parameters_attributes

list / elements=dictionary

Array of parameters (name, value)

template_id

integer

Template HTTP(S) Proxy ID to use within this subnet

template_name

string

Template HTTP(S) Proxy Name to use within this subnet

当前不支持

tftp_id

integer

TFTP Proxy ID to use within this subnet

实际上支持此功能的 smart proxy id

tftp_name

string

TFTP Proxy Name to use within this subnet

use this value auto fill tftp_id if None

实际上支持此功能的 smart proxy 名称

to_

string

Ending IP Address for IP auto suggestion

vlanid

string

VLAN ID for this subnet

subnet_file

string

subnet 配置文件

如果 subnet 值不存在,则尝试从此文件中读取 subnet 的配置

username

string

Foreman username

此参数是必须的

获取参数顺序:

1 username 任务参数

2 foreman_username 变量 (aka: task_vars 中的 foreman_username 变量)

3 FOREMAN_USERNAME 任务环境变量

4 FOREMAN_USERNAME 全局环境变量

Examples

- name: Foreman Setting
  qiyutech.foreman.hl_subnet:
    subnet_file: subnet_config_file.toml
    state: present

Authors

  • dev