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

1148 commits

Author SHA1 Message Date
Stéphane Graber
6d74e0c640
Introduce an Incus connection plugin (#7726)
* plugins/connection/incus: Introduce new plugin

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>

* BOTMETA: Add incus connection plugin

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>

* tests/integration: Add connection_incus test

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>

---------

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2023-12-28 08:32:31 +01:00
Steffen Scheib
ec6dfe2fcd
Adding a new filter: from_ini, which allows conversion of INI content to a dictionary (#7743)
* Adding a new filter: from_ini, which allows conversion of INI content to a dictionary

* Adding from_ini maintainers into BOTMETA

* Adding error handling; Removing quotes from examples; Fixing RETURN documentation

* Adding integration tests

* Moving imports below documentation; Adding a more general exception handling
2023-12-28 08:32:21 +01:00
Felix Fontein
0b0a302855
Add documentation stubs for undocumented module options (#7738)
Add documentation stubs for undocumented module options.
2023-12-20 07:32:56 +01:00
mjfinney
6c1eb77f18
Add ssh_config module option for identities_only (#7704)
* Add ssh_config module option for identities_only

* Add changelog fragment for 7704

* remove trailing whitespace

* Apply suggestions from code review

Documentation change suggestions from felixfontein

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

---------

Co-authored-by: Michael Finney <michael.finney@tpwd.texas.gov>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-12-17 15:14:24 +01:00
mjfinney
5e5e1963c3
ssh_config: Add add_keys_to_agent option (#7703)
* Add ssh_config module option for add_keys_to_agent

* Add changelog fragment for 7703

---------

Co-authored-by: Michael Finney <michael.finney@tpwd.texas.gov>
2023-12-17 15:14:07 +01:00
Felix Fontein
838e4e3f02
Add Alicloud, Online, Packet, and Scaleway scenario guides (#7714)
* Add Alicloud, Packet, and Scaleway scenario guides.

These were taken from
3f12228c79/docs/docsite/rst/scenario_guides
and adjusted to reality.

* Fix references.

* Add Online guide.

* Add BOTMETA entries.

* Use FQCN.

* Improve code formatting and indentation.

* Update BOTMETA.
2023-12-11 19:09:57 +01:00
Felix Fontein
0c7b9e50b5
Fix keytool setup on Debian Bookworm (#7709)
Fix keytool setup on Debian Bookworm.
2023-12-09 23:47:48 +01:00
Felix Fontein
aea238e5d1
Fix integration tests on Arch (#7705)
* Fix ejabberd_user integration tests on Arch Linux.

* Fix odbc integration tests on Arch Linux.

* The old name of systemd_service is systemd.
2023-12-09 17:21:05 +01:00
castorsky
68051774d8
[proxmox_vm_info] Add ability to retrieve config (#7485)
* feat: add ability to retrieve config

Light refactor of get_vms_from_nodes function.
Added ability to retrieve configuration for existing machines (current or pending).

* Add changelog fragment

* Add changelog fragment (newline missed)

* Update changelogs/fragments/7485-proxmox_vm_info-config.yml

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

* Apply suggestions from code review

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

* Replaced two bool options with one three-state option

* Module args for the three-state option

* Remove trailing newline

* Make use of dict instead of list. Fix uncalled 'get config for lxc'.

* Sanity tests

* A couple of unit tests fixed

* Unit tests fixed

* Unit tests for p2.7 fixed. Test for config parameter added.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-12-04 05:59:21 +01:00
Laszlo Szomor
a599afa384
lvol: Change `pvs` argument type to list (of str) (#7676)
* lvol: Change ``pvs`` argument type to list (of str)

* Add changelog fragment

* Apply review suggestions
2023-12-04 05:58:55 +01:00
apecnascimento
88d2a3a1fb
Feat nomad token module (#7523)
* Add nomad_token module

* Updatate nomad maintainers list

* Fix Example docstring

* Fix identations and Flake8 rules

* Fix  trailing whitespace

* Fix SyntaxError error

* change stringh format

* Fix Return doc string

* Fix Examples

* Fix flake8  rule W293

* Fix Doc schema

* Fix argument_spec

* Add maintainer

* Fix Example doc

* Remove token_info

* Change Doc

* Change nomad api acl token link

* Remove return whitespace

* Update plugins/modules/nomad_token.py

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

* Update plugins/modules/nomad_token.py

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

* Update plugins/modules/nomad_token.py

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

* Update plugins/modules/nomad_token.py

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

* Update plugins/modules/nomad_token.py

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

* Update plugins/modules/nomad_token.py

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

* Update plugins/modules/nomad_token.py

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

* Fix add changed state to True

* Update plugins/modules/nomad_token.py

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

* Change suport check mode

* Add unity tests

* Remove unused import

* Remove tests unused import

* Change python-nomad versions

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

* Change acl for ACL

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

* Add ACL to all docs

* Change msg to ansible common return value

* Fix flake8 W291

* Update description.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-12-03 13:51:39 +01:00
Günther Grill
07bac1777f
git_config: support multiple values for same name (#7260)
* Refactor the existing git_config.py

* Support multiple values for same name
2023-12-03 09:41:34 +01:00
Ondrej Zvara
f4a87fdbcb
New module: gitlab_issue.py (#7539)
* feat(gitlab_issue): adds module for gitlab issues management

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* fix(gitlab_issue): assignee_ids and labels as lists

* docs(gitlab_issue): fix missing element types

* Apply suggestions from code review

Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>

* chore(gitlab_issue): remove unnecessary parameter checks

* chore(gitlab_issue): renaming milestone_id parameter to milestone_search

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>
2023-12-02 20:55:19 +01:00
Sam Doran
241cc02fa8
onepassword lookup - Make section and field case insensitive (#7564)
* onepassword lookup: Make section and field case insensitive

This was a regression in behavior when adding support for op v2.

* Return a string by default to avoid an exception if a field is missing

* Use a helper function to lower a value if possible

* Update changelog
2023-12-01 17:47:49 +01:00
Felix Fontein
096d36adc5
passwordstore tests: re-enable gopass on Debian-like systems (#7656)
Re-enable gopass on Debian-like systems.
2023-12-01 16:39:51 +00:00
Felix Fontein
0589c84176
Fix and re-enable cmd_runner tests (#7630)
Fix cmd_runner tests.
2023-12-01 12:46:31 +01:00
Pino Toscano
af01b462d5
redhat_subscription: use D-Bus registration on RHEL 7 only on 7.4+ (#7624)
subscription-manager does not provide a D-Bus interface in versions of
RHEL 7 older than 7.4.
2023-11-30 05:58:07 +01:00
Günther Grill
1b9d437be8
New module git config info (#7587)
Add new module git_config_info
2023-11-29 08:37:50 +01:00
Felix Fontein
dbba0d1956
Fix osx_defaults tests (#7631)
Fix osx_defaults tests.
2023-11-29 07:40:32 +01:00
Felix Fontein
3b779ecade
Fix bad expressions in tests (#7625)
* Fix bad expressions in tests.

ci_complete

* Disable cmd_runner integration tests.

ci_complete

* Another bad expression.

ci_complete
2023-11-29 06:53:48 +01:00
Sam Doran
e0346d400f
Add onepassword_doc lookup plugin (#7490)
* Add onepassword_doc lookup plugin

* Switch to a doc fragment

* Add unit test

* Update docs

* Move parameter validation to the OnePass object

This makes it built in for other lookup plugins using this class.

* Use kwargs for OnePass instantiation

There are enough parameters now that using them positionally can result in
odd behavior.

* Update tests

Correct conftest file name so fixtures are discovered and loaded correctly
Move constant so it doesn’t need to be imported
Add a patch since the parameter validation moved to part of the class init

* Use a lookup docs fragment

* Correct plugin description
2023-11-26 20:32:20 +01:00
Felix Fontein
5adb7ab948
interfaces_file: filter by address_familiy when updating method (#7612)
* When updating method, check address_family if provided.

* Also test modifying 'method' without address_family filter.
2023-11-26 19:34:13 +01:00
IamLunchbox
d05932fb2c
Add option to proxmox dynamic inventory to exclude nodes (#7461)
* Create option to exclude proxmox nodes

* improve node exclusion by only remove the top level group

* add fragment

* Update changelogs/fragments/7437-proxmox-inventory-add-exclude-nodes.yaml

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

* Update plugins/inventory/proxmox.py

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

* Rework node exclusion

* Update fragement PR number

* include release version in option

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

* Clarify description

* Update unit test

* Fix typos in unit test

* Fix additonal typos in test

* Fix CI

* Fixing yet another whitespace pep error

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-11-26 17:23:33 +01:00
Boolman
938aec492e
[keycloak_user_federation]: Adding option krbPrincipalAttribute (#7538)
* keycloak_user_federation: Adding support for krbPrincipalAttribute

Signed-off-by: boolman <boolman@gmail.com>

* pr/7538 adding changelogs/fragment file

Signed-off-by: boolman <boolman@gmail.com>

* Update changelogs/fragments/7538-add-krbprincipalattribute-option.yml

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

* Update plugins/modules/keycloak_user_federation.py

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

* Update plugins/modules/keycloak_user_federation.py

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

---------

Signed-off-by: boolman <boolman@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-11-26 17:20:05 +01:00
Felix Fontein
12395732e8
CI: temporarily skip passwordstore tests on Debian/Ubuntu (#7603)
Skip passwordstore tests on Debian/Ubuntu.
2023-11-26 17:19:24 +01:00
Vladimir Botka
2a5e7c33df
Add test fqdn_valid (#7533)
* Add test fqdn_valid

* Add integration test fqdn_valid

* Add changelogs 7533-add-test-fqdn_valid

* Fix changelogs filename 7533-add-test-fqdn_valid.yml

* Add runme.* to install PyPI package fqdn and run the test.

* Remove changelog. New tests are documented by their version_added + short_description.

* Guarded import fqdn.

* Update plugins/test/fqdn_valid.py

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

* Update plugins/test/fqdn_valid.py

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

* Update plugins/test/fqdn_valid.py

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

* Update plugins/test/fqdn_valid.py

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

* Update tests/integration/targets/test_fqdn_valid/aliases

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

* Add tests/fqdn_valid.py maintained by vbotka.

* Fix integration. Add explicit collections to test_fqdn_valid

* Fix integration. Remove unused import ansible.errors

* Fix PEP8 E275

* Fix E402 module level import not at top of file.

* Fix E275 missing whitespace after keyword

* Update plugins/test/fqdn_valid.py

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

* Update plugins/test/fqdn_valid.py

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

* Update plugins/test/fqdn_valid.py

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

* Update plugins/test/fqdn_valid.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-11-22 09:12:00 +01:00
Alex Groshev
5147c49498
Add support for loopback type in nmcli module (#7515)
* add support for loopback devices

* add support for loopback devices

* fix yamllint issue in changelog fragment

* Fix yamlint warning and add note about new connectin type in docs

* change order of lines in documentation so they are sorted
2023-11-22 09:11:40 +01:00
Alexei Znamensky
9b16392648
test helper: Helper.from_module() injects test function into test module (#7560) 2023-11-20 23:23:16 +13:00
Felix Fontein
b8ecb1671b
CI: devel supports Fedora 39, and no longer Fedora 38 (#7541)
* devel supports Fedora 39, and no longer Fedora 38.

* Disable 'mail' tests for Python 3.12+.

Ref: https://github.com/ansible-collections/community.general/issues/4656

* Fix setupSSLServer to work with Python 3.12.
2023-11-18 14:03:16 +01:00
Felix Fontein
b3c661a9f6
sysrc: FreeBSD jail test no longer works with FreeBSD 13.1 (#7543)
Jail test no longer works with FreeBSD 13.1.
2023-11-18 13:51:00 +01:00
Felix Fontein
89f12c87eb
CI: remove skip/python2.6 from aliases (#7534)
Remove skip/python2.6 from aliases.

Since 8.0.0 we no longer support any ansible-core version that supports Python 2.6.
2023-11-16 21:02:40 +01:00
Xeryus Stokkel
f8652571f7
Support 1Password Connect (#5588) (#7116)
* Support 1Password Connect (#5588)

- Support 1Password Connect with the opv2 client

* Follow pep8, be less explicit

* Update changelog to include PR

* 1Password Connect host and token are now also parameters

* Get argument values from the environment or lookup arguments

* Move imports

* Force using Connect token and host at the same time

* Update unit tests

* Update documentation

* Additional tests
2023-11-16 20:57:11 +01:00
Felix Fontein
32fa588f47
CI: Add rhel/9.3 for devel, remove rhel/9.2 (#7524)
* Add rhel/9.3 for devel, remove rhel/9.2.

* Also skip rhel/9.3 when skipping rhel/9.2.

* snapd is also on available on RHEL 9.3.
2023-11-15 22:21:39 +01:00
mark-tomich
d0870a022e
infiniband and bond interfaces can receive MTU settings too (#7499)
* infiniband and bond interfaces can receive MTU settings too

* adding test for default mtu setting

* the mtu parameter for infiniband is different than for ethernet

* adding changelog fragment

* Update changelogs/fragments/7499-allow-mtu-setting-on-bond-and-infiniband-interfaces.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-11-15 22:01:35 +01:00
Marcel
c2f08c57e0
[ssh_config] Add support for ControlMaster (#7456)
* [ssh_config] Add support for ControlMaster

* Create separate function to convert bool

* Allow str values with yes/no options to also use bool
2023-11-11 12:04:06 +01:00
Alexei Znamensky
c2e578cb14
pipx: change parameter formatter for pip_args (#7506)
* change parameter formatter for pip_args

* add changelog frag
2023-11-11 11:59:44 +01:00
Felix Fontein
74e941e432
Disable nomad tests (#7480)
Disable nomad tests.
2023-11-04 13:44:05 +01:00
Felix Fontein
57e36d7dc2
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').
2023-11-04 13:07:49 +01:00
Felix Fontein
8055dd1c9b
Revert "Disable ansible_galaxy_install tests until Galaxy is fixed (#7440)" (#7446)
This reverts commit f7532c7d9d.
2023-10-29 20:43:15 +01:00
Felix Fontein
2b62826082
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>
2023-10-29 18:04:44 +01:00
Felix Fontein
f7532c7d9d
Disable ansible_galaxy_install tests until Galaxy is fixed (#7440)
Disable ansible_galaxy_install tests until Galaxy is fixed.
2023-10-29 09:30:16 +01:00
njutn95
6ee1f27304
Add modify_inactive_option option to ini_file module to ignore matching commented key:value pairs (#7401)
* Add `modify_inactive_option` option to `ini_file` module to ignore matching commented key:value pairs

* Add changelog fragment

* Apply suggestions from code review

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

* Minor comment fix

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-25 08:48:49 +02:00
Alexei Znamensky
3b87f58070
Test helper more (#7421)
* facter: add option to return facts instead of output variables

* Update plugins/modules/facter.py

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

* add output doc

* add changelog frag

* reversed facter.py, created facter_facts.py

* remove chglog fragment for new module

* test helper: add Helper.from_module()

* change case in variable name

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-23 23:04:18 +02:00
Alexei Znamensky
bb59962061
facter_facts: new module (#7356)
* facter: add option to return facts instead of output variables

* Update plugins/modules/facter.py

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

* add output doc

* add changelog frag

* reversed facter.py, created facter_facts.py

* remove chglog fragment for new module

* add BOTMETA entry

* adjust facters code to facters_fact, add unit test

* Update plugins/modules/facter_facts.py

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

* Update plugins/modules/facter_facts.py

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

* Update plugins/modules/facter_facts.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-22 18:11:00 +02:00
Corubba
3ae19aa28f
Handle remote_addr change in lxc connection plugin (#7373)
* Stopped container error test

* Handle remote_addr change

Detect if the remote_addr option changed, and properly "reconnect" aka
update the internal state of the plugin instance.

* Add changelog fragment

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-18 20:54:24 +02:00
Alexei Znamensky
33133f3ba9
kernel_blacklist: bugfix (#7382)
* kernel_blacklist: bugfix

* add fix + changelog frag

* skip aix,freebsd,macos,osx in integration test

* Update changelogs/fragments/7382-kernel-blacklist-bugfix.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-18 20:53:31 +02:00
Felix Fontein
91fdc8e06a
Skip odbc tests on Python 2.6 and CentOS 7 (#7385)
Skip odbc tests on Python 2.6 and CentOS 7.
2023-10-11 09:23:19 +02:00
Felix Fontein
40809ed953
Bump version of main to 8.0.0; remove deprecations, deprecate some leftovers (#7358)
* Remove disable_facts from xfconf module.

* Remove deprecated module_helper CmdMixin and users.

* Deprecate ArgFormat as well, which wasn't explicitly deprecated yet.

* Remove state=get from gconftool2.

* Remove default of access_level in gitlab_runner.

* Remove state=list from manageiq_polices.

* Remove state=list from manageiq_tags.

* Consul: when state=absent, certain options can no longer be specified.

* Remove support for Ansible 2.9 and ansible-base 2.10 from ansible_galaxy_install.

* Bump community.general version to 8.0.0.

* Fix gconftool2 tests.

* Remove mh.mixins.cmd module_utils completely.

* Re-add removed anchor on its first non-removed usage.

* remove references in return doc, refactor method _setup210plus

* remove no longer needed check in function parse_check

* improve expression

* Fix YAML.

* Lint.

---------

Co-authored-by: Alexei Znamensky <russoz@gmail.com>
2023-10-09 13:31:27 +02:00
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
Alexei Znamensky
323a1dcff8
snap: detect change by checking final state (#7340)
* snap: detect change by checking final state

* detect change in snap_status variable

* add changelog frag
2023-10-08 12:03:31 +02:00