inventory plugins: make data obtained from remote unsafe (#8098)
Make data obtained from remote unsafe.
(cherry picked from commit d62fe154d2)
Co-authored-by: Felix Fontein <felix@fontein.de>
snap: disable some tests that take way too long (#8148)
* Do not install microk8s in snap tests, as it is too slow.
* Do not install cider in snap tests, as it is slow.
(cherry picked from commit 609f28f791)
Co-authored-by: Felix Fontein <felix@fontein.de>
Added startup configuration option (#8038)
* Added startup configuration option
Added the option to configure startup behavior of lxc containers. Works well in conjunction with onboot and allows to set startup order, startup delay and shutdown delay
* Removed trailing whitespaces in documentation
* added changelog fragment
* Updated Documentation to suggested wording
Co-authored-by: Felix Fontein <felix@fontein.de>
* Improve documentation.
* Fix changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 795a855d0e)
Co-authored-by: Michael Cicogna <44257895+miccico@users.noreply.github.com>
ipa_sudorule, ipa_hbacrule: change ipaenabledflag type to bool (#7880)
* ipa_sudorule, ipa_hbacrule: change ipaenabledflag type to bool
freeipa changed the type to bool with commit https://pagure.io/freeipa/c/6c5f2bcb301187f9844985ffe309c7d2262e16f3
* add changelog-fragment
* ipa_sudorule, ipa_hbacrule: set ipaenabledflag according to version
* ipa_sudorule, ipa_hbacrule: change version for backport
it also got backported (https://pagure.io/freeipa/c/faeb656c77adf27a49ccaceb57fc1ba44e11cc1d)
* ipa_sudorule, ipa_hbacrule: swap assigned values
* Update changelogs/fragments/7880-ipa-fix-sudo-and-hbcalrule-idempotence.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: aBUDmdBQ <>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9f5193e40b)
Co-authored-by: aBUDmdBQ <135135848+aBUDmdBQ@users.noreply.github.com>
Fix bond-slave honoring MTU (#8118)
The bond-slave type should honor the request
MTU value.
(cherry picked from commit a4b32d7b9c)
Co-authored-by: Tobias Urdin <tobias.urdin@gmail.com>
feat(lookup/bitwarden): add support for fetching all items from a collection (#8013)
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
(cherry picked from commit f5fa16c881)
Co-authored-by: Emilien Escalle <neilime@users.noreply.github.com>
Fix check mode in iptables_state for incomplete iptables-save files along with integration tests (#8029)
* Implement integration test to reproduce #7463
* Make new iptables_state checks async
* Add missing commit to iptable_state integration test
* Remove async when using checkmode in iptables_state integration tests
* Do per table comparison in check mode for iptables_state
* Calculate changes of iptables state per table based on result
* Output target iptables state in checkmode
* Refactor calculation of invidual table states in iptables_state
* Add missing return for table calculation
* Add missing arg to regex check
* Remove leftover debug output for target iptable state
* Parse per table state from raw state string
* Join restored state for extration of table specific rules
* Switch arguments for joining restored iptable state
* Output final ip table state
* Compare content of tables
* Complete iptables partial tables test cases
* Correct order of test iptables data
* Update docu for iptables tables_after
* Add changelog fragment
* Appease the linting gods for iptables_state
* Adjust spelling and remove tables_after from return values
(cherry picked from commit 23396e62dc)
Co-authored-by: Maxopoly <max@dermax.org>
ini_file - support optional spaces around section names (#8075)
* ini_file - support optional spaces between section names and their surrounding brackets
Some ini files have spaces between some of their section names and the
brackets that enclose them. This is documented in the 'openssl.cnf(5)' man
page. In order to manage files such as /etc/ssl/openssl.cnf with ini_file
before now, one would have to include spaces in the section name like this:
section: ' crypto_policy '
option: Options
value: UnsafeLegacyRenegotiation
This change implements matching section headers with such optional spaces.
Existing tasks using the workaround above will continue to work, even in
cases where spaces in section headers are subsequently removed.
* readability improvement in the test content expressions
---------
Co-authored-by: Todd Lewis <todd_lewis@unc.edu>
(cherry picked from commit 4363f8764b)
Co-authored-by: Todd Lewis <utoddl@gmail.com>
Ignore pylint warnings for construct that does not work with Python 2 (#8130)
* Ignore pylint warnings for construct that does not work with Python 2.
* Revert "Ignore pylint warnings for construct that does not work with Python 2."
This reverts commit 51d559cc94.
* Different approach: use ignore.txt since otherwise ansible-core 2.14 tests fail.
(cherry picked from commit fb67df3051)
Co-authored-by: Felix Fontein <felix@fontein.de>
Implement usb_facts module (#8076)
* First implementation of usb module
* Rename to usb_facts
* Working tests
* Appease linter
* Fix author
* Remove splitlines arg for python 2.7 compat
* indent usb test further
* indent usb test a bit less
* Remove trailing whitespace
* Update plugins/modules/usb_facts.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/usb_facts.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adjust usb_facts PR based on feedback
* Add usage example and extend correct documentation fragment
* Add myself to BOTMETA.yml
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6298ad4faa)
Co-authored-by: Maxopoly <max@dermax.org>
Aix filesystem crfs issue (#8052)
* crfs issue in aix_filesystem.py
Change the crfs logic and fields, since empty options and order seem to be an issue.
this quick fix seems to solve it
* Create aix_filesystem-crfs-issue.yml
changelog fragment
* fix
fix typo
* Update changelogs/fragments/aix_filesystem-crfs-issue.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Refactored based on feeback and testing
Refactored the changes i did based on the comments and testing. Also changed the attribute default values because they were causing errors
* blank line whitespaces
* fix default
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 73b6b98ed9)
Co-authored-by: Mike <mike@php-webdesign.nl>
Add --diff support for ldap_attrs module (#8073)
* Add --diff support for ldap_attrs module
* Change diff_mode support in docstring to full
* Use _attrs suffix for old and new
* Add version added to ldap_attrs diff mode
* Add fragment for ldap_attrs diff mode
* Update fragment to include link to PR and lowercase start
* Update changelogs/fragments/8073-ldap-attrs-diff.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 09cded05e7)
Co-authored-by: StopMotionCuber <ruben.simons@web.de>
CI: add macOS 14.3 for devel, move 13.2 to stable-2.16 (#8084)
Add macOS 14.3 for devel, move 13.2 to stable-2.16.
(cherry picked from commit 6fab46710a)
Co-authored-by: Felix Fontein <felix@fontein.de>
fix(homebrew): give correct error message when become true used (#8048)
* fix(homebrew): give correct error message when become true used
This commit fixes#8047 by raising the exception coming from calling
homebrew with the `become: true` parameter set.
* chore(changelog): add changelog fragment
(cherry picked from commit fa30b02294)
Co-authored-by: Michael Wall <thewalla07@gmail.com>
pam_limits: do not create file in check mode when it does not exist (#8057)
Do not create file in check mode when it does not exist.
(cherry picked from commit c13bede0c5)
Co-authored-by: Felix Fontein <felix@fontein.de>
Updates `lxd_container` to support new LXD API (#7980)
* feat: ✨ adds support for /1.0/instances endpoint
* Update changelogs/fragments/lxd-instances-api-endpoint-added.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 74c15c1241)
Co-authored-by: Anthony Anderson <fnanderson93@gmail.com>
[FIX] proxmox_kvm: fetch vm status from node-specific API endpoint to ensure fresh state (#7953)
* proxmox_kvm: fetch vm status from node-specific API endpoint to ensure fresh state, fixes#7817
* changelog fragments
* Fix changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 248e2ff321)
Co-authored-by: nxet <nxet821@protonmail.com>
Fix instruction for distro Ubuntu and Debian for htpasswd depends (#8037)
* Fix instruction fo debian 12 for htpasswd depends
* Add range for python-passlib distro
(cherry picked from commit 05bf5ee1df)
Co-authored-by: Xavier Mitault <xavier.mitault@epitech.eu>
fix(modules/gitlab_runner): Use correct argument to list all runners (#7790)
* fix(modules/gitlab_runner): Use correct argument to list all runners
python-gitlab 4.0.0 removed support for the `as_list=False` parameter.
This functionality is now available as `iterator=True`.
Without this change, the module actually only retrieves the first
20 results, which can lead to non-idempotent behavior, such as
registering a runner again.
* Add changelog entry (#7790)
* gitlab_runner: Check python-gitlab version when listing runners
* gitlab: Add list_all_kwargs variable to module_utils
* refactor(gitlab modules): use list_all_kwargs where it helps (#7790)
I did not change every instance of all=True or all=False, only those
which could obviously benefit from simplifying:
* Code using `all=True` but then searching for any items that match a
condition (no need to collect the full list).
* Code that basically reimplements `all=True` with manual pagination.
(These could be changed to `all=True`, but `list_all_kwargs` also
sets per_page to 100, to gather data faster.)
* gitlab_instance_variable: Use list_all_kwargs
* Add new changelog entry for gitlab module changes (#7790)
(cherry picked from commit 787fa46217)
Co-authored-by: Mike Wadsten <mikewadsten@gmail.com>
Add templating support to Icinga2 Inventory (#7996)
* Add templating support to Icinga2 Inventory
* Added CHANGELOG fragment
* Linting after CI failure
* Update changelogs/fragments/7996-Add templating support to Icinga2 Inventory.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Error in variables'name
---------
Co-authored-by: Gianluca Salvo <gianluca.salvo@gruppomol.it>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 638a7fc199)
Co-authored-by: Gianluca Salvo <Gianlu@users.noreply.github.com>
Correct apk docu to not include spaces in package name (#8009)
* Correct apk docu to not include spaces in package name
* Update apk name docu as suggested in PR
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b5c3361be4)
Co-authored-by: Maxopoly <max@dermax.org>
Fix errors in hpe specific get methods (#7952)
* Fix errors in hpe specific get methods
* corrects reference to non existent `self.chassis_uri_list` to
`self.chassis_uris`
* corrects syntactically incorrect dereferences
* removes an uneccessary variable assignment to `chassis_uri_list`
in `get_psu_inventory` method
* adds changelog fragment for above indicating fix of issue #7951
* Update changelog.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit dd7c3ad10d)
Co-authored-by: Dave Rawks <dave@rawks.io>
cargo: use the correct path when checking installation status fixing idempotency issue. (#7970)
* cargo: use the correct path when checking installation status
* Add changelog fragment
* Update changelogs/fragments/7970-fix-cargo-path-idempotency.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9510988abc)
Co-authored-by: rbomze <14312790+rbomze@users.noreply.github.com>
Added transactional(rollback/commit) support to mssql_script module (#7976)
* Added transactional(rollback/commit) support to mssql_script module via optional boolean param 'transaction'
* Added changelog fragment
* Implemented PR Review comments by felixfontein
(cherry picked from commit beacd54b7b)
Co-authored-by: Udit Yadav <36297285+BlackHat786000@users.noreply.github.com>
New filters to calculate the union, intersection, difference and symmetric difference of lists by preserving the items order (#7985)
New filters lists_union, lists_intersect, lists_difference and lists_symmetric_difference added.
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
(cherry picked from commit 102a0857db)
Co-authored-by: cfiehe <cfiehe@users.noreply.github.com>
Add noexec support to sudoers (#7983)
* Add noexec support to sudoers
* Add changelog fragment #7983
* Fix yml formatting in fragment 7983
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 49bd9cbd3c)
Co-authored-by: adaniaud <adaniaud@users.noreply.github.com>
Redfish: Enhanced GetUpdateStatus to allow for empty responses to accomodate possible usage of 204 No Content (#8004)
* Added handling for 204 No Content in some circumstances
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Correcting gzip usage; open_url does the decompression automatically
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Changelog fragment
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Removed imports no longer used
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Updated data unpacking to dynamically check ansible-core version and response headers to see if gzip decompression is needed
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
---------
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
(cherry picked from commit 2a8da76907)
Co-authored-by: Mike Raineri <michael.raineri@dell.com>