Hello,
I seems to hit a snag when trying to set-up my router using ansible.
When I try to remove the NAT that I've configured via Ansible it fails to remove it. When I run the same command via the terminal under winbox I do not encouter the issue.
MicroTik terminal
[admin@sol] /ip/firewall/nat> print
Flags: X - disabled, I - invalid; D - dynamic
0 chain=srcnat action=masquerade out-interface=Trined
Part of the Ansible script
- routeros_command:
commands:
- /ip firewall nat remove [find where out-interface="Trined"]
- /ip firewall nat add chain=srcnat action=masquerade out-interface="Trined"
The above should be able to find the NAT rule and remove it on the first like and add it again on the second line, but it seems that it does nor remove the NAT but manipulates it and creates a new one.
MicroTik terminal
[admin@sol] /ip/firewall/nat> print
Flags: X - disabled, I - invalid; D - dynamic
0 I ;;; no interface
chain=srcnat action=masquerade out-interface=*E log=no log-prefix=""
1 chain=srcnat action=masquerade out-interface=Trined
Anyone got experience with this issue. A fix or workaround would be nice.
Any help appriciated