Skip to content

pfsense_agreggate doesn't purge rules nor separators #189

@CamiiDominguez

Description

@CamiiDominguez

I'm not sure if this trully is a bug or I'm doing something wrong. I created a basic playbook to test the collection, this is supposed to purge all the rules that aren't present on the playbook, the same goes for alias and separators. The only one that worked correctly is purge_aliases.
I ended up modifying a little of the playbook to test if it would delete all the rules but that didn't work either.

The playbook i used:

  • name: Prueba para eliminar todas las reglas
    hosts: pfsense_test
    gather_facts: no
    become: true
    collections:

    • pfsensible.core

    tasks:

    • name: Eliminar todas las reglas
      pfsense_aggregate:
      purge_rules: true
      purge_rule_separators: true
      ignored_rules: []
      aggregated_rule_separators:
      - { name: "Prueba", interface: lan, state: present, before: permitir_todo }
      aggregated_rules:
      - { name: "permitir_todo", source: any, destination: any, protocol: tcp, interface: lan, state: present }

Output
changed: [10.10.10.3] => {"ansible_facts": {"discovered_interpreter_python": "/usr/local/bin/python3.11"}, "changed": true, "result_aliases": [], "result_interfaces": [], "result_nat_outbounds": [], "result_nat_port_forwards": [], "result_rule_separators": ["create rule_separator 'Prueba' on 'lan', color='info', before='permitir_todo'"], "result_rules": ["create rule 'permitir_todo' on 'lan', source='any', destination='any', protocol='tcp'"], "result_vlans": [], "stderr": "", "stderr_lines": [], "stdout": "pfSense shell: global $debug;\npfSense shell: $debug = 1;\npfSense shell: global $config;\npfSense shell: require_once("filter.inc");\npfSense shell: if (filter_configure() == 0) { \npfSense shell: clear_subsystem_dirty('filter');\npfSense shell: }\npfSense shell: exec\npfSense shell: exit\n", "stdout_lines": ["pfSense shell: global $debug;", "pfSense shell: $debug = 1;", "pfSense shell: global $config;", "pfSense shell: require_once("filter.inc");", "pfSense shell: if (filter_configure() == 0) { ", "pfSense shell: clear_subsystem_dirty('filter');", "pfSense shell: }", "pfSense shell: exec", "pfSense shell: exit"]}

Environment

  • What version of pfsensible.core? 0.6.2
  • What version of ansible? 2.16.14
  • What version of pfSense? 2.7.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneed responseNeed a response from submitter

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions