paloaltonetworks.panos.panos_dhcp_relay (2.19.1) — module

Manage dhcp relay.

| "added in version" 2.10.0 of paloaltonetworks.panos"

Authors: Sean O'Brien (@undodelete)

Install collection

Install with ansible-galaxy collection install paloaltonetworks.panos:==2.19.1


Add to requirements.yml

  collections:
    - name: paloaltonetworks.panos
      version: 2.19.1

Description

- Manage dhcp relay on PAN-OS firewall. - Due to the implementation details of PAN-OS itself, you can use this module to create a DHCP config without ever having to use M(paloaltonetworks.panos.panos_dhcp) first. - However, if you intend to delete an interface that was ever reference by this module, you will need to use M(paloaltonetworks.panos.panos_dhcp) to delete the parent reference or PAN-OS's internal validation checks will prevent the deletion, seeing that a DHCP config is referring to the interface.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create IPv4 DHCP Relay
- paloaltonetworks.panos.panos_dhcp_relay:
    provider: '{{ provider }}'
    dhcp_interface: 'ethernet1/1'
    interface: 'ethernet1/1'
    ipv4_enabled: true
    ipv4_servers:
      - '1.1.1.1'
      - '2.2.2.2'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Delete DHCP Relay
- paloaltonetworks.panos.panos_dhcp_relay:
    provider: '{{ provider }}'
    dhcp_interface: 'ethernet1/1'
    interface: 'ethernet1/1'
    state: absent

Inputs

    
port:
    default: 443
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The port number to connect to the PAN-OS device on.
    type: int

state:
    choices:
    - present
    - absent
    - replaced
    - merged
    - deleted
    - gathered
    default: present
    description:
    - The state.
    type: str

api_key:
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The API key to use instead of generating it using I(username) / I(password).
    type: str

password:
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The password to use for authentication.  This is ignored if I(api_key) is specified.
    type: str

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      api_key:
        description:
        - The API key to use instead of generating it using I(username) / I(password).
        type: str
      ip_address:
        description:
        - The IP address or hostname of the PAN-OS device being configured.
        type: str
      password:
        description:
        - The password to use for authentication.  This is ignored if I(api_key) is specified.
        type: str
      port:
        default: 443
        description:
        - The port number to connect to the PAN-OS device on.
        type: int
      serial_number:
        description:
        - The serial number of a firewall to use for targeted commands. If I(ip_address)
          is not a Panorama PAN-OS device, then this param is ignored.
        type: str
      username:
        default: admin
        description:
        - The username to use for authentication.  This is ignored if I(api_key) is specified.
        type: str
    type: dict
    version_added: 1.0.0
    version_added_collection: paloaltonetworks.panos

username:
    default: admin
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The username to use for authentication.  This is ignored if I(api_key) is specified.
    type: str

interface:
    description:
    - The interface name for the DHCP relay.
    - This is probably the same as the I(dhcp_interface).
    type: str

ip_address:
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The IP address or hostname of the PAN-OS device being configured.
    type: str

ipv4_enabled:
    description:
    - Enable IPv4 on DHCP Relay
    type: bool

ipv4_servers:
    description:
    - Relay server IP addresses.
    elements: str
    type: list

ipv6_enabled:
    description:
    - Enable DHCPv6 relay.
    type: bool

dhcp_interface:
    description:
    - The interface name.
    - This is probably the same as I(interface).
    required: true
    type: str

gathered_filter:
    description:
    - When I(state=gathered).
    - An advanced filtering option to filter results returned from PAN-OS.
    - Refer to the guide discussing I(gathered_filter) for more information.
    type: str