.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
---
|
||||
# NOTE: Interface assignment is not available via the OPNsense API and cannot
|
||||
# be automated with this role. After VLANs are created by this task, you must
|
||||
# manually assign them in the WebUI under Interfaces → Assignments, then
|
||||
# configure each interface (IP address, description) under Interfaces → [name].
|
||||
# This only needs to be done once during initial setup.
|
||||
|
||||
- name: Configure VLANs
|
||||
oxlorg.opnsense.interface_vlan:
|
||||
firewall: "{{ opnsense_firewall }}"
|
||||
api_key: "{{ opnsense_api_key }}"
|
||||
api_secret: "{{ opnsense_api_secret }}"
|
||||
ssl_verify: "{{ opnsense_ssl_verify }}"
|
||||
api_port: "{{ opnsense_api_port }}"
|
||||
interface: "{{ item.interface }}"
|
||||
tag: "{{ item.tag }}"
|
||||
description: "{{ item.description | default(omit) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
loop: "{{ opnsense_vlans }}"
|
||||
|
||||
- name: Configure gateways
|
||||
oxlorg.opnsense.gateway:
|
||||
firewall: "{{ opnsense_firewall }}"
|
||||
api_key: "{{ opnsense_api_key }}"
|
||||
api_secret: "{{ opnsense_api_secret }}"
|
||||
ssl_verify: "{{ opnsense_ssl_verify }}"
|
||||
api_port: "{{ opnsense_api_port }}"
|
||||
name: "{{ item.name }}"
|
||||
interface: "{{ item.interface }}"
|
||||
gateway: "{{ item.gateway }}"
|
||||
ip_protocol: "{{ item.ip_protocol | default('inet') }}"
|
||||
default_gw: "{{ item.default_gw | default(false) }}"
|
||||
far_gw: "{{ item.far_gw | default(false) }}"
|
||||
monitor_disable: "{{ item.monitor_disable | default(false) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
loop: "{{ opnsense_gateways }}"
|
||||
Reference in New Issue
Block a user