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>
Add `executable` option to cargo (#7352)
* Add `executable` option to cargo
Add `executable` option to cargo to make the module easier to use with
cargo installed by rustup.
* Add changelog fragment
* Add license to integration test
* Do not test on CentOS 6
CentOS 6 cannot even validate the certificate in https://sh.rustup.rs.
* Fix condition to skip tests on CentOS 6
* Add version_added to path
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cargo.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* shell → command
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 0ca07b0b05)
Co-authored-by: radek-sprta <mail@radeksprta.eu>
LXD moved to Canonical (#7332)
* plugins/inventory/lxd: update links to doc
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/modules/lxd_container: update links to doc
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/modules/lxd_profile: update links to doc
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/modules/lxd_project: update links to doc
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
---------
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 160e00e5b9)
Co-authored-by: Simon Deziel <simon.deziel@gmail.com>
pnpm: version should not be latest when state is latest (#7339)
* (fix) don't set version at latest at state: latest
If version is forcefully set at latest when state is latest, the package
will always be changed, as there is no version "latest" will ever be
detected. It is better to keep it None.
* (fix) fixed tests to reflect recent changes
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* (feat) added changelog fragment for pull #7339
* (fix) apply correct punctuation to changelog
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 39895a6d38)
Co-authored-by: Aritra Sen <125266845+aretrosen@users.noreply.github.com>
CI: ansible-core devel drops support for Python 2.7 and 3.6 (#7344)
* ansible-core devel drops support for Python 2.7 and 3.6.
* Temporarily disable unit tests for Python 3.12.
(cherry picked from commit 8c069f3afb)
Co-authored-by: Felix Fontein <felix@fontein.de>
Support for simpleinit-msb init system (#6618)
* Support for simpleinit-msb init system
* Drop unused imports
* Correct regex
* Fix documentation
* Address BOTMETA
* PEP8 compliance
* Drop irrelevant snippet
* Add missing option type in docs
* PEP8 compliance
* Update plugins/modules/simpleinit_msb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/simpleinit_msb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/simpleinit_msb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Daemonize commands in service control to handle telinit broken behavior
* Update plugins/modules/simpleinit_msb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/simpleinit_msb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/simpleinit_msb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/simpleinit_msb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Unify examples section
* Add unit tests for service state detection
* Drop unused import
* Add service enable/disable tests
* Test get_service_tools()
* Do not shadow fail_json()
* Reuse module init
* Implement service_enabled() and associated tests
* Update plugins/modules/simpleinit_msb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Indent
* Bump version_added
* Bump requirements
* Reword and move to notes
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8dc5a60294)
Co-authored-by: Val V <vaygr@users.noreply.github.com>
Add support for Oem params (#7330)
* Add support for "Oem" parameters in the MultipartHTTPPushUpdate redfish_command
* Add doc entry
* Add changelog fragment
Add version_added field
* Re-word the changelog fragment
* After further testing this should not have a default definition as
it should not be in the payload if not defined
(cherry picked from commit cd83b245bb)
Co-authored-by: Scott Seekamp <sseekamp@coreweave.com>
Adding deprecation for timeout parameter from 10 to 60 for redfish_info, redfish_config and redfish_command (#7295)
* Adding deprecation for timeout from 10 to 60 for redfish_info, redfish_config and redfish_command
* Adding changelog fragment and sanity fixes
* Update changelogs/fragments/7295-adding_deprecation_for_timeout_in_redfish_info_config_command.yml
Agreed. Thanks!
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/7295-adding_deprecation_for_timeout_in_redfish_info_config_command.yml
Agreed. Thanks!
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/redfish_command.py
Agreed. Thanks!
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/redfish_command.py
Agreed. Thanks!
Co-authored-by: Felix Fontein <felix@fontein.de>
* Updating release version
---------
Co-authored-by: Kushal <t-s.kushal@hpe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit eae7161bf0)
Co-authored-by: TSKushal <44438079+TSKushal@users.noreply.github.com>
feat(redis_info): use module_utils redis to support TLS (#7267)
feat(redis_info): use redis module_utils to support TLS
(cherry picked from commit 43396efa2c)
Co-authored-by: Grégoire Martini <greg5813@users.noreply.github.com>
supervisorctl: stop process before removing it (#7284)
* supervisorctl: stop process before removing it
* Update supervisorctl.py
Removes blanks
* adds fragment
* introduces stop_before_removing parameter and fix deleting after stopping
* reduce line length
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* miss some exit
* fixing review
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b88b04593f)
Co-authored-by: Damien Gustave <delovan@gmail.com>
feat(cargo): add locked option (#6134)
* feat(cargo): add locked option
This commit introduces locked option to cargo module,
allowing user to install with locked dependency.
Equivalent to `--locked` flag of `cargo install` command
* Update docs.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit a0d8f4de78)
Co-authored-by: Murad Bashirov <66242799+m-spitfire@users.noreply.github.com>
xinetd no longer exists; use mdadm instead (#7309)
xinetd no longer exists; use mdadm instead.
(cherry picked from commit 522fb23e06)
Co-authored-by: Felix Fontein <felix@fontein.de>
[proxmox] return vmid and taskid (#7263)
* add vmid exit value
if create succeeds, we want the vmid
* fix syntax
* add vmid to return codes
* Add taskid to return, and only return vmid when it makes sense to
* add changelog fragment with temporary filename
* Add pr number to fragment
* fix PEP8 E501: line too long
* oops, I knew I still missed something...
* Update 7263-proxmox-return-vmid-and-taskid.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* removed taskid from places it's not defined
* finally fixed sanity test errors
Okay, so maybe just waiting for CI to run the tests was a terrible idea.
I installed `inotifywait`, set up a venv for the tests, and in my
editor's terminal pane I ran the following, letting it run every save
until it exited:
until ansible-test sanity proxmox ; do
inotifywait --event modify plugins/modules/proxmox.py
done
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 28b3da88a9)
Co-authored-by: bri <284789+b-@users.noreply.github.com>
* New Module: gio_mime (#7271)
* gio_mime: new module
* multiple changes
- fixed gio_mime module utils handler detection
- add message to test helper assertion
- add unit test
* gio mime output uses unicode smart quotes
* test helper: do not use skip/xfail reason messages - break in old pytest
* Update plugins/modules/gio_mime.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* change exist variables to meet standards
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9489a1ea1c)
* Add ignore for 2.17.
(cherry picked from commit c4009deeb1)
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Ignore similar chars in random_string (#7242)
* Added the option to ignore certain characters
This can be usefull for eliminating confusion.
* Removed the loop and added each char_sets
The variable name is not known inside the loop so updating it does not work.
* Changelog fragment file
* Forgot the file extention for the fragment yaml file
* Update plugins/lookup/random_string.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/lookup/random_string.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/lookup/random_string.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c3fd14e18f)
Co-authored-by: Gustav Alerby <g.alerby@gmail.com>
Fixed gitlab_*_variable when using purge (#7251)
* Fixed gitlab_*_variable when using purge, see issue #7250
* Update changelogs/fragments/7251-gitlab-variables-deleteing-all-variables.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit fc2e6c4b45)
Co-authored-by: MaxBidlingmaier <103562872+MaxBidlingmaier@users.noreply.github.com>
Add keycloak_realm_key module (#7127)
* Add keycloak_realm_key module
* keycloak_realm_key: make "ansible-test sanity" happy
Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
* keycloak_realm_key: support check_mode
* keycloak_realm_key: add integration tests
* keycloak_realm_key: remove FIXME comment
* keycloak_realm_key: fix EOL in integration test variables
* keycloak_realm_key: remove unused import
* keycloak_realm_key: remove integration test realm at the end of test suite
* keycloak_realm_key: add version_added metadata
* keycloak_realm_key: add documentation for end_state
* keycloak_realm_key: support the "certificate" parameter
As with "private_key" changing the certificate after creation is not possible
because we can't compare the current value to the desired value.
* keycloak_realm_key: document default for certificate parameter
Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
* keycloak_realm_key: implement diff mode
* Update plugins/modules/keycloak_realm_key.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/keycloak_realm_key.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/keycloak_realm_key.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/keycloak_realm_key.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/keycloak_realm_key.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* keycloak_realm_key: remove note about literal linefeeds
* keycloak_realm_key: remove defaults from priority and certificate
* keycloak_realm_key: mark diff and check modes as partially supported
* keycloak_realm_key: implement "force" parameter
This ensures that the desired state is always enforced on keys that should be,
and are, present.
* keycloak_realm_key: fix yaml parsing error in documentation
* keycloak_realm_key: document why check_mode support is partial
* Update plugins/modules/keycloak_realm_key.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/keycloak_realm_key.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* keycloak_realm_key: documentation and metadata fixes
* keycloak_realm_key: small documentation fix
* keycloak_realm_key: change version_added to 7.5.0
* Update plugins/modules/keycloak_realm_key.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9a7a7a9658)
Co-authored-by: Samuli Seppänen <samuli.seppanen@gmail.com>
Add ansible-core 2.16 to the matrix (#7286)
* Add ansible-core 2.16 to the matrix.
* Re-order entries.
(cherry picked from commit b38423c059)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add consul_role module from domant PR (#6972)
* Update as per PR comments
* Move common code to module_utils
* Break up long import line
* Fix pipeline errors
* Inital version of check_mode support
* Fix updating a role, add tests
* Fix line spacing
* Fix line indentation
* Add consul-role tests
* Fixes for role update
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update as per MR comments
* Update as per MR comments
* Fix documentation issues
* Add types for sub-options
* Allow setting of policy, service and node id fields by specifying a value, or leaving them unchanged by omitting them
* Fix typo in test
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Reset and force push to get rid of merge
* Corrected unit tests
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add suboptions documentation for node and service identities
* Fix PEP errors from pipeline
* Fix pipeline errors.
* Fix more pipeline errors
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix line that is too long
* Not specifying a value for description during update now leaves existing value unchanged
* Fixes for pipeline errors
* Add test cases to verify handling description works
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d0f229f5d8)
Co-authored-by: Valerio Poggi <106782233+valeriopoggi@users.noreply.github.com>
ipa_user documentation: givenname and sn are required when user doesn't exist (#7249)
* Edit givenname and sn description.
* Update plugins/modules/ipa_user.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/ipa_user.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4030481b36)
Co-authored-by: Christer Warén <cwchristerw@gmail.com>
Add `ignore_spaces` option to `ini_file` to ignore spacing changes (#7273)
* Add `ignore_spaces` option to `ini_file` to ignore spacing changes
Add a new `ignore_spaces` option to the `ini_file` module which, if
true, prevents the module from changing a line in a file if the only
thing that would change by doing so is whitespace before or after the
`=`.
Also add test cases for this new functionality. There were previously
no tests for `ini_file` at all, and this doesn't attempt to fix that,
but it does add tests to ensure that the new behavior implemented here
as well as the old behavior in the affected code are correct.
Fixes#7202.
* Add changelog fragment
* pep8 / pylint
* remove unused import
* fix typo in comment in integration test file
* Add symlink tests to main.yml
It appears that #6546 added symlink tests but neglected to add them to
main.yml so they weren't being executed.
* ini_file symlink tests; create output files in correct location
* Add integration tests for ini_file ignore_spaces
* PR feedback
(cherry picked from commit 8a9b98273d)
Co-authored-by: Jonathan Kamens <jik@kamens.us>
add russoz as maintainer of modules/snap and module_utils/snap (#7274)
(cherry picked from commit be9dcd2c85)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
refactor test helper context class (#7266)
(cherry picked from commit e7ff0acdac)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
ldap_search: make sure to also handle binary strings in Python 3 (#7264)
Make sure to also handle binary strings in Python 3.
(cherry picked from commit fc530cd3f5)
Co-authored-by: Felix Fontein <felix@fontein.de>
Use `get(..)` instead of [..] for safe lookup of value (Fixes#7240) (#7241)
A OnePassword field item might not have a value (property) when the user has omitted it (on purpose).
(cherry picked from commit 1beb38ceff)
Co-authored-by: Wouter Klein Heerenbrink <wouter@fluxility.com>
encapsulate test function in the helper class (#7247)
(cherry picked from commit 6e3a56ffce)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Update my maintainer status for 1PW plugin (#7252)
* ignore notifications for scottsb on 1pw plugin; update email
* Also update maintainers list.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7d97b37b21)
Co-authored-by: Scott Buchanan <scottiesb@gmail.com>