Add test for unsafe plugin util (#8345)
Add test for unsafe plugin util.
(cherry picked from commit 7aa118b957)
Co-authored-by: Felix Fontein <felix@fontein.de>
Fix django_manage tests (#8325)
Ensure that manage.py is executable.
(cherry picked from commit feb443d260)
Co-authored-by: Felix Fontein <felix@fontein.de>
Disable ejabberd tests on Arch Linux (#8313)
Disable ejabberd tests on Arch Linux.
(cherry picked from commit bc609d74a0)
Co-authored-by: Felix Fontein <felix@fontein.de>
Disable cpanm tests for RHEL 7 and CentOS 7 (#8312)
Disable cpanm tests for RHEL 7 and CentOS 7.
(cherry picked from commit 4bd68ac153)
Co-authored-by: Felix Fontein <felix@fontein.de>
use smaller snap, add disabled to aliases (#8237)
* use smaller snap, add disabled to aliases
* rollback tag disabled in aliases
* comment out the test_dangerous as it takes too long
* comment out the test_dangerous as it takes too long
* Update tests/integration/targets/snap/tasks/main.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 45c2e0f8d0)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
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>
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>
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 integration tests for apk (#7992)
* Implement integration tests for apk
* Add group for apk integration test
* Adjust integration tests of apk as suggested in PR
(cherry picked from commit ffa3d15881)
Co-authored-by: Maxopoly <max@dermax.org>
Fixes#1226 - keycloak_client detects changes on check_mode but not in run mode (#7881)
* Fix warning integrated
* Update Keycloak version intergrated test
* Exclude metadata from diff test
* Sanity
* Add fragments
* typo
* Add test
* Update changelogs/fragments/7881-fix-keycloak-client-ckeckmode.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove docker compose
* Update changelogs/fragments/7881-fix-keycloak-client-ckeckmode.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 001292c780)
Co-authored-by: desand01 <desrosiers.a@hotmail.com>
fixes#7918 - onepassword lookup fails if field name contains uppercase letters and section is specified (#7919)
* fix#7918
* Update plugins/lookup/onepassword.py
Co-authored-by: Sam Doran <github@samdoran.com>
* onepassword lookup: transform field ids to lowercase
* #7918: added unit tests
* #7919: add changelog fragment
* Update changelogs/fragments/7919-onepassword-fieldname-casing.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Sam Doran <github@samdoran.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6088e2dc0f)
Co-authored-by: Benjamin Mitzkus <b.mitzkus@gmx.de>
filesize: use 2 TB instead of 4 TB in sparse file tests (#7935)
Use 2 TB instead of 4 TB.
4 TB does not work on the Alpine VMs for some reason
(File too large / cannot seek: Invalid argument).
(cherry picked from commit 549a73bd78)
Zuul third-party-check: disable ansible-doc part of galaxy-importer (#7907)
Zuul third-party-check: disable ansible-doc part of galaxy-importer.
(cherry picked from commit 2580da9796)
Co-authored-by: Felix Fontein <felix@fontein.de>
Detection of already installed homebrew cask (#7870)
* fix: detect already installed cask
Use json output v2 to check if formulae and casks are installed
chore: add changelog fragment
* test: add homebrew cask specific tests
* refactor: change cask used in tests
* chore: apply suggestions to changelog fragment
(cherry picked from commit be3bfd6fa5)
Co-authored-by: João Victor Silva <160127815@aluno.unb.br>
Make compatible with newer reuse versions (#7858)
Make compatible with newer reuse versions.
(cherry picked from commit 002208f425)
Co-authored-by: Felix Fontein <felix@fontein.de>
ipa_otptoken: fix wrong return value string to bool (#7795)
ipa_data is return ipatokendisable in boolean format and the module expects it as a string
this behavior causes a lack of idempotency and the get_diff module will fail in the second run.
(cherry picked from commit 31de16cee3)
Co-authored-by: Parsa Yousefi <p.yousefi97@gmail.com>
Disable timezone tests on Arch Linux (#7831)
Disable timezone tests on Arch Linux.
(cherry picked from commit 8891f559ef)
Co-authored-by: Felix Fontein <felix@fontein.de>
CI: fix xml tests on RHEL 8 (#7827)
* Try to fix xml installation on RHEL.
* Install python-lxml on RHEL 8. Should speed up tests considerably.
(cherry picked from commit 878664778e)
Co-authored-by: Felix Fontein <felix@fontein.de>
CI: for some reason async-timeout doesn't seem to get installed on Python 3.11 (#7811)
For some reason async-timeout doesn't seem to get installed on Python 3.11.
(cherry picked from commit 9946f758af)
Fix failing sanity and integration tests (#7807)
* Remove some Shippable specific code that trips latest shellcheck.
* Rename templated shell script to .sh.j2 to avoid shellcheck disliking the templating.
* Copy on the remote, not from controller to remote.
(cherry picked from commit ee8b15708f)
Co-authored-by: Felix Fontein <felix@fontein.de>
Bugfix: keycloak_identity_provider does not handle mapper changes properly (#7418)
* fix keycloak_identity_provider ITs to actually pass
- wrong identityProviderAlias in mapper configuration
* kc_identity_provider: add mapper reconfiguration regression tests
* test for removing an existing mapper
* test for adding a new mapper when others already exist
* test for module idempotency when mappers not ordered by name in ascending order
* kc_identity_provider: add bugfixes for mapper reconfigurations
* removing an existing mapper
* adding a new mapper when others already exist
* module idempotency when mappers not ordered by name in ascending order
* add changelog fragment
* prevent unnecessary update_mapper calls when there is no change
* Update changelogs/fragments/7418-kc_identity_provider-mapper-reconfiguration-fixes.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/7418-kc_identity_provider-mapper-reconfiguration-fixes.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/7418-kc_identity_provider-mapper-reconfiguration-fixes.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/keycloak_identity_provider.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* kc_identity_provider: sort changeset mappers via name OR id to prevent potential failures in case name was not specified in playbook
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit fd0d05d6f2)
Co-authored-by: Jakub Danek <danekja@users.noreply.github.com>
Fix integration tests on Arch (#7705)
* Fix ejabberd_user integration tests on Arch Linux.
* Fix odbc integration tests on Arch Linux.
* The old name of systemd_service is systemd.
(cherry picked from commit aea238e5d1)
Co-authored-by: Felix Fontein <felix@fontein.de>
onepassword lookup - Make section and field case insensitive (#7564)
* onepassword lookup: Make section and field case insensitive
This was a regression in behavior when adding support for op v2.
* Return a string by default to avoid an exception if a field is missing
* Use a helper function to lower a value if possible
* Update changelog
(cherry picked from commit 241cc02fa8)
Co-authored-by: Sam Doran <sdoran@redhat.com>
passwordstore tests: re-enable gopass on Debian-like systems (#7656)
Re-enable gopass on Debian-like systems.
(cherry picked from commit 096d36adc5)
Co-authored-by: Felix Fontein <felix@fontein.de>
redhat_subscription: use D-Bus registration on RHEL 7 only on 7.4+ (#7624)
subscription-manager does not provide a D-Bus interface in versions of
RHEL 7 older than 7.4.
(cherry picked from commit af01b462d5)
Co-authored-by: Pino Toscano <ptoscano@redhat.com>
Fix bad expressions in tests (#7625)
* Fix bad expressions in tests.
ci_complete
* Disable cmd_runner integration tests.
ci_complete
* Another bad expression.
ci_complete
(cherry picked from commit 3b779ecade)
Co-authored-by: Felix Fontein <felix@fontein.de>
interfaces_file: filter by address_familiy when updating method (#7612)
* When updating method, check address_family if provided.
* Also test modifying 'method' without address_family filter.
(cherry picked from commit 5adb7ab948)
Co-authored-by: Felix Fontein <felix@fontein.de>
CI: devel supports Fedora 39, and no longer Fedora 38 (#7541)
* devel supports Fedora 39, and no longer Fedora 38.
* Disable 'mail' tests for Python 3.12+.
Ref: https://github.com/ansible-collections/community.general/issues/4656
* Fix setupSSLServer to work with Python 3.12.
(cherry picked from commit b8ecb1671b)
Co-authored-by: Felix Fontein <felix@fontein.de>
sysrc: FreeBSD jail test no longer works with FreeBSD 13.1 (#7543)
Jail test no longer works with FreeBSD 13.1.
(cherry picked from commit b3c661a9f6)
Co-authored-by: Felix Fontein <felix@fontein.de>
CI: Add rhel/9.3 for devel, remove rhel/9.2 (#7524)
* Add rhel/9.3 for devel, remove rhel/9.2.
* Also skip rhel/9.3 when skipping rhel/9.2.
* snapd is also on available on RHEL 9.3.
(cherry picked from commit 32fa588f47)
Co-authored-by: Felix Fontein <felix@fontein.de>
timezone tests: do not restore original timezone if it wasn't known (value 'n/a') (#7476)
Do not restore original timezone if it wasn't known (value 'n/a').
(cherry picked from commit 57e36d7dc2)
Co-authored-by: Felix Fontein <felix@fontein.de>
Revert "Disable ansible_galaxy_install tests until Galaxy is fixed (#7440)" (#7446)
This reverts commit f7532c7d9d.
(cherry picked from commit 8055dd1c9b)
Co-authored-by: Felix Fontein <felix@fontein.de>
Fix more typos (#7439)
* Fix more typos in plugins/.
* Fix typos in tests/unit/.
* Fix typos in tests/integration/.
* Fix more typos.
Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
---------
Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
(cherry picked from commit 2b62826082)
Co-authored-by: Felix Fontein <felix@fontein.de>
Disable ansible_galaxy_install tests until Galaxy is fixed (#7440)
Disable ansible_galaxy_install tests until Galaxy is fixed.
(cherry picked from commit f7532c7d9d)
Co-authored-by: Felix Fontein <felix@fontein.de>
Skip odbc tests on Python 2.6 and CentOS 7 (#7385)
Skip odbc tests on Python 2.6 and CentOS 7.
(cherry picked from commit 91fdc8e06a)
Co-authored-by: Felix Fontein <felix@fontein.de>
Fix lxc plugin options (#7369)
* Fixture for liblxc
Add a fixture to allow testing the lxc connection plugin both with and
without liblxc being present.
Also change the test from unittest to pytest.
* Update liblxc error message
The error is not specific to python2, so remove the version. Also add
a test for it.
* Migrate to options
Because the lxc plugin was only using PlayContext properties, using host
vars like `ansible_lxc_host` didn't work. This is fixed by instead using
the `get_option` method inherited from `AnsiblePlugin`.
The options are not yet available in the `__init__` function, so the
determination of the container name is moved to the `_connect` method,
which is the first time it is actually needed.
The default for the `remote_addr` option is removed, because the string
`inventory_hostname` is not very useful. At all. This seams to have been
spread with copy&paste and a bit of cargo culting. The variable priority
already takes care of setting the value.
* Add changelog fragment
* Fix for Py2.7
`TypeError: super() takes at least 1 argument (0 given)`
* Add plugin type to changelog fragment.
* Restore untemplated default
This partially reverts commit 429d8c8cfb.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1bf5a44a77)
Co-authored-by: Corubba <97832352+corubba@users.noreply.github.com>
snap: detect change by checking final state (#7340)
* snap: detect change by checking final state
* detect change in snap_status variable
* add changelog frag
(cherry picked from commit 323a1dcff8)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>