mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
fix REJECT target name SUMMARY Fix setting default target to reject. The target name is %%REJECT%% not REJECT. https://firewalld.org/documentation/zone/options.html After this pull request to way to set REJECT would be - name: "Set target to REJECT for public" ansible.posix.firewalld: zone: public permanent: yes target: '%%REJECT%%' state: enabled become: true ISSUE TYPE Bugfix Pull Request COMPONENT NAME firewalld ADDITIONAL INFORMATION This snippet would fail due to there not being target called REJECT and using %%REJECT%% is not in allowed values for target - name: "Set target to REJECT for public" ansible.posix.firewalld: zone: public permanent: yes target: 'REJECT' state: enabled become: true Ansible error { "msg": "ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: INVALID_TARGET: REJECT Permanent operation", "invocation": { "module_args": { "zone": "public", "permanent": true, "target": "REJECT", "state": "enabled", "immediate": false, "timeout": 0, "icmp_block": null, "icmp_block_inversion": null, "service": null, "port": null, "port_forward": null, "rich_rule": null, "source": null, "interface": null, "masquerade": null, "offline": null } }, "_ansible_no_log": false, "changed": false } syslog Jun 29 09:49:39 <hostname retracted> ansible-ansible.posix.firewalld[9015]: Invoked with zone=public permanent=True state=enabled target=REJECT immediate=False timeout=0 icmp_[1850/7279] icmp_block_inversion=None service=None port=None port_forward=None rich_rule=None source=None interface=None masquerade=None offline=None Jun 29 09:49:39 <hostname retracted> firewalld[915]: ERROR: INVALID_TARGET: REJECT Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: None <None> Reviewed-by: Amin Vakil <info@aminvakil.com> Reviewed-by: quidame <None> Reviewed-by: Hideki Saito <saito@fgrep.org> |
||
|---|---|---|
| .. | ||
| targets | ||