Tip
Check out the repository on GitHub
Tables
Warning
This module is still in development!
STATE: testing
TESTS: ansibleguy.nftables.table
NFTables Docs:
Definition
For basic parameters see: Basic
ansibleguy.nftables.table
Parameter |
Type |
Required |
Default |
Aliases |
Comment |
---|---|---|---|---|---|
name |
string |
true |
- |
n, table |
The name of the table |
family |
string |
true |
- |
f, fam, type |
One of: ‘inet’, ‘ip6’, ‘ip’, ‘arp’, ‘bridge’, ‘netdev’. Table type |
Usage
Changes on existing tables must be enforced using the ‘force’ parameter.
Be aware: If a table changed it needs to be removed and re-added to apply those changes! All of its chains and rules are be dropped!
Examples
ansibleguy.nftables.table
- hosts: all
gather_facts: no
become: true
tasks:
- name: Example
ansibleguy.nftables.table:
name: 'example'
family: 'inet'
# force: false
# state: present
- name: Adding inet table 'test'
ansibleguy.nftables.table:
name: 'test'
family: 'inet'
- name: Pulling existing tables
ansibleguy.nftables.list:
target: 'tables'
register: tables
- name: Showing tables
ansible.builtin.debug:
var: tables.data
- name: Removing inet table 'test'
ansibleguy.nftables.table:
name: 'test'
family: 'inet'
state: absent
force: true