puzzle / puzzle.opnsense

An Ansible Collection to configure an opnsense Firewall
https://puzzle.github.io/puzzle.opnsense/collections/puzzle/opnsense/index.html
GNU General Public License v3.0
24 stars 12 forks source link

Module Request: services_dhcpv4 #58

Open ombre8 opened 7 months ago

ombre8 commented 7 months ago

Module Description

This module can be used to configure the settings available in the ui under Services -> DHCPv4 -> [$interfacename]

2024-03-21-134559_2105x1200_scrot

Minimum Viable Product (MVP)

module: services_dhcpv4
short_description: Configure DHCP server for specific Interface.
description:
  - Module to configure general system settings
options:
  interface:
    description: "The Interface the DHCP server should be configured on"
    type: str
    required: true
  enable:
    description: Wheter the Server is enabled or not
    type: bool
    default: true
    required: false
  range_from:
    description: Start of the IP Pool
    type: str
    required: false
  range_to:
    description: End of the IP Pool
    type: str
    required: false

Examples

---
- name: Enable DHCP Server on LAN interface
  puzzle.opnsense.services_dhcpv4:
    interface: LAN

- name: Enable DHCP Server on guestwifi interface
  puzzle.opnsense.services_dhcpv4:
    interface: guestwifi
    enable: true
    range_from: 192.168.10.100
    range_to: 192.168.10.254

Additional Notes (Optional)