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> |
||
|---|---|---|
| .azure-pipelines | ||
| .github | ||
| changelogs | ||
| docs | ||
| hacking | ||
| meta | ||
| plugins | ||
| tests | ||
| .gitignore | ||
| CHANGELOG.rst | ||
| COPYING | ||
| galaxy.yml | ||
| README.md | ||
| requirements.txt | ||
| shippable.yml | ||
| test-requirements.txt | ||
ansible.posix
An Ansible Collection of modules and plugins that target POSIX UNIX/Linux and derivative Operating Systems.
Supported Versions of Ansible
Ansible version compatibility
This collection has been tested against following Ansible versions: >=2.9.
Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.
Included content
Modules
| Name | Description |
|---|---|
| ansible.posix.acl | Set and retrieve file ACL information. |
| ansible.posix.at | Schedule the execution of a command or script file via the at command |
| ansible.posix.authorized_key | Adds or removes an SSH authorized key |
| ansible.posix.firewalld | Manage arbitrary ports/services with firewalld |
| ansible.posix.mount | Control active and configured mount points |
| ansible.posix.patch | Apply patch files using the GNU patch tool |
| ansible.posix.seboolean | Toggles SELinux booleans |
| ansible.posix.selinux | Change policy and state of SELinux |
| ansible.posix.synchronize | A wrapper around rsync to make common tasks in your playbooks quick and easy |
| ansible.posix.sysctl | Manage entries in sysctl.conf. |
Installing this collection
You can install the ansible.posix collection with the Ansible Galaxy CLI:
ansible-galaxy collection install ansible.posix
You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:
---
collections:
- name: ansible.posix
Using this collection
See Ansible Using collections for more details.
NOTE: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.
Contributing to this collection
We welcome community contributions to this collection. See Contributing to Ansible-maintained collections for complete details.
Code of Conduct
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
Release notes
- 0.1.1 Initial stable build
- 0.1.0 Internal only build
External requirements
None
Tested with Ansible
- ansible-base 2.11 (devel)
- ansible-base 2.10 (Beta)
- ansible-base 2.9 (stable)
Roadmap
More information
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Community code of conduct
Licensing
GNU General Public License v3.0 or later.
See COPYING to see the full text.