Skip to content

pfsense_gateway

Frederic Bor edited this page Feb 9, 2020 · 3 revisions
> PFSENSE_GATEWAY    (/home/fbor/ansible/lib/ansible/modules/network/pfsense/pfsense_gateway.py)

  Manage pfSense gateways

  * This module is maintained by The Ansible Community
OPTIONS (= is mandatory):

- action_disable
  No action will be taken on gateway events. The gateway is always considered up.
  [Default: False]
  type: bool

- descr
  The description of the gateway
  [Default: (null)]
  type: str

- disabled
  Set this option to disable this gateway without removing it from the list.
  [Default: False]
  type: bool

- force_down
  This will force this gateway to be considered down.
  [Default: False]
  type: bool

- gateway
  Gateway IP address
  [Default: (null)]
  type: str

- interface
  Choose which interface this gateway applies to.
  [Default: (null)]
  type: str

- ipprotocol
  Choose the Internet Protocol this gateway uses.
  (Choices: inet, inet6)[Default: inet]
  type: str

- monitor
  Enter an alternative address here to be used to monitor the link.
  [Default: (null)]
  type: str

- monitor_disable
  This will consider this gateway as always being up.
  [Default: False]
  type: bool

= name
  Gateway name

  type: str

- nonlocalgateway
  This will allow use of a gateway outside of this interface's subnet.
  This is usually indicative of a configuration error, but is required for some scenarios.
  [Default: False]
  type: bool

- state
  State in which to leave the gateway
  (Choices: present, absent)[Default: present]
  type: str

- weight
  Weight for this gateway when used in a Gateway Group. Must be between 1 and 30.
  [Default: 1]
  type: int


AUTHOR: Frederic Bor (@f-bor)
  METADATA:
    status:
    - preview
    supported_by: community
  

EXAMPLES:

- name: Add gateway
  pfsense_gateway:
    name: default_gw
    interface: wan
    gateway: 1.2.3.4
    state: present

- name: Remove gateway
  pfsense_gateway:
    name: vpn_gw
    state: absent


RETURN VALUES:

commands:
    description: the set of commands that would be pushed to the remote device (if pfSense had a CLI)
    returned: always
    type: list
    sample: ["create gateway 'default_gw', interface='wan', address='1.2.3.4'", "delete gateway 'vpn_gw'"]