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

884 commits

Author SHA1 Message Date
Alexei Znamensky
6c7e9116e1
gconftool2: refactored to use ModuleHelper + CmdRunner (#5545)
* gconftool2: refactored to use ModuleHelper + CmdRunner

* add changelog fragment

* removed old code commented out
2022-11-15 21:02:45 +01:00
Tong He
7610501c66
Fix a logical flaw when deleting a build in the jenkins_build module (#5514)
* Fix the logical flaw when deleting a build in the jenkins_build module.

* Fix the logical flaw when deleting a Jenkins build in the jenkins_build module.

* Adding changelogs.

* Update tests/unit/plugins/modules/test_jenkins_build.py

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

* Attempt to mock the exception classes.

* Remedy the CI issues when mocking the exception classes.

* Assuming a way to mock the get_build_status function.

* Near to the feasible approach.

* Calls the correct class when unit testing.

* Fix sending wrong arguments when unit testing.

* Directly assign the argument value in the unit testing.

* Fix errors calling different classes.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-10 21:18:01 +01:00
Sam Doran
eae33c20f6
Actually sort the fixtures (#5510)
* Actually sort the fixtures

I removed my more complicated fix but failed to actually put the sorted() call
back in.

* Sort by class name
2022-11-09 07:28:14 +01:00
Guillaume MARTINEZ
4fed0e13db
[Scaleway] Add module to manage containers (#5496)
Signed-off-by: Lunik <lunik@tiwabbit.fr>

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2022-11-07 21:04:55 +01:00
Alexei Znamensky
b696aa72b2
cpanm: using CmdRunner (#5485)
* cpanm: using CmdRunner

* add changelog fragment
2022-11-07 20:15:00 +01:00
Alexei Znamensky
8fb2228125
snap: fix regex to support option values with whitespaces (#5475)
* snap: fix regex to support option values with whitespaces

* add changelog fragment
2022-11-06 11:41:11 +01:00
Alexei Znamensky
fc817601bc
django_manage: add extra tests (#5476) 2022-11-06 11:38:38 +01:00
Sam Doran
be0b5e5f8c
onepassword - Support v2 (#4728)
* Begin building out separate classes to support  different op cli versions

Create separet base classes for each major version.
Define the main interface in the base class.
Create methods for getting the current version and instantiating the
appropriate class based on the found version.

* First pass at mostly working CLI version classes

* Correct mismathched parameters

* Update _run() method to allow updating enviroment

This allows passing in the app secret as an env var, which is more
secure than using a command line arg.

* Continuing to improve the interface

* Tear existing tests down to the studs

These tests were based off of the LastPass unit tests. I’m going to
just start from scratch given the new plugin code is vastly diffenent.

* Fix sanity test

* CLI config file path can be None

* Improve required param checking

- only report missing params
- use proper grammer based on number of missing params

* Change assert_logged_in() method return value

Return a boolean value indicating whether or not account is signed in

* Improve full login for v2

Have to do a bit of a dance to avoid hitting the interactive prompt
if there are no accounts configured.

* Remove unused methods

* Add some tests

* Fix linting errors

* Move fixtures to separate file

* Restructure mock test data and add more tests

* Add boilerplate

* Add test scenario for op v2 and increase coverage

* Fix up copyright statements

* Test v1 and v2 in all cases

* Use a more descriptive variable name

* Use docstrings rather than pass in abstract class

This adds coverage to abstract methods with the least amount of hackery.

* Increase test coverage for CLI classes

* Sort test parameters to avoid collection errors

* Update version tested in docs

* Revere test parameter sorting for now

The parameters need to be sorted to avoid the issue in older Python
versions in CI, but I’m having trouble working out how to do that
currently.

* Allow passing kwargs to the lookup module under test

* Favor label over id for v2 when looking for values

Add tests

* Display a warning for section on op v2 or greater

There is no “value” in section fields. If we wanted to support sections
in v2, we would also have to allow specifying the field name in
order to override “value”.

* Move test cases to their own file

Getting a bit unwieldy having it in the test file

* Move output into JSON files fore easier reuse

* Switch to using get_options()

* Add licenses for fixture files

* Use get_option() since get_options() was added in Ansible Core 2.12

* Rearrange fixtures

* Add changelog

* Move common classes to module_utils

* Move common classes back to lookup

The plugin relies on AnsibleLookupError() quite a bit which is not available
in module code.

Remove use of display for errors since section isn’t actually deprecated.

* Properly handle sections

Still room for improvement, but this is at least a start.

* Remove some comments that won’t be addressed

* Make test gathering more deterministic to avoid failures

* Update changelog fragment

* Simple fix for making tests reliable
2022-11-06 11:32:35 +01:00
Guillaume MARTINEZ
1e17ec13b8
[Scaleway] Add module to manage container namespaces (#5416)
* [Scaleway] Add module to manage container namespaces

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* Fix CI

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix botmeta

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix typo in loop var name

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* Add missing required lib check

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix integration tests assertions

Signed-off-by: Lunik <lunik@tiwabbit.fr>

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2022-11-05 20:44:33 +00:00
Guillaume MARTINEZ
db7e5f12f5
[Scaleway] Add module to manage functions (#5463)
* [Scaleway] Add module to manage function

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix integration tests assertions

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* Update plugins/modules/scaleway_function.py

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

Signed-off-by: Lunik <lunik@tiwabbit.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-05 20:43:47 +00:00
Alexei Znamensky
8dc82b1890
sorted content of sanity/ignore-*.txt files (#5473) 2022-11-05 11:35:39 +01:00
Guillaume MARTINEZ
c181f2dd08
[Scaleway] Fix function namespace integration tests assertions (#5464)
Signed-off-by: Lunik <lunik@tiwabbit.fr>

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2022-11-03 06:45:37 +01:00
Felix Fontein
b531ecdc9b
Unflatmap community.general (#5461)
* Move files.

* Update imports and references.

* Move wrongly placed files.

* Reverse redirects, deprecate long → short name redirects.

* Simplify contribution guidelines for new modules.

* Rewrite BOTMETA.

* Add changelog fragment.

* Fix ignore.txt files.
2022-11-02 20:42:29 +00:00
Felix Fontein
faf4ec7fa6
passwordstore lookup: allow to pass options as lookup options (#5444)
* Allow to pass options as lookup options.

* Adjust tests.
2022-11-02 20:17:08 +01:00
Guillaume MARTINEZ
5fe0f57033
[Scaleway] Add module to manage function namespaces (#5415)
* [Scaleway] Add module to manage function namespaces

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* rename short_descriptions

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* handle changed verification on hashed secret values

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix syntax for python 2.6

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix missing argon2 in unittest

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix missing value on description field

Signed-off-by: Lunik <lunik@tiwabbit.fr>

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2022-11-02 20:11:04 +01:00
Felix Fontein
e718bd8445
Lookups: use Ansible's config manager whenever possible (#5440)
* Start using Ansible's config manager to handle options.

* Docs improvements.

* Fix documentation, make options actual lookup options.

* The cyberarkpassword lookup does too strange things.

* The onepassword lookups are converted in #4728, let's not interfere.

* Improve docs.

* Skip shelvefile as well.

* Convert lmdb_kv.

* Convert and fix credstash.

* Convert manifold.

* Drop chef_databag.

* Convert dig.

* Update examples.

* Forgot the most important part.

* Fix lmdb_kv docs.

* Python 2.6 compatibility.

* Convert AnsibleUnicode to str.

* Load lookup with lookup loader.

* Fix environment handling and error message checking.

* Improve docs formatting.
2022-11-01 21:58:46 +01:00
Alex Groshev
dc66aefa40
fix int options idempotence bug and add new test to check it (#5443) 2022-11-01 21:40:17 +01:00
Felix Fontein
5f4e593116 Revert "Fix non-matching defaults in docs (#5446)"
This reverts commit a978bff2c7.
2022-11-01 19:12:21 +01:00
Felix Fontein
a978bff2c7
Fix non-matching defaults in docs (#5446)
* Allow to pass options as lookup options.

* Adjust tests.

* Fix non-matching defaults.
2022-11-01 18:11:02 +01:00
Brian Coca
20b84fc709
linnode inventory, remove redundant (#5438)
* remove redundant

templar is already in base class
env var is already consulted in via config resolution

* more whites

* no need to import templar again

* Add changelog fragment.

* Try to update tests.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-01 07:33:43 +01:00
Felix Fontein
a1f75efee2
Fix iso_customize tests. (#5447) 2022-10-31 21:15:03 +01:00
Felix Fontein
fa924aae31
Prepare un-flatmapping (#5350)
* Add module name into fixtures directory name.

* Rename conftest.py to avoid collisions.

* Match filenames inside directories.
2022-10-26 07:32:00 +02:00
Felix Fontein
2830a3452d
Remove deprecated features, bump version to 6.0.0 (#5326)
* Bump version to 6.0.0.

* sender option is now required.

* Default of want_proxmox_nodes_ansible_host changed from true to false.

* username is now an alias of user, and no longer of workspace.

* Remove deprecated return values in favor of end_state.

* Remove debug option.

* Change default of ignore_volatile_options from true to false.

* gitlab_group must now always contain the full path.

* Change default of norc from false to ture.

* Remove deprecated property.

* Add PR URL.

* Adjust bitbucket unit tests.

* Adjust module_helper integration test.
2022-10-25 08:07:21 +02:00
Guillaume MARTINEZ
2680739153
[Scaleway] Add module to manage container registries (#5399)
* [Scaleway] Add module to manage container registries

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* first review

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* lint documentation on return value

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* second review

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* second review *bis

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* second review *ter

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* Fix typo.

Signed-off-by: Lunik <lunik@tiwabbit.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-23 17:18:06 +02:00
Alexei Znamensky
baa8bd52ab
pkgng: fix error-handling when upgrading all (#5369)
* pkgng: fix error-handling when upgrading all

* provide for rc=1 in check_mode + test

* fix name of task in test

* add changelog fragment
2022-10-23 11:42:53 +02:00
ThomasGebert
b54483b52e
nmcli: add transport_mode configuration for Infiniband devices (#5361)
* Adds transport_mode configuration for Infiniband devices

Adds transport_mode configuration for Infiniband based ipoib devices,
which is one of:
  - datagram (default)
  - connected

* Remove trailing whitespace

* Add changelog fragment

* Update changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Remove default for transport_mode

* Add test for changing Infiniband transport_mode

* remove blank line at end of file

Co-authored-by: Thomas Gebert <thomas.gebert@atos.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-23 11:30:48 +02:00
Felix Fontein
5aa1e58749
Do not crash when lzma is not around. (#5393) 2022-10-20 20:32:18 +02:00
Alexei Znamensky
6f88426cf1
lxc_container: minor refactor (#5358)
* lxc_container: minor refactor

* add changelog fragment
2022-10-14 22:28:20 +02:00
Felix Fontein
e47845ab3a
Change CI group identifiers. (#5344) 2022-10-11 07:34:36 +02:00
Yuhua Zou
d76392ed2a
New module: iso_customize (#5190)
* add ansible module iso_customize.py

* rerun CI testing due to "Failed to send request to https://api.github.com/repos/ansible/ansible/issues/23642: HTTP Error 403: rate limit exceeded"

* Rerun CI testing due to "Failed to send request to https://api.github....."

* rerun CI testing due to failure "Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/v2/collections/netbox/netbox/versions/3.1.0/': The read operation timed out"

* change document part as  felixfontein's careful review

* modify test file as russoz's comments

* modify comment part of module

* add comment for the example

* add more tests: check the files are deleted / added in customized ISO

* fix it: failed to run ansible.posix.mount in ubuntu

* fix it:  ansible.posix.mount is not working well in some OS.

* change DOCUMENTATION part

* change files according to the comment from code review

* fix issue: E231: missing whitespace after ':'

* modify the description of Document

* modify code for code review

* delete extra blank line in yml file

* Try to fix CI testing issue: "Caught \"'foo' is undefined. 'foo' is undefined\" while evaluating 'b' with item == {'a': 1}"

* delete extra blank line in the end of file

* change code as the comment from code review

* change code from code review

* change type: str to type: path

* change type:str to type:path

* delete unused variable

* fix CI testing error: return-syntax-error: RETURN.dest_iso.type: not a valid value for dictionary value @ data['dest_iso']['type']. Got 'path'

* add testcase: test add files / delete files separately

* add more testcases: test if we can catch exception from error input of users

* change code from code review

* fix issue: E231: missing whitespace after ','

* change code from code review

* add notes to document

* modify notes in document part

* /rebuild_failed

/rebuild_failed

* Try to support running testcases not only in MAC but also in other OS.

* modify document

* change mount to ansible.posix.mount

* skip the test platform which report "Error mounting"

* fix mount failed: Operation not permitted

* change code from code review

* change document from code review

* fix CI testing issue in some platforms

* Update plugins/modules/files/iso_customize.py

* change code from code review

1) change testcase
2) try to fix "mount: not permitted"

* modify aliases file

* change document and rerun CI testing

* add skip/docker as suggested

* add debug task

* fix issue in redhat 7.9: occurred while running the lookup plugin 'file'. ..could not locate file in lookup..

* change code from the code review

* modify function "iso_rr_check_file_exist" to "iso_check_file_exists" to make it works in all types of ISO

1. modify function "iso_rr_check_file_exist" to "iso_check_file_exists" to make it works in all types of ISO

2. run main.yml  with newer python 3.10.6
ansible [core 2.13.4]
  config file = None
  configured module search path = ['/Users/zouy/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/6.4.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/zouy/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.6 (main, Aug 30 2022, 05:12:36) [Clang 13.1.6 (clang-1316.0.21.2.5)]
  jinja version = 3.1.2
  libyaml = True

* delete blank

* simply the code as suggested.

* Two small docs updates.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-10 22:41:04 +02:00
Victor Martinez
8c04133284
opentelemetry: send logs (#4175)
* opentelemetry: logs property

* opentelemetry: support for span events with the Task dump output

* opentelemetry: support property to disable the logs

* bump the version when supported

* add section ini

* test: fix change of signature

* [opentelemetry][callback] changelog fragment

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-10 20:54:52 +02:00
manschwetusCS
dc2d3c24fa
Make pfexec become usable for illumos (#3889)
* Experimental change from OpenIndiana

* resolve pfexec problem, by removing superfluous quotes

* reimplement "wrap_exe"

* remove spaces arround keyword argument assignment

* adapted pfexec unit test

* Try to fix quoting of test expression

* Fix quoting of test expression by replacing ' with "

* Add changelog fragment
2022-10-05 08:26:40 +02:00
Kosala Atapattu
beef93f687
Allow terraform module to specify complex variable structures (#4797)
* Adding capability to specify complex variables type to terraform

* Terrform variable types are mapped to ansible veriable types

* Currently handles Dict, List, Str, Int, Bool types

* Updated the documentation accordingly

* Updated with an example.

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

Wonder how that missed the PEP8 checks :).

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Adding the changelog fragment

* Update plugins/modules/cloud/misc/terraform.py

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

* Adding ``integer_types`` from ``module_utils``

Simplified the ``integer_types``,  ``str`` and ``float`` value population through ``json.dumps()``.  Now the strings can have special characters which can break the module execution.

* Update changelogs/fragments/4797-terraform-complex-variables.yml

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

* * Changed to approach to make the code more readble and simple to understand.

    * Maintaining the original for loop for the top_level variables. Therefore the rocess_conplex_args() now only handle second level variables when the type() is either Dict or List.

    * Json dumps are used only for the low level variables. Terraform CLI had issues interpreting escape sequecences from json.dumps()

* Update plugins/modules/cloud/misc/terraform.py

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

* adding boolean explicitly, although boolean is a subclass of integer, adding this for self documentation pupose and the clarity of the code.

* fixing the doc strings

* Update terraform.py

Fixing docstrings

* * Introducing format_args funtion to simplify formatting each argument type for top_level and lower level.

* Terraform Lists of strings, numbers, objects and lists are supported.

* Adding COMMAND: to the fail_json msg, for plan failures to help troubleshoot command line arguments.

* Update plugins/modules/cloud/misc/terraform.py

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

* * Adding full terraform command to fail_json() when the terrafor plan fails
    * Fixing a spelling mistake.

* plan_command if a list, stringifying the list

* * Fixing the new line for the change fragments

* Removed CR (\r) from the output messages. Now output lines carry only LF (\n), not CRLF (\r\n).

* Added integration testing for complex variables.

* Restructured integration testing code to be more expandable.

* Update changelogs/fragments/4797-terraform-complex-variables.yml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update plugins/modules/cloud/misc/terraform.py

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* double-quotes are not properly escaped in shell, and python string
escaping are nullified the way terraform handle second tier string
variables (within terraform).

* changing all the task actions to FQCN format.

* integration testing now includes:

1. Top level strings containing, special shell characters, spaces,
   double-quotes.

2. Second level strings containing, special shell characters, spaces,
   double-quotes repeating double-quotes to ensure proper regex
substitution.

* Adding colon ':' to string test casses.

* Added complex_vars to switch between the old and the new variable
interpretations.
Updated the documentations to reflect the changes.
Updated the examples.
Handling '\' as well with the escape sequence.

* Added tests for the new escape sequences.
Added multilines tests.

* Restructuring the documente strings to a shorter string.
Argument_spec changed to 'bool'

* Update changelogs/fragments/4797-terraform-complex-variables.yml

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-10-03 22:10:16 +02:00
bratwurzt
2cac3ae879
New Module: Keycloak User Rolemapping (#4898)
* keycloak_user_rolemapping: implement user role mapping

* keycloak_user_rolemapping: additional logging

* keycloak_user_rolemapping: move to getters, use names parameters

* keycloak_user_rolemapping: add service account user example

* Add keyring and keyring_info modules (#4764)

* keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1

* keycloak_user_rolemapping: address felixfontein concerns no.1

* keycloak_user_rolemapping: remove rebase mistakes

* keycloak_user_rolemapping: address felixfontein concerns no.2

* keycloak_user_rolemapping: refactor duplicate username usage example

* keycloak_user_rolemapping: fix sanity check errors no.1

* keycloak_user_rolemapping: fix sanity check errors no.2

* keycloak_user_rolemapping: fix sanity check errors no.3

* keycloak_user_rolemapping: fix sanity check errors no.4

* keycloak_user_rolemapping: write tests, address ansibullbot concerns no.1

* keycloak_user_rolemapping: resolve rebase conflicts with origin/main branch

# Conflicts:
#	plugins/module_utils/identity/keycloak/keycloak.py

* keycloak_user_rolemapping: remove keycloak_role_composites from BOTMETA.yml

* keycloak_user_rolemapping: fix sanity check errors no.5

* keycloak_user_rolemapping: address felixfontein reviews concerns no.1

* keycloak_user_rolemapping: address felixfontein reviews concerns no.2

Co-authored-by: Dušan Markovič <dusan.markovic@better.care>
Co-authored-by: ahussey-redhat <93101976+ahussey-redhat@users.noreply.github.com>
2022-10-01 18:16:47 +02:00
Alexei Znamensky
f0ee21b8b2
ini_file: fix lint error (#5307)
* ini_file: fix lint error

* add changelog fragment

* remove line from sanity test ignore files
2022-09-25 16:28:06 +02:00
Felix Fontein
a938c9de65
Add stable-2.14 to CI, adjust to devel version bump (#5298)
* Add stable-2.14 to CI, adjust to devel version bump.

* Thin out matrix a bit.
2022-09-21 07:58:52 +02:00
castorsky
7777b48c99
New module: Proxmox disk management (#5101)
* New module: Proxmox disk management

* Remove misplaced option

* Type missed

* Fixed docs, quotes, 2.7 syntax

* Forgotten comma

* Version added 5.5.0

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Italic options

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Missed dot

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Pythonify python

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Shorten command

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Action parameter drop. General improvements.

* Add proxmox_disk integration testing

* Shorten getting vmid

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Code tag for value

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Italic tag for option

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Definite ID of the VM

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Docs edit and loop condition

* Simplify conditions

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Dropped bps options, added idempotency checks

* Documentaion edit

* Rewrite create/import condition

* Trainling comma

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Added type field to all choosable arguments

* Description of disk bus ranges

* Fix imports

* Update version

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

* Lowercase YAML boolean

* Rename grown to resized and update documentation

* Documentation updated before actual changes

* Added 'update' flag for 'present' state

* Traling space

* YAML indentation

* Merged 'updated' option into 'present'.

* Doc update.

* Exclude 'import_from' on update

* Version bump

* yaml boolean lowercase

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

* yaml boolean lowercase

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

* More detailed description

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-18 22:06:21 +02:00
Felix Fontein
b371bd6a5b
Fix pkgng tests (#5266)
* Now there are problems with 13.0 as well. But maybe 13.1 works again?

* 13.1 still does not work, maybe 13.2 will (not yet available in CI)...
2022-09-10 11:29:19 +02:00
Felix Fontein
dde0b55f1a
Restrict Python packages for nomad tests. (#5262) 2022-09-10 11:08:13 +02:00
Chih-Hsuan Yen
946c48d148
nmcli: honor IP options for VPNs (#5228)
* nmcli: honor IP options for VPNs

This can be used for split tunneling - I extended a test as an example.

* Add changelog
2022-09-08 07:44:54 +02:00
Mike Moerk
2a449eb163
WDC Redfish support for setting the power mode. (#5145)
* WDC Redfish support for setting the power mode.

* Apply suggestions from code review

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

* Add change fragment.

* Add extension to changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-03 12:45:03 +02:00
Chih-Hsuan Yen
6ff594b524
nmcli: avoid changed status for most cases with VPN connections (#5126)
* nmcli: avoid changed status for most cases with VPN connections

Follow-up https://github.com/ansible-collections/community.general/pull/4746

* `nmcli connection show` includes vpn.service-type but not vpn-type.
  Switching to vpn.service-type removes unneeded diffs while keeping
  the same functionality, as vpn-type is an alias of vpn.service-type
  per nm-settings-nmcli(1).

  NetworkManager also adds `org.freedesktop.NetworkManager.` prefix for
  known VPN types [1]. The logic is non-trivial so I didn't implement it
  in this commit. If a user specifies `service-type: l2tp`, changed will
  be always be True:

    -    "vpn.service-type": "org.freedesktop.NetworkManager.l2tp"
    +    "vpn.service-type": "l2tp"

* The vpn.data field from `nmcli connection show` is sorted by keys and
  there are spaces around equal signs. I added codes for parsing such
  data.

Tests are also updated to match outputs of nmcli commands.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.38.4/src/libnm-core-impl/nm-vpn-plugin-info.c#L619

* Add changelog

* Some suggested changes

* Make space stripping more flexible - works for cases without equal
  signs.
* Keep vpn.data in a test case with no spaces

* nmcli: allow any string for vpn service-type
2022-09-03 12:02:03 +02:00
Alexei Znamensky
7ffe6539c0
New module: pipx_info (#5196)
* pipx_info: new module

* pipx_info: add integration tests

* ensure apps are uninstalled after tests

* Update plugins/modules/packaging/language/pipx_info.py

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

* rework module output, add docs

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-03 12:00:04 +02:00
Felix Fontein
fa49051912
Catch more broader error messages. (#5212) 2022-09-03 11:25:41 +02:00
Felix Fontein
8e59e52525
[TEMP] Fix RHEL 8 issues by restricting bcrypt to < 4.0.0 (#5183) 2022-08-25 07:30:28 +02:00
Felix Fontein
8027bc5335
filesystem: create temp directory outside /tmp to avoid problems with tmpfs. (#5182) 2022-08-25 06:43:07 +02:00
Julien Riou
8e9ec610c3
feat: Add crc32 filter (#5062)
* feat: Add crc32 filter

Compute CRC32 checksum of a string and return its hex representation. Can be
use to create short checksums.

Signed-off-by: Julien Riou <julien@riou.xyz>

* Update license lines

* Improve string check of a crc32 value

Signed-off-by: Julien Riou <julien@riou.xyz>

Signed-off-by: Julien Riou <julien@riou.xyz>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-21 12:10:31 +02:00
Felix Fontein
02d9a1de9e
Make reuse conformant (#5138)
* Add .license files.

* Add reuse test.

* Update README.

* Also remove .yaml changelog fragments.

* Add changelog fragment.

* Normalize licenses extra sanity test.

* Declare REUSE conformance.

* Update README.md
2022-08-21 08:27:01 +02:00
Michal Hybner
3c2d7eb193
dig: Fix evaluation of boolean parameters (#5129)
* Add lookup_dig tests

* Fix boolean evaluation

* Add changelog fragment

* Apply review changes

* Add license
2022-08-20 14:31:15 +02:00
Felix Fontein
98ea27847f
Increase xfs size to 300 MB. This seems to be new minimal size. (#5133) 2022-08-20 13:42:45 +02:00