Use isinstance() instead of type() (#7501)
* Replace type comparisons with isinstance() checks.
* Add changelog.
(cherry picked from commit 48e860be20)
Co-authored-by: Felix Fontein <felix@fontein.de>
fix vm removal in proxmox_pool_member.py (#7464)
* fix vm removal in proxmox_pool_member.py
in the original the vm doesn't get removed, always errors with "'Failed to delete a member (12345) from the pool TestPool: list.remove(x): x not in list'
* add changelog fragment
* fix linting errors in changelog
(cherry picked from commit 0304989392)
Co-authored-by: aungvari <12872375+aungvari@users.noreply.github.com>
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>
Fix the ability to run Composer "working_dir" dependent commands (#7405)
* pass the working_dir to all composer command invocations that are not global
* add changelog fragment
* Update changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f7267c7123)
Co-authored-by: Xavier Lacot <xavier@lacot.org>
Improve docsite extra docs (#7444)
* Improve markup.
* Improve filter and test guides by linking to plugins and using FQCNs more consistently.
* list_merge is an option, not the filter's name.
* Improve filter docs.
(cherry picked from commit 2a7f9f28b9)
Co-authored-by: Felix Fontein <felix@fontein.de>
CI: make sure that Python 2.7 unit tests also run with AZP (#7450)
Make sure that Python 2.7 unit tests also run with AZP.
(cherry picked from commit f5c544d99c)
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>
nmcli: add additional documentation for routing_rules4 option (#7403)
* Add additional documentation for routing_rules4 option.
I had some trouble initially getting this to work as I wasn't very clear on what was required to that end I have added an example task and fixed what I suspect is a typo in the description.
* Update nmcli.py
Remove trailing whitespace.
(cherry picked from commit 09ae963f58)
Co-authored-by: Alistair MacCallum [Vaarst] <81685753+AlistairMaccallum@users.noreply.github.com>
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>
Fix callback/selective task print being long (#7374)
* Fix callback/selective task print being long
Compare against all text on the line rather than simply the task_name var,
which does not include 3 formatting characters in the string
* Add changelog fragment
---------
Co-authored-by: Aidan Houck <AidanHouck@users.noreply.github.com>
(cherry picked from commit 479e7df687)
Co-authored-by: Aidan Houck <92699100+AidanHouck@users.noreply.github.com>
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>
redhat_subscription: fix D-Bus option for consumer type on older distros (#7378)
subscription-manager 1.29.32 renames the "type" D-Bus registration
option to "consumer_type"; this means that the right option must be
passed according to the distro type & version.
Copy the same approach done for environments, tweaking the version
needed: this change is found in RHEL 9.2+ and supported Fedora versions.
Reported-by: Radek Bíba <rbiba@redhat.com>
(cherry picked from commit d7bb8648f3)
Co-authored-by: Pino Toscano <ptoscano@redhat.com>
Make compatible with current ansible-core devel (#7379)
Make compatible with current ansible-core devel.
(cherry picked from commit 557a4ae653)
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>
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>