1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
patchback[bot] d4e831f31d
[PR #7369/1bf5a44a backport][stable-7] Fix lxc plugin options (#7371)
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>
2023-10-09 09:21:31 +02:00
..
action [PR #7102/55cfd27b backport][stable-7] freebsd: shutdown -p ... on freebsd to power off machine (#7112) 2023-08-14 21:19:16 +02:00
become [PR #6935/24feb1dd backport][stable-7] machinectl become plugin: mark as require_tty (#6942) 2023-07-15 16:27:26 +02:00
cache [PR #6627/011b2f8b backport][stable-7] Start using semantic markup (#6664) 2023-06-10 10:53:50 +02:00
callback [PR #7179/631d215f backport][stable-7] Add unixy support for check_mode_markers (#7201) 2023-09-03 18:17:29 +02:00
connection [PR #7369/1bf5a44a backport][stable-7] Fix lxc plugin options (#7371) 2023-10-09 09:21:31 +02:00
doc_fragments [PR #6839/e5dc6978 backport][stable-7] proxmox module utils: better error msg when token fails with old proxmoxer (#6846) 2023-07-03 22:57:39 +02:00
filter [PR #7296/756e8f5c backport][stable-7] Update from_csv.py docs (#7300) 2023-09-20 22:44:15 +02:00
inventory [PR #7332/160e00e5 backport][stable-7] LXD moved to Canonical (#7350) 2023-10-04 20:20:46 +02:00
lookup [PR #7343/cda6fc95 backport][stable-7] Add TCP option for dig plugin. (#7349) 2023-10-04 19:37:33 +02:00
module_utils [PR #6813/55893f27 backport][stable-7] Adding CreateVolume functionality (#7359) 2023-10-06 23:24:53 +02:00
modules [PR #7355/85e866cc backport][stable-7] newrelic_deployment: add app_name_exact_match parameter (#7367) 2023-10-08 18:37:19 +02:00
test Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00