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
Corubba 1bf5a44a77
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>
2023-10-09 09:11:11 +02:00
..
action freebsd: shutdown -p ... on freebsd to power off machine (#7102) 2023-08-14 19:41:47 +02:00
become machinectl become plugin: mark as require_tty (#6935) 2023-07-15 12:53:59 +02:00
cache Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
callback Add unixy support for check_mode_markers (#7179) 2023-09-03 17:38:46 +02:00
connection Fix lxc plugin options (#7369) 2023-10-09 09:11:11 +02:00
doc_fragments proxmox module utils: better error msg when token fails with old proxmoxer (#6839) 2023-07-03 22:07:05 +02:00
filter Update from_csv.py docs (#7296) 2023-09-20 22:02:54 +02:00
inventory LXD moved to Canonical (#7332) 2023-10-04 19:48:54 +02:00
lookup Add TCP option for dig plugin. (#7343) 2023-10-04 16:47:37 +00:00
module_utils Adding CreateVolume functionality (#6813) 2023-10-06 23:11:38 +02:00
modules Add option force_delete module gitlab_group (#7364) 2023-10-08 18:25:24 +02:00
test Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00