Closed Low-Frequency closed 1 year ago
Greetings!
The issue is that the 'alias' modules are currently checking if they are in use by an existing rule as that functionality was not implemented before this OPNSense change: https://github.com/opnsense/plugins/issues/3140
Quick fix: install the 'os-firewall' plugin. I'll remove that checking in the next few days as it should be redundant.
- AnsibleGuy
Thanks for the explanation. I think for now I'll just wait then. I usually only remove aliases when I'm testing, so for now I hardcoded it to not remove them during a destroy and just print a reminder that I have to so that.
Should be fixed.
Basic info
Versions
Controller
[ ] Collection version: 1.1.0
[ ] Ansible version:
[ ] Python version: 3.10.10
OPNSense
Describe the bug
Removing a firewall alias fails with the following error message:
Expected behavior
The task does not fail and removes the firewall alias.
Debug output
Additional context
My Ansible Playbook is triggered by Terraform which in turn is invoked in a Docker container by a CI/CD Pipeline. It connects to my management VM and executes the tasks from there. However local execution also fails.
Ansible Config:
Ansible command used by terraform:
The
local.firewall_object
is constructed as follows:This results in this json:
Reproduce
Tasks
Task(s) that produce the error:
Manually reproducable with the following command: