1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

11 commits

Author SHA1 Message Date
Felix Fontein
011b2f8bdc
Start using semantic markup (#6627)
* Start using semantic markup.

* Forgot some places.

* Fix typo.

* Use 'ignore:' prefix until https://github.com/ansible-community/antsibull-docs/pull/155 is out.

* Break too long line.
2023-06-10 09:28:40 +02:00
Felix Fontein
2b8ac3c629
Remove unneccessary imports (#5940)
* Remove unneccessary imports.

* Keep unnecessary imports in module_utils - for now.

* Make older sanity tests shut up.

* Also make flake8 happier.
2023-02-12 19:48:39 +01:00
HAH! Sun
669d0925f7
Feature: Provide project field for LXD inventory plugin (#5658)
* Provide project field for LXD inventory plugin

if field `project` exists in `lxd.yml`, the instances are searched in the
given LXD project. if project field is not defined the default project
named `default` will be used.

Signed-off-by: omani <3346207+omani@users.noreply.github.com>

* Update plugins/inventory/lxd.py

Signed-off-by: omani <3346207+omani@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-23 08:00:17 +01:00
Felix Fontein
123c7efe5e
Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065)
* Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt.

* Replace 'Copyright:' with 'Copyright'

sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:')

Co-authored-by: Maxwell G <gotmax@e.email>
2022-08-05 12:28:29 +02:00
Abhijeet Kasurde
bf94f08bc4
Misc. typo fixes (#4940)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-07-08 23:11:57 +02:00
monkz
421ccd5dc9
plugins/inventory/lxd.py: fix listing of containers without os / release (#4351)
* plugins/inventory/lxd.py: fix listing of containers without os / release

In some cases, a container might be present, that was initialized empty, therefore lacking meta information about the os or the release.
Test if the data entry is None to avoid calling lower on it.

* Update plugins/inventory/lxd.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/inventory/lxd.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Create 4351-inventory-lxd-handling_metadata_wo_os_and_release.yml

* fix yaml readability of changelog fragment

* Update changelogs/fragments/4351-inventory-lxd-handling_metadata_wo_os_and_release.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Malte Kuhn <mkuhn@maxcluster.de>
2022-03-16 13:52:22 +01:00
Élie
8825ef4711
LXD inventory: Support virtual machines (#3519)
* LXD 4.x compatibility (Containers and VMs)

* add changelog fragment

* update fixture

* update plugin options

* backwards compatible alias

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/3519-inventory-support-lxd-4.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* add lxd 4.0 requirement

* filter for type of virtualization added. due to duplication in the namespace, "type" is not used as the keyword but "nature".

* add type filter

Since the first version of this inventory plugin only supports containers,
a filter function was added to filter between containers and
virtual machines or both.
By default only containers are displayed, as in the first version of the plugin.
This behavior will change in the future.

* rename C(nature) to C(type)

The term "nature" does not fit into the lxd namespace.
Therefore i renamed nature to type.

* update changelog fragment

* Update plugins/inventory/lxd.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* rename typefilter to type_filter

* fix tests with type_filter

* Update plugins/inventory/lxd.py

* Update plugins/inventory/lxd.py

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
2021-12-13 22:01:52 +01:00
Felix Fontein
fafabed9e6
Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877)
* Replace ansible.module_utils._text by ansible.module_utils.common.text.converters.

* Also adjust tests.
2021-06-26 23:59:11 +02:00
Felix Fontein
9906b9dbc7
Remove vendored ipaddress module. (#2441) 2021-05-05 12:31:01 +02:00
Felix Fontein
6a72c3b338
Make plugins pass validation. (#2414) 2021-05-03 13:22:11 +02:00
Frank Dornheim
2cc3ce0230
lxd: dynamic inventory (#2026)
* lxd dynamic inventory and test data

* added ``merge_profile`` parameter to merge configurations from the play to an existing profile

* cosmetic changes

* added ``merge_profile`` parameter to merge configurations from the play to an existing profile

* cosmetic changes

* fix pylint errors

* fix flake8 warnings

* fix pep8 errors without "line to long"

* fix ansible tests

* fix typo

* fix version added

* fix lost of suggestions from felixfontein

* fix filter
fix ansible test errors

* delete test config

* delete 'notes:' and copy content to description

* move testdata
load testdata by path from config

* updated documentation

* fix test data and remove inventory branch

* fix spellings and rename lxd to community.general.lxd

* fix documentation

* remove selftest

* strip example data

* add unit test

* switch to ansible.module_utils.common.dict_transformations

* documentation cleanup

* move lxd_inventory.atd from files to fixtures

* update documentation
move lxd_inventory.atd

* rename self.groups to self dispose
remove dumpdata

* cleanup

* fix unittests
comment out dump_data, it breaks the unit tests

* fix pep8

* Apply suggestions from code review

* Update plugins/inventory/lxd.py

* add test if no groupby is selected

* rename disposed to groupby
remove unused constant
other suggested cleanups

* Use bundled ipaddress instead of own code.

* Update plugins/inventory/lxd.py

* Exceptions should not be eaten.

* Improve error handling for network range/address parsing.

* Fix typo.

* Make network range valid.

* Do not error when groupby is not a dict.

Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-26 18:25:45 +02:00