diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1fd693d77a..9d1d85507f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,34 @@ ansible.posix Release Notes .. contents:: Topics +v1.4.0 +====== + +Release Summary +--------------- + +This is the minor release of the ``ansible.posix`` collection. +This changelog contains all changes to the modules in this collection that +have been added after the release of ``ansible.posix`` 1.3.0. + +Minor Changes +------------- + +- firewalld - Show warning message that variable type of ``masquerade`` and ``icmp_block_inversion`` will be changed from ``str`` to ``boolean`` in the future release (https://github.com/ansible-collections/ansible.posix/pull/254). +- selinux - optionally update kernel boot params when disabling/re-enabling SELinux (https://github.com/ansible-collections/ansible.posix/pull/142). + +Bugfixes +-------- + +- Fix for whitespace in source full path causing error ```code 23) at main.c(1330) [sender=3.2.3]``` (https://github.com/ansible-collections/ansible.posix/pull/278) +- Include ``PSF-license.txt`` file for ``plugins/module_utils/_version.py``. +- Use vendored version of ``distutils.version`` instead of the deprecated Python standard library to address PEP 632 (https://github.com/ansible-collections/ansible.posix/issues/303). +- firewalld - Correct usage of queryForwardPort (https://github.com/ansible-collections/ansible.posix/issues/247). +- firewalld - Refine the handling of exclusive options (https://github.com/ansible-collections/ansible.posix/issues/255). +- mount - add a newline at the end of line in ``fstab`` (https://github.com/ansible-collections/ansible.posix/issues/210). +- profile_tasks - Correctly calculate task execution time with serial execution (https://github.com/ansible-collections/ansible.posix/issues/83). +- seboolean - add ``python3-libsemanage`` package dependency for RHEL8+ systems. + v1.3.0 ====== diff --git a/README.md b/README.md index 33511ce5bb..c0ee2b41e4 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ An Ansible Collection of modules and plugins that target POSIX UNIX/Linux and de This collection has been tested against following Ansible versions: **>=2.9**. +For collections that support Ansible 2.9, please ensure you update your `network_os` to use the +fully qualified collection name (for example, `cisco.ios.ios`). 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. diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 828127b479..382141c921 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -210,3 +210,53 @@ releases: - synchronize.yml - test_matrix.yml release_date: '2021-08-11' + 1.4.0: + changes: + bugfixes: + - Fix for whitespace in source full path causing error ```code 23) at main.c(1330) + [sender=3.2.3]``` (https://github.com/ansible-collections/ansible.posix/pull/278) + - Include ``PSF-license.txt`` file for ``plugins/module_utils/_version.py``. + - Use vendored version of ``distutils.version`` instead of the deprecated Python + standard library to address PEP 632 (https://github.com/ansible-collections/ansible.posix/issues/303). + - firewalld - Correct usage of queryForwardPort (https://github.com/ansible-collections/ansible.posix/issues/247). + - firewalld - Refine the handling of exclusive options (https://github.com/ansible-collections/ansible.posix/issues/255). + - mount - add a newline at the end of line in ``fstab`` (https://github.com/ansible-collections/ansible.posix/issues/210). + - profile_tasks - Correctly calculate task execution time with serial execution + (https://github.com/ansible-collections/ansible.posix/issues/83). + - seboolean - add ``python3-libsemanage`` package dependency for RHEL8+ systems. + minor_changes: + - firewalld - Show warning message that variable type of ``masquerade`` and + ``icmp_block_inversion`` will be changed from ``str`` to ``boolean`` in the + future release (https://github.com/ansible-collections/ansible.posix/pull/254). + - selinux - optionally update kernel boot params when disabling/re-enabling + SELinux (https://github.com/ansible-collections/ansible.posix/pull/142). + release_summary: 'This is the minor release of the ``ansible.posix`` collection. + + This changelog contains all changes to the modules in this collection that + + have been added after the release of ``ansible.posix`` 1.3.0.' + fragments: + - 1.4.0.yml + - 211_fstab_append_newline.yml + - 247_firewalld.yml + - 254_variable_warnings.yml + - 255_authorized_key_url.yml + - 263_profile_tasks_with_serial.yml + - 272-copy_ignore_txt.yml + - 277_fix_integration_test_on_devel.yml + - 282_fix_unit_test_for_synchronize.yml + - 287_firewalld_requirements.yml + - 288_mounts_options.yml + - 297_firewalld_exclusive_options_handling.yml + - 299_seboolean_python3.yml + - 302_shippable_exit_code.yml + - 304_pep632.yml + - 346_copy_ignore_txt_for_devel.yml + - 347_add_branch_213.yml + - 349_follow_new_guidelines.yml + - 353_ci_fix_unittest_for_synchronize.yml + - disable_selinux_via_kernel_cmdline.yml + - psf-license.yml + - sanity_fixes.yml + - shell_escape_full_path_for_rsync.yml + release_date: '2022-05-23' diff --git a/changelogs/fragments/211_fstab_append_newline.yml b/changelogs/fragments/211_fstab_append_newline.yml deleted file mode 100644 index 6861798c6b..0000000000 --- a/changelogs/fragments/211_fstab_append_newline.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: -- mount - add a newline at the end of line in ``fstab`` (https://github.com/ansible-collections/ansible.posix/issues/210). diff --git a/changelogs/fragments/247_firewalld.yml b/changelogs/fragments/247_firewalld.yml deleted file mode 100644 index 2a45b48c03..0000000000 --- a/changelogs/fragments/247_firewalld.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: -- firewalld - Correct usage of queryForwardPort (https://github.com/ansible-collections/ansible.posix/issues/247). diff --git a/changelogs/fragments/254_variable_warnings.yml b/changelogs/fragments/254_variable_warnings.yml deleted file mode 100644 index 4b87e31f02..0000000000 --- a/changelogs/fragments/254_variable_warnings.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -minor_changes: -- firewalld - Show warning message that variable type of ``masquerade`` and - ``icmp_block_inversion`` will be changed from ``str`` to ``boolean`` - in the future release (https://github.com/ansible-collections/ansible.posix/pull/254). diff --git a/changelogs/fragments/255_authorized_key_url.yml b/changelogs/fragments/255_authorized_key_url.yml deleted file mode 100644 index 5381935335..0000000000 --- a/changelogs/fragments/255_authorized_key_url.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- authorized_keys - add an example involving ``url`` lookup plugin (https://github.com/ansible-collections/ansible.posix/pull/260). diff --git a/changelogs/fragments/263_profile_tasks_with_serial.yml b/changelogs/fragments/263_profile_tasks_with_serial.yml deleted file mode 100644 index f3032e9391..0000000000 --- a/changelogs/fragments/263_profile_tasks_with_serial.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: -- profile_tasks - Correctly calculate task execution time with serial execution (https://github.com/ansible-collections/ansible.posix/issues/83). diff --git a/changelogs/fragments/272-copy_ignore_txt.yml b/changelogs/fragments/272-copy_ignore_txt.yml deleted file mode 100644 index 7537d5419a..0000000000 --- a/changelogs/fragments/272-copy_ignore_txt.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: - - Copy ignore-2.12.txt to ignore-2.13.txt. diff --git a/changelogs/fragments/277_fix_integration_test_on_devel.yml b/changelogs/fragments/277_fix_integration_test_on_devel.yml deleted file mode 100644 index d2b4c695df..0000000000 --- a/changelogs/fragments/277_fix_integration_test_on_devel.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- Fix integration tests of synchronize and sysctl to address chaging behavior on devel branch (https://github.com/ansible-collections/overview/issues/45). diff --git a/changelogs/fragments/282_fix_unit_test_for_synchronize.yml b/changelogs/fragments/282_fix_unit_test_for_synchronize.yml deleted file mode 100644 index 23521af996..0000000000 --- a/changelogs/fragments/282_fix_unit_test_for_synchronize.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- Fix unit tests of synchronize action plugin to use yaml.safe_load(). diff --git a/changelogs/fragments/287_firewalld_requirements.yml b/changelogs/fragments/287_firewalld_requirements.yml deleted file mode 100644 index 621701b8f3..0000000000 --- a/changelogs/fragments/287_firewalld_requirements.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- firewalld - add python-firewall to requirements (https://github.com/ansible-collections/ansible.posix/issues/286). diff --git a/changelogs/fragments/288_mounts_options.yml b/changelogs/fragments/288_mounts_options.yml deleted file mode 100644 index 23b6edd902..0000000000 --- a/changelogs/fragments/288_mounts_options.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- mount - remove deprecated option from nfs example diff --git a/changelogs/fragments/297_firewalld_exclusive_options_handling.yml b/changelogs/fragments/297_firewalld_exclusive_options_handling.yml deleted file mode 100644 index 4727000a5b..0000000000 --- a/changelogs/fragments/297_firewalld_exclusive_options_handling.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: -- firewalld - Refine the handling of exclusive options (https://github.com/ansible-collections/ansible.posix/issues/255). diff --git a/changelogs/fragments/299_seboolean_python3.yml b/changelogs/fragments/299_seboolean_python3.yml deleted file mode 100644 index 5680d993a2..0000000000 --- a/changelogs/fragments/299_seboolean_python3.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: -- seboolean - add ``python3-libsemanage`` package dependency for RHEL8+ systems. diff --git a/changelogs/fragments/302_shippable_exit_code.yml b/changelogs/fragments/302_shippable_exit_code.yml deleted file mode 100644 index d1dae9bd9e..0000000000 --- a/changelogs/fragments/302_shippable_exit_code.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- CI tests - fix exit code to address shellckeck test issue (https://github.com/ansible-collections/ansible.posix/issues/301). diff --git a/changelogs/fragments/304_pep632.yml b/changelogs/fragments/304_pep632.yml deleted file mode 100644 index 6c92fdcf98..0000000000 --- a/changelogs/fragments/304_pep632.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: -- Use vendored version of ``distutils.version`` instead of the deprecated Python standard library to address PEP 632 (https://github.com/ansible-collections/ansible.posix/issues/303). diff --git a/changelogs/fragments/346_copy_ignore_txt_for_devel.yml b/changelogs/fragments/346_copy_ignore_txt_for_devel.yml deleted file mode 100644 index 053d865d19..0000000000 --- a/changelogs/fragments/346_copy_ignore_txt_for_devel.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- CI tests - create ignore file for 2.14.0.dev0 (https://github.com/ansible-collections/ansible.posix/issues/345). diff --git a/changelogs/fragments/347_add_branch_213.yml b/changelogs/fragments/347_add_branch_213.yml deleted file mode 100644 index 846850fb2f..0000000000 --- a/changelogs/fragments/347_add_branch_213.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- CI tests - add CI tests against stable-2.13 (https://github.com/ansible-collections/ansible.posix/issues/345). diff --git a/changelogs/fragments/349_follow_new_guidelines.yml b/changelogs/fragments/349_follow_new_guidelines.yml deleted file mode 100644 index 2b13e12239..0000000000 --- a/changelogs/fragments/349_follow_new_guidelines.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- CI tests - following the new sanity check guideline (https://github.com/ansible-collections/ansible.posix/issues/348). diff --git a/changelogs/fragments/353_ci_fix_unittest_for_synchronize.yml b/changelogs/fragments/353_ci_fix_unittest_for_synchronize.yml deleted file mode 100644 index 190b9f9ae5..0000000000 --- a/changelogs/fragments/353_ci_fix_unittest_for_synchronize.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- CI tests - added check_mode attribute to TaskMock class for synchronize plugin unit test (https://github.com/ansible-collections/ansible.posix/issues/352). diff --git a/changelogs/fragments/disable_selinux_via_kernel_cmdline.yml b/changelogs/fragments/disable_selinux_via_kernel_cmdline.yml deleted file mode 100644 index 505a1342d1..0000000000 --- a/changelogs/fragments/disable_selinux_via_kernel_cmdline.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- selinux - optionally update kernel boot params when disabling/re-enabling SELinux (https://github.com/ansible-collections/ansible.posix/pull/142). diff --git a/changelogs/fragments/psf-license.yml b/changelogs/fragments/psf-license.yml deleted file mode 100644 index f8fbc0bdd8..0000000000 --- a/changelogs/fragments/psf-license.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - Include ``PSF-license.txt`` file for ``plugins/module_utils/_version.py``. diff --git a/changelogs/fragments/sanity_fixes.yml b/changelogs/fragments/sanity_fixes.yml deleted file mode 100644 index 4920b88ffa..0000000000 --- a/changelogs/fragments/sanity_fixes.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- sanity fixes for pylint test. diff --git a/changelogs/fragments/shell_escape_full_path_for_rsync.yml b/changelogs/fragments/shell_escape_full_path_for_rsync.yml deleted file mode 100644 index d37bee7fa8..0000000000 --- a/changelogs/fragments/shell_escape_full_path_for_rsync.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: - - Fix for whitespace in source full path causing error ```code 23) at main.c(1330) [sender=3.2.3]``` (https://github.com/ansible-collections/ansible.posix/pull/278) diff --git a/docs/ansible.posix.authorized_key_module.rst b/docs/ansible.posix.authorized_key_module.rst index 69e80e361f..bfbb444c73 100644 --- a/docs/ansible.posix.authorized_key_module.rst +++ b/docs/ansible.posix.authorized_key_module.rst @@ -240,6 +240,12 @@ Examples state: present key: https://github.com/charlie.keys + - name: Set authorized keys taken from url using lookup + ansible.posix.authorized_key: + user: charlie + state: present + key: "{{ lookup('url', 'https://github.com/charlie.keys', split_lines=False) }}" + - name: Set authorized key in alternate location ansible.posix.authorized_key: user: charlie diff --git a/docs/ansible.posix.firewalld_module.rst b/docs/ansible.posix.firewalld_module.rst index a041534604..ea58ff2b3d 100644 --- a/docs/ansible.posix.firewalld_module.rst +++ b/docs/ansible.posix.firewalld_module.rst @@ -25,6 +25,7 @@ Requirements The below requirements are needed on the host that executes this module. - firewalld >= 0.2.11 +- python-firewall >= 0.2.11 Parameters @@ -401,6 +402,7 @@ Notes - Requires the python2 bindings of firewalld, which may not be installed by default. - For distributions where the python2 firewalld bindings are unavailable (e.g Fedora 28 and later) you will have to set the ansible_python_interpreter for these hosts to the python3 interpreter path and install the python3 bindings. - Zone transactions (creating, deleting) can be performed by using only the zone and state parameters "present" or "absent". Note that zone transactions must explicitly be permanent. This is a limitation in firewalld. This also means that you will have to reload firewalld after adding a zone that you wish to perform immediate actions on. The module will not take care of this for you implicitly because that would undo any previously performed immediate actions which were not permanent. Therefore, if you require immediate access to a newly created zone it is recommended you reload firewalld immediately after the zone creation returns with a changed state and before you perform any other immediate, non-permanent actions on that zone. + - This module needs ``python-firewall`` or ``python3-firewall`` on managed nodes. It is usually provided as a subset with ``firewalld`` from the OS distributor for the OS default Python interpreter. diff --git a/docs/ansible.posix.mount_module.rst b/docs/ansible.posix.mount_module.rst index d955f7b0d7..3ec3ce902b 100644 --- a/docs/ansible.posix.mount_module.rst +++ b/docs/ansible.posix.mount_module.rst @@ -85,7 +85,7 @@ Parameters - Default:
0
+ Default:
"0"
Dump (see fstab(5)).
@@ -153,7 +153,7 @@ Parameters - Default:
0
+ Default:
"0"
Passno (see fstab(5)).
@@ -295,7 +295,7 @@ Examples ansible.posix.mount: src: 192.168.1.100:/nfs/ssd/shared_data path: /mnt/shared_data - opts: rw,sync,hard,intr + opts: rw,sync,hard state: mounted fstype: nfs @@ -303,7 +303,7 @@ Examples ansible.posix.mount: src: 192.168.1.100:/nfs/ssd/shared_data path: /mnt/shared_data - opts: rw,sync,hard,intr + opts: rw,sync,hard boot: no state: mounted fstype: nfs diff --git a/docs/ansible.posix.seboolean_module.rst b/docs/ansible.posix.seboolean_module.rst index b089b140dd..03a9b33613 100644 --- a/docs/ansible.posix.seboolean_module.rst +++ b/docs/ansible.posix.seboolean_module.rst @@ -27,6 +27,7 @@ The below requirements are needed on the host that executes this module. - libselinux-python - libsemanage-python +- python3-libsemanage Parameters diff --git a/docs/ansible.posix.selinux_module.rst b/docs/ansible.posix.selinux_module.rst index b7f7976960..20d9ef87d0 100644 --- a/docs/ansible.posix.selinux_module.rst +++ b/docs/ansible.posix.selinux_module.rst @@ -94,6 +94,27 @@ Parameters
The SELinux mode.
+ + +
+ update_kernel_param + +
+ boolean +
+
added in 1.4.0
+ + + + + +
If set to true, will update also the kernel boot parameters when disabling/enabling SELinux.
+
The grubby tool must be present on the target system for this to work.
+ +