osp.edpm.edpm_nftables_from_files module – Get yaml contents and output a single list of rules

New in osp.edpm 2.12

Synopsis

  • This action loads multiple YAML files from a specified location, and appends the elements into a single list. This list can then be used within edpm_nftables in order to configure the firewall.

Parameters

Parameter

Comments

src

string / required

Source directory for the different files

Examples

- name: Get nftables rules
  register: edpm_nftables_rules
  edpm_nftables_from_files:
    src: /var/lib/edpm-config/firewall

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

rules

dictionary

List of nftables rules built upon the files content

Returned: always

Sample: {"rules": [{"rule": {"proto": "all", "state": ["RELATED", "ESTABLISHED"]}, "rule_name": "000 accept related established"}, {"rule": {"dport": 22, "proto": "tcp"}, "rule_name": "010 accept ssh from all"}], "success": true}

Authors

  • Cedric Jeanneret