osp.edpm.edpm_nftables_snippet module – Create rule snippets in selected configuration directory

New in osp.edpm 2.12

Synopsis

  • This module validate and write the YAML in specified location/file, while ensuring the filename is unique in the location.

Parameters

Parameter

Comments

content

string

List of rule dicts in valid YAML

dest

string / required

Destination absolute path, with filename

state

string

State of the snippet, either present or absent

Default: "present"

Examples

- name: Inject snippet for CI
  edpm_nftables_snippet:
    dest: /var/lib/edpm-config/firewall/ci-rules.yaml
    content: |
      - rule_name: 010 Allow SSH from everywhere
        rule:
          proto: tcp
          dport: 22
      - rule_name: Allow console stream from everywhere
        rule:
          proto: tcp
          dport: 19885
          state: []

Authors

  • Cedric Jeanneret