Commit graph

6 commits

Author SHA1 Message Date
corubba
429d8c8cfb 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.
2023-10-08 18:42:27 +02:00
corubba
a849fe6991 Update liblxc error message
The error is not specific to python2, so remove the version. Also add
a test for it.
2023-10-08 18:42:23 +02:00
corubba
b24c63b55f 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.
2023-10-08 18:42:08 +02:00
Felix Fontein
9f87989e7f
Remove unnecessary test imports (#5978)
Remove unnecessary test imports.
2023-02-12 21:05:08 +01:00
Felix Fontein
2a9fd7359f
Add more license statements (#5079)
* Add more license statements. These were modified manually incorporating existing data.

* Remove accidentally added line.
2022-08-07 13:37:23 +02:00
Ansible Core Team
aebc1b03fd Initial commit 2020-03-09 09:11:07 +00:00