pipx: Add example for installing package with dependency group (#10189)
* Add example for installing package with dependency group
* add tests
(cherry picked from commit 2405611092)
Co-authored-by: Robin <robin@rkslot.nl>
yaml callback: use new util introduced in ansible-core 2.19.0b2 (#10242)
* Avoid repeating some code.
* Use new utility added for ansible-core 2.19.0b2.
* Lint.
* Add changelog fragment.
* transform_to_native_types() does not convert map keys.
To catch all tagged strings, we have to recursively walk the data structure then.
* Add test with vaulted string.
(cherry picked from commit 66cb9aefb5)
Co-authored-by: Felix Fontein <felix@fontein.de>
Tests: adjust to ansible-core devel changes (#10209)
Apparently the error message returned by AnsibleModule.run_command() when trying to execute a non-existing executable changed.
Ref: 600c1e67b4
(cherry picked from commit 63add288dc)
Co-authored-by: Felix Fontein <felix@fontein.de>
gitlab_*_access_token: handle `revoked` field in group and project access tokens (#10196)
fix(gitlab): handle `revoked` field in group and project access tokens
(cherry picked from commit b86e4af103)
Co-authored-by: Massimo Gengarelli <massimo.gengarelli@proton.me>
Feat: Add callback plugin print_task (#10087)
* Feat: Add callback plugin print_task
Prints task snippet to job output.
* Fix for failing tests
* Fix some pep8 formatting issues
* Updating DOCUMENTATION variable with version_added
* Set correct CALLBACK_NAME and fix warning with gather_facts
* Fix formatting again
* Update plugins/callback/print_task.py
* Update plugins/callback/print_task.py
* Add entry to BOTMETA.yml
* Use CSafeLoader and fallback to SafeLoader
* Change output function to self._display.display()
* Adding tests for community.general.print_task
* Adding EXAMPLES
* Apply suggestions from code review
---------
(cherry picked from commit b861850e1a)
Co-authored-by: Max Mitschke <demonpig@fastmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
rundeck_acl_policy: fix project acls are put/posted to the wrong endpoint (#10097)
* Fix project acls are put/posted to the wrong endpoint
* Add changelog fragment.
* Fix 2.7 sanity errors in github
* Fix fragment extension and use 2.7 syntax in test
* Update changelogs/fragments/10097-fix-rundeck_acl_policy-project-endpoint.yml
* Fix pep8 formatting
* Add licensing to unit test
---------
(cherry picked from commit ff0ed6f912)
Co-authored-by: kjoyce77 <kevin.joyce@outlook.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
pipx: accept python version specs in parameter `name` (#10031)
* pipx: accept python version specs in parameter "name"
* pipx_info: adjustment for backward compatibility
* remove unnecessary comprehension
* remove f-str
* no shebang for module utils
* remove f-str
* fix syntax error
* fix pipx_info
* rollback adjustments in existing tests
* docs & test update
* add debugging tasks to int test
* integration test checks for version of packaging
* move assertion to block
* fix idempotency when using version specifier
* add changelog frag
* fix docs
* dial down the version of tox used in tests
To accommodate old Pythons
* Update plugins/modules/pipx.py
* Apply suggestions from code review
* refactor/rename package requirements code
* fix filename in BOTMETA
* Update plugins/modules/pipx.py
* Update plugins/modules/pipx.py
* pipx mod utils: create make_process_dict and deprecate make_process_list
* pkg_req: make method private
* make_process_dict is simpler and more specialized
* ensure version specifiers are honored when state=install
* fix insanity
* pipx: reformat yaml blocks
* pipx: doc wordsmithing
---------
(cherry picked from commit 2b4cb6dabc)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
lxc: fix unit tests (#10115)
Don't compare strings passed through set_option()/get_option() with 'is'.
(cherry picked from commit 86507e8aca)
Co-authored-by: Felix Fontein <felix@fontein.de>
CI: Use community.crypto 2.x.y for ansible-core 2.16 and before (#10086)
* Use community.crypto 2.x.y for ansible-core 2.16 and before.
* Also use stable-2 for ubuntu2004 tests.
(cherry picked from commit 60f1169d42)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add xdg_mime module (#10007)
* Add version of xdg_mime module
* Fix xdg_mime_get since the command is different
* Add query parameter
* Fix order of parameters
* Add myself to BOTMETA
* Add unit tests
* Fix the way we deal when there is no handler set
* Improve documentation
* Remove unused import
* Fix documentation
* Strip xdg-mime from version string
* Fix information about version
* Add error message sample
* Add test to invalid handler
* Add support to multiple mime-types
* Change the output parameter from handlers to handler
* Change tests related to multiple mime-type support
* Small fixes
* Stop using constant to enable changed state
* Add before_handlers and after_handlers
* Change tests to use before and after structures
* Add a stronger message about using a non-installed handler
* Manage some edge cases
* Change error message to match the new value
* Add some fixes
* Change some tests
* Update plugins/modules/xdg_mime.py
* Remove a blank line
* Remove single quote
* Add xdg-mime to the version in the mocks
* Remove after_handlers and make code simpler
* Update tests to work without after_handlers
* Remove diff_params and clean output_params
* Make mime_type plural since it supports multiple items
* Move the handler check to module init
* Use anchors in the test to make yaml simpler
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Update plugins/modules/xdg_mime.py
* Add blank line to separe examples
* Update plugins/modules/xdg_mime.py
* Add a small homage to my late grandma
* Update plugins/modules/xdg_mime.py
* Fix pep8 problem with the homage
* Remove trailing whitespace
* Update plugins/modules/xdg_mime.py
---------
(cherry picked from commit 373334d668)
Co-authored-by: Marcos Alano <mhalano@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Mark supervisorctl tests as unstable (#10057)
Mark supervisorctl tests as unstable.
(cherry picked from commit a720e99482)
Co-authored-by: Felix Fontein <felix@fontein.de>
Remove blanket skips for Python 3 in CI (#10043)
* Remove blanket skips for Python 3 in CI.
* Try to fix hg tests.
* Disable hg tests.
* Drop restriction of supervisor to <4.0.0.
This was introduced in https://github.com/ansible/ansible/pull/54935.
* Make tests work with supervisorctl 4.0.0.
According to https://supervisord.org/changes.html#id12,
"supervisorctl will now set its exit code to a non-zero value when an error condition occurs."
I'm not sure why a stopped service in 'status' constitutes an error condition,
but whatever 🤷...
* Use correct Python executable.
* Skip RHEL/macOS; diff on config write.
* Skip CentOS 7 and OpenSuSE on ansible-core 2.16.
(cherry picked from commit 2a5abab738)
Co-authored-by: Felix Fontein <felix@fontein.de>
Use antsibull-nox instead of extra sanity test runner and extra workflows (#10022)
* Use antsibull-nox instead of extra sanity test runner and extra workflows.
* Avoid sys.argv[0].
(cherry picked from commit 3ee55c6828)
Allowing uppercase tags in proxmox & proxmox_kvm (#10024)
* Allowing uppercase tags in proxmox & proxmox_kvm
* Fix#9895 : fixes the 'not a valid tag' error message when the VM or container tag contains uppercase characters
* Add PR URL to changelog fragment.
---------
Co-authored-by: s1githug <sgithug@free.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ce421dbd7d)
Co-authored-by: s1github <sgithub@free.fr>
add the wsl connection plugin (#9795)
* add the wsl connection plugin
* move the banner_timeout required paramiko version to its own line
* document the proxy_command required paramiko version
* document the timeout required paramiko version
* simplify the sending of the become_pass value
* add Connection.__init__ type hints
* add MyAddPolicy.missing_host_key type hints
* normalize the Connection._parse_proxy_command replacers dict values to the str type
* add the user_known_hosts_file option
* modify the private_key_file option type to path
(cherry picked from commit 96b493002c)
Co-authored-by: Rui Lopes <rgl@ruilopes.com>
param pkcs12_alias and cert_alias to be optional in java_cert module (#9970)
* changed pkcs12_alias and cert_alias to be optional when importing pkcs12 certificate in keystore
* Add changelog fragment
* Update changelogs/fragments/9970-pkcs12_alias_cert_alias_optional.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/9970-pkcs12_alias_cert_alias_optional.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 42a161abf5)
Co-authored-by: Emanuele Bernardi <e.berna@gmail.com>
Make ready for data tagging (#9833)
* Fix dependent lookup.
* Fix ansible_type plugin utils and adjust documentation of reveal_ansible_type filter and ansible_type test.
* Fix diy callback plugin.
* Adjust to Data Tagging.
* Vendor and use internal code from ansible-core to fix YAML callback.
Ref: https://github.com/ansible/ansible/issues/84781
(cherry picked from commit 04cfce78ea)
Co-authored-by: Felix Fontein <felix@fontein.de>
allow gitlab-project-members module to handle user level "owner" (#9953)
* fix(modules/gitlab-project-members): fix ...
... module not being able to handle owner access level
* add changelog fragment for this pr
* fix and extend integration tests
* extend parameter docu as requested by review
* also add docu for other parameters
* remove pip install break-packages flag from ...
... integration tests
---------
Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
(cherry picked from commit 1157b7102f)
Co-authored-by: morco <thegreatwiper@web.de>
Unit tests: replace mock and compat with code from community.internal_test_tools (#9921)
* Replace compat with equivalent from community.internal_test_tools.
* Replace mock with equivalent from community.internal_test_tools.
(cherry picked from commit 410cf72aec)
Co-authored-by: Felix Fontein <felix@fontein.de>
Use more unit test utils from community.internal_test_tools (#9918)
* Make conftest's patch_ansible_module use the context manager from .utils.
* Fix test dependencies.
* Use module mock utils from community.internal_test_tools.
* Use DataDictLoader from community.internal_test_tools.
* Use trust util from community.internal_test_tools.
(cherry picked from commit 8ab8010b6d)
Co-authored-by: Felix Fontein <felix@fontein.de>
sysrc: extend the list of FreeBSD releases where the jail test fails (#9900)
Extend the list of FreeBSD releases where the jail test fails.
(cherry picked from commit 6a2d9ccd99)
Co-authored-by: Felix Fontein <felix@fontein.de>
systemd_info - extend support to timer unit (#9891)
* systemd_info - extend support to timer unit
* systemd_info - add changelogs fragments
* systemd_info - fix description and base_props
(cherry picked from commit 4a2cc71141)
Co-authored-by: Nocchia <133043574+NomakCooper@users.noreply.github.com>
Simplify module_utils unit tests (#9842)
Simplify module_utils unit tests.
(cherry picked from commit c46575cf06)
Co-authored-by: Felix Fontein <felix@fontein.de>