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

1025 commits

Author SHA1 Message Date
patchback[bot]
28830d8ca5
adding nested try block for tss.py to import new Delinea library (#5151) (#5163)
* adding nested try block to import delinea library

* whitespace

* Update plugins/lookup/tss.py

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

* adding changelog fragment

* Update changelogs/fragments/5151-add-delinea-support-tss-lookup.yml

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

Co-authored-by: Tom Reeb <Thomas.Reeb_e@morganlewis.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9f39294f50)

Co-authored-by: Tom Reeb <tomreeb@users.noreply.github.com>
2022-08-23 22:10:49 +02:00
Felix Fontein
9e319610c3 Release 4.8.6. 2022-08-22 14:04:41 +02:00
Felix Fontein
92db683b08 Prepare 4.8.6 release. 2022-08-21 22:10:53 +02:00
patchback[bot]
465b0c72a6
Fix nsupdate when updating NS record (#5112) (#5131)
* Fix nsupdate when updating NS record

* Changelog fragment

* Update changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml

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

* Switch to fallback to AUTHORITY instead of using with NS type.

* Update plugins/modules/net_tools/nsupdate.py

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

* Update plugins/modules/net_tools/nsupdate.py

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

Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ad8965218d)

Co-authored-by: Jonathan Lung <lungj@users.noreply.github.com>
2022-08-20 13:34:16 +02:00
Felix Fontein
e4eead189b
Fix linting errors; fix some real bugs (#5111) (#5115)
* Fix linting errors.

* Fix bugs.

* Another linter error ignored.

* More fixes.

* Ignore sanity errors with older versions.

ci_complete

* Forgot to commit more changes.

(cherry picked from commit a54af8909c)
2022-08-12 14:37:34 +02:00
Felix Fontein
54bf6ef6de
Add MIT-license.txt (#5072)
(partially cherry picked from commit b5eae69e36)
2022-08-05 12:47:18 +02:00
Felix Fontein
d6c9c0c49a Release 4.8.5. 2022-08-01 09:30:30 +02:00
patchback[bot]
9f1e976b9f
Slack: Add support for (some) groups (#5019) (#5043)
* Slack: Add support for (some) groups

Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.

* Add changelog fragment for slack channel prefix fix

* Update changelogs/fragments/5019-slack-support-more-groups.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3fe9592cf1)

Co-authored-by: Richard Tuin <richardtuin@gmail.com>
2022-07-31 23:52:45 +02:00
Felix Fontein
e309707e22 Prepare 4.8.5 release. 2022-07-31 22:56:31 +02:00
patchback[bot]
22773418d2
Pacman: Fix name of URL packages (#4959) (#4970)
* Strip downloading... of unseen URLs

* Added changelog fragment

* Added integration tests for reason and reason_for

Inspired by the integration tests for url packages

* Revert "Added integration tests for reason and reason_for"

This reverts commit f60d92f0d7.

Accidentally commited to the wrong branch.

(cherry picked from commit 788cfb624a)

Co-authored-by: Minei3oat <Minei3oat@users.noreply.github.com>
2022-07-21 20:16:24 +02:00
patchback[bot]
8854f4d948
proxmox module_utils: fix get_vm int parse handling (#4945) (#4966)
* add int parse handling

* Revert "add int parse handling"

This reverts commit db2aac4254.

* fix: vmid check if state is absent

* add changelogs fragments

* Update changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c57204f9a9)

Co-authored-by: miyuk <enough7531@gmail.com>
2022-07-21 08:14:36 +02:00
patchback[bot]
5bbcfa5644
proxmox inventory: fix for agent enabled (#4910) (#4946)
* Update proxmox.py

* Forgot a debug print.

* pep

* Check if int, old school way.

* pep, once again.

* Create 4910-fix-for-agent-enabled.yml

* Must check the first listentry for enabled=1

* Update changelogs/fragments/4910-fix-for-agent-enabled.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit aa03c71267)

Co-authored-by: ube <ube@alienautopsy.net>
2022-07-12 11:17:44 +02:00
Felix Fontein
1a185608bd Release 4.8.4. 2022-07-12 06:59:54 +02:00
Felix Fontein
69ba89db0d Prepare 4.8.4 release. 2022-07-11 22:07:57 +02:00
patchback[bot]
07798c3169
Fix syntax in rax_clb_nodes that breaks in Python3 (#4933) (#4936)
* Use syntax that works in both Python 2 and 3 when iterating through a
    dict that's going to be mutated during iteration
  * Fixes `dictionary changed size during iteration` error
  * Fixes #4932

(cherry picked from commit 9a928d5ffb)

Co-authored-by: Teddy Caddy <tcaddy@users.noreply.github.com>
2022-07-07 22:37:04 +02:00
patchback[bot]
44009a72d3
fix lxd connection plugin inventory_hostname (#4912) (#4934)
* fixes lxd connection plugin issue #4886

remote_addr value was set to literal string 'inventory_hostname' instead
of the value for inventory_hostname variable. solution found in PR
ansible/ansible#77894

* changelog fragment - bugfix - lxd connection plugin

* correct changelog fragment

* Update changelogs/fragments/4886-fix-lxd-inventory-hostname.yml

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

* replace _host instance variable with calls to get 'remote_addr' option

suggested by felixfontein

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 905f9ec399)

Co-authored-by: antonc42 <antonc42@users.noreply.github.com>
2022-07-07 22:36:55 +02:00
patchback[bot]
0372fdf150
Do not ignore tld option in DSV lookup plugin (#4911) (#4920)
* Do not ignore tld option in DSV lookup plugin

* add changelog fragment

* Update changelogs/fragments/4911-dsv-honor-tld-option.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7ffa2b525c)

Co-authored-by: andrii-zakurenyi <85106843+andrii-zakurenyi@users.noreply.github.com>
2022-07-04 20:59:28 +02:00
patchback[bot]
96c80fe478
Fix GetChassisPower when multiple chassis are present (#4902) (#4914)
* Fix GetChassisPower when multiple chassis are present

When multiple chassis are present, and one or more of those chassis do _not_
report power information, the GetChassisPower command will fail. To address
that, only report a failure if _all_ of the Chassis objects lack power
power reporting functionality.

Fixes #4901

* Update changelogs/fragments/4901-fix-redfish-chassispower.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f60d12cf2d)

Co-authored-by: Jacob Yundt <jyundt@gmail.com>
2022-06-30 21:01:40 +02:00
patchback[bot]
29145b15de
Fix command variable usage in CmdRunner (#4903) (#4905)
* Fix command variable usage

* Add changelog fragment for cmd-runner bugfix (#4903)

(cherry picked from commit 265c052c27)

Co-authored-by: Álvaro García Jaén <garciajaenalvaro@gmail.com>
2022-06-30 07:18:38 +02:00
Felix Fontein
aa877fe0fb Release 4.8.3. 2022-06-20 20:37:43 +02:00
Felix Fontein
86f06cac4c Prepare 4.8.3 release. 2022-06-20 20:28:30 +02:00
patchback[bot]
f8650f8d85
sudoers: fix handling of state: absent (#4852) (#4853) (#4857)
* sudoers: fix handling of state: absent (#4852)

* typo fixes

(cherry picked from commit 44e21dd407)

Co-authored-by: s-hamann <10639154+s-hamann@users.noreply.github.com>
2022-06-19 15:48:53 +02:00
patchback[bot]
141f32c78b
redhat_subscription: call 'remove' instead of 'unsubscribe' (#4809) (#4837)
The 'unsubscribe' command of 'subscription-manager' was deprecated
already in subscription-manager 1.11.3, shipped with RHEL 5.11.
As it was removed in subscription-manager 1.29.x, unsubscribing from
pools was thus broken.

The simple fix is to call the proper command, 'remove'.

(cherry picked from commit a45b90e93f)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2022-06-14 07:53:46 +02:00
patchback[bot]
23859e0ec3
nmcli: do not convert undefined lists to empty strings (#4813) (#4833)
* do not convert undefined lists to empty strings

* add changelog fragment (#4813)

(cherry picked from commit 72faebffc6)

Co-authored-by: geichelberger <35195803+geichelberger@users.noreply.github.com>
2022-06-13 12:13:02 +02:00
patchback[bot]
79d85cc83c
Ensure managed sudoers config files have 0440 permissions (#4814) (#4827)
* Ensure sudoers config files are created with 0440 permissions to appease visudo validation

* Remove change not required by the bugfix

* Add changelog fragment for 4814 sudoers file permissions

* Update changelogs/fragments/4814-sudoers-file-permissions.yml

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

* Have less oct casting

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2d1e58663c)

Co-authored-by: Jon Ellis <ellis.jp@gmail.com>
2022-06-12 08:59:48 +02:00
patchback[bot]
7ec8b50361
ModuleHelperException module utils - improved exception initialization (#4755) (#4785)
* ModuleHelperException module utils - improved exception initialization

* added changelog fragment

* Update plugins/module_utils/mh/exceptions.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b87edda3c7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-06-06 10:58:28 +02:00
Felix Fontein
9a66140cd3 Release 4.8.2. 2022-06-06 09:48:48 +02:00
Felix Fontein
b37a0d4397 Adjust release summary. 2022-06-02 08:22:20 +02:00
patchback[bot]
bf8e788964
Add simplified_bsd.txt license file (#4759) (#4760)
* Add simplified_bsd.txt and adjust references.

* Add changelog.

(cherry picked from commit 0be68bf04b)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-02 08:01:50 +02:00
patchback[bot]
8adc746d90
keycloak_realm: fix default groups and roles (#4241) (#4719) (#4753)
* keycloak_realm: fix default groups and roles (#4241)

* add changelog fragment

(cherry picked from commit 7ee15f95f7)

Co-authored-by: adam-cleo <90759784+adam-cleo@users.noreply.github.com>
2022-05-30 12:55:59 +02:00
patchback[bot]
992e14e424
fix invalid fail_json call (#4733) (#4749)
* fix invalid fail_json call

Currently causes this error:
```
TypeError: AnsibleModule.fail_json() missing 1 required positional argument: 'msg'
gitlab | FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3.10"
    },
    "changed": false,
    "module_stderr": "Shared connection to 10.0.3.100 closed.\r\n",
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1653579059.8318024-147674-84188943153768/AnsiballZ_redis.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible_collections.community.general.plugins.modules.redis', init_globals=dict(_module_fqn='ansible_collections.community.general.plugins.modules.redis', _modlib_path=modlib_path),\r\n  File \"/usr/lib/python3.10/runpy.py\", line 209, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/modules/redis.py\", line 328, in <module>\r\n  File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/modules/redis.py\", line 195, in main\r\n  File \"/tmp/ansible_community.general.redis_payload_di15cy0s/ansible_community.general.redis_payload.zip/ansible_collections/community/general/plugins/module_utils/redis.py\", line 40, in fail_imports\r\nTypeError: AnsibleModule.fail_json() missing 1 required positional argument: 'msg'\r\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
```

* Add changelog.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e55875107b)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-05-30 08:13:47 +02:00
patchback[bot]
c97b4e6201
consul: applied bugfix from issue (#4712) (#4715)
* applied bugfix from issue

* added changelog fragment

(cherry picked from commit 4d2bed1dde)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-05-23 07:36:50 +02:00
patchback[bot]
1cd0afd3df
Add RHEL 9.0, FreeBSD 13.1, Ubuntu 22.04 and Fedora 36 to CI, fix bug in filesystem module (#4700) (#4709)
* Add RHEL 9.0 and FreeBSD 13.1 to CI.

* RHEL 9 has no pyOpenSSL apparently.

* Adjust URL for EPEL.

* Fix cargo install on FreeBSD 13.1.

* Add Ubuntu 22.04 and Fedora 36 to CI.

* Fix logic.

* filesystem: do not die output line does not contain ':'

* Skip django_manage tests on RHEL 9 as well.

* homectl tests don't work with RHEL 9.0.

* Improve error handling, improve fatresize output handling.

* Skip Fedora 36.

* Skip filesystem vfat tests on Ubuntu 22.04.

There, resizing fails with a bug:
Bug: Assertion (disk != NULL) at ../../libparted/disk.c:1620 in function ped_disk_get_partition_by_sector() failed.

* 'trusty' is 14.04. Adding 22.04 to skip list.

* Skip jail tests for FreeBSD 13.1.

* Add config for postgres on Ubuntu 22.04.

* Make CentOS 6 happy.

* Adjust postgres version.

* Try installing EPEL a bit differently.

* Skip ufw and iso_extract tests on RHEL 9.

* Skip odbc tests on RHEL 9.

* Skip RHEL 9.0 for snap tests.

* Add changelog fragment for filesystem code changes.

(cherry picked from commit 319c29c2a2)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-22 17:48:09 +02:00
patchback[bot]
5dde703246
Update lenovoxcc module for compatibility with the virtualMedia resource location from Manager to System (#4682) (#4684)
* Update lenovoxcc module for compatibility due to redfish spec changes the virtualMedia resource location from Managers to Systems

* Add changelogs fragment for PR 4682

* Update changelogs/fragments/4682-compatibility-virtualmedia-resource-location.yaml

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

Co-authored-by: Tami YY3 Pan <panyy3@lenovo.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8db265f99b)

Co-authored-by: jixj5 <66418293+jixj5@users.noreply.github.com>
2022-05-18 07:35:31 +02:00
Felix Fontein
c23dbb83d0
gitlab_hook: use None for non-existent attr in gitlab API response (#4668) (#4681)
* gitlab_hook: use empty string for non-existent attr in gitlab API response;

* gitlab_hook: use None for non-existent attr in gitlab API response;

* gitlab_hook: use None for non-existent attr in gitlab API response - add changelog fragment;

* gitlab_hook: update changelog fragment for #4668

* Update changelogs/fragments/4668-gitlab_hook-use-None-for-non-existent-attr.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit da2dfd0706)

Co-authored-by: Kirill Petrov <crw.inbox@gmail.com>
2022-05-17 08:35:24 +02:00
Felix Fontein
ae94c11a78 Prepare 4.8.2 release. 2022-05-16 13:16:54 +02:00
Felix Fontein
ba9ec71dba Release 4.8.1. 2022-05-16 12:33:05 +02:00
Felix Fontein
1327d81dd7
Add PSF-license.txt file. (#4675) 2022-05-16 07:35:47 +02:00
Felix Fontein
6ceaee2c9f Prepare 4.8.1 release. 2022-05-14 13:55:15 +02:00
patchback[bot]
2947acb77c
gconftool2: improvements (#4647) (#4666)
* gconftool2: improvements

* added changelog fragment

* typo

* Update changelogs/fragments/4647-gconftool2-command-arg.yaml

Per recommendation from Felix. Danke!

(cherry picked from commit fbff98c5f2)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-05-12 12:48:33 +02:00
patchback[bot]
e80519dc71
onepassword - Get first found config file (#4640) (#4653)
* Get first found configuration file

There are three valid places to get the configuration.

https://developer.1password.com/docs/cli/about-biometric-unlock#remove-old-account-information

* Use common config class

* Add changelog fragment

* Explicitly use new style classes for Python 2.7 compatibility

This shouldn’t matter for lookups, but does matter for module_utils
and modules since Python 2.7 is still supported on the managed node.

* Update changelogs/fragments/4065-onepassword-config.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9e1af2d1bc)

Co-authored-by: Sam Doran <github@samdoran.com>
2022-05-09 12:31:05 +02:00
patchback[bot]
a925e020dc
change list.copy() with list[:] for py2 compat in terraform module (#4621) (#4644)
* change list.copy() with list[:] for py2 compat in terraform module

* add changelog fragment

* Update changelogs/fragments/4621-terraform-py2-compat.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4b0245355e)

Co-authored-by: Andrea Tartaglia <andrea@braingap.uk>
2022-05-08 09:18:29 +00:00
patchback[bot]
9512a389f3
[opentelemetry][callback] fix hardcoded value for ansible_task_message (#4624) (#4632)
* [opentelemetry][callback] fix hardcoded value for ansible_task_message

* opentelemetry: add changelog fragment

(cherry picked from commit 9f702946cd)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
2022-05-05 13:15:06 +02:00
patchback[bot]
7c987d7498
[opentelemetry][callback] fix warning when using the include_tasks (#4623) (#4628)
* opentelemetry: fix include_tasks missing _task_fields

* opentelemetry: add uts for the include_tasks

* opentelemetry: add changelog fragment

* pep8: fix spaces

(cherry picked from commit 841b46ff6a)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
2022-05-05 06:56:26 +00:00
patchback[bot]
45d461c0ec
consul: fixed bug in ConsulService when storing checks (#4590) (#4630)
* consul: fixed bug in ConsulService when storing checks

* added changelog fragment

* typo

(cherry picked from commit 5a8422c8cb)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-05-05 08:34:22 +02:00
Felix Fontein
96f609d1f2 Release 4.8.0. 2022-04-26 11:42:20 +02:00
patchback[bot]
03b128aeff
Add 'state' parameter for alternatives (#4557) (#4576)
* Add 'activate' parameter for alternatives

Allow alternatives to be installed without being set as the current
selection.

* add changelog fragment

* Apply suggestions from code review

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

* rename 'activate' -> 'selected'

* rework 'selected' parameter -> 'state'

* handle unsetting of currently selected alternative

* add integration tests for 'state' parameter

* fix linting issues

* fix for Python 2.7 compatibility

* Remove alternatives file.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 29c49febd9)

Co-authored-by: Tanner Prestegard <tprestegard@users.noreply.github.com>
2022-04-26 06:41:04 +00:00
patchback[bot]
ca93145e76
Parse lxc key from api data for lxc containers (#4555) (#4574)
* Parse lxc key from api data for lxc containers

When configuring containers in the `/etc/pve/lxc/` file, the API
adds a 'lxc' key that caused the plugin to crash as it tried to
split a list on ','.

This commit introduces logic to convert the list of lists in the
returned data to a dict as with the other keys.

```
'lxc': [['lxc.apparmor.profile', 'unconfined'],
	['lxc.cgroup.devices.allow', 'a']]
```

becomes

```
"proxmox_lxc": {
	"apparmor.profile": "unconfined",
	"cap.drop": "",
	"cgroup.devices.allow": "a"
}
```

* Add changelog fragment

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

Co-authored-by: Philippe Pepos Petitclerc <peposp@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 346bfba9c5)

Co-authored-by: Philippe Pépos-Petitclerc <ppepos@users.noreply.github.com>
2022-04-25 22:32:46 +02:00
patchback[bot]
a163ec3afa
Command Runner (#4476) (#4572)
* initial commit, passing unit tests

* passing one very silly integration test

* multiple changes:

- updated copyright year
- cmd_runner
  - added fmt_optval
  - created specific exceptions
  - fixed bug in context class where values from module params were not
    being used for resolving cmd arguments
  - changed order of class declaration for readability purpose
- tests
  - minor improvements in integration test code
  - removed some extraneous code in msimple.yml
  - minor improvements in unit tests
  - added few missing cases to unit test

* multiple changes

cmd_runner.py

- renamed InvalidParameterName to MissingArgumentFormat
  - improved exception parameters
- added repr and str to all exceptions
- added unpacking decorator for fmt functions
- CmdRunner
  - improved parameter validation
- _CmdRunnerContext
  - Context runs must now pass named arguments
  - Simplified passing of additional arguments to module.run_command()
  - Provided multiple context variables with info about the run

Integration tests

- rename msimple.py to cmd_echo.py for clarity
- added more test cases

* cmd_runner: env update can be passed to runner

* adding runner context info to output

* added comment on OrderedDict

* wrong variable

* refactored all fmt functions into static methods of a class

Imports should be simpler now, only one object fmt, with attr access to all callables

* added unit tests for CmdRunner

* fixed sanity checks

* fixed mock imports

* added more unit tests for CmdRunner

* terminology consistency

* multiple adjustments:

- remove extraneous imports
- renamed some variables
- added wrapper around arg formatters to handle individual arg ignore_none behaviour

* removed old code commented out in test

* multiple changes:

- ensure fmt functions return list of strings
- renamed fmt parameter from `option` to `args`
- renamed fmt.mapped to fmt.as_map
- simplified fmt.as_map
- added tests for fmt.as_fixed

* more improvements in formats

* fixed sanity

* args_order can be a string (to be split())

and improved integration test

* simplified integration test

* removed overkill str() on values - run_command does that for us

* as_list makes more sense than as_str in that context

* added changelog fragment

* Update plugins/module_utils/cmd_runner.py

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

* adjusted __repr__ output for the exceptions

* added superclass object to classes

* added additional comment on the testcase sample/example

* suggestion from PR

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f5b1b3c6f0)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-04-25 22:26:36 +02:00
patchback[bot]
868a6303be
Allow Proxmox Snapshot Restoring (#4377) (#4571)
* Allow restoring of snapshots

* Fix formatting

* Add documentation for new feature

* Revert unrelated reformatting

* Add documentation for snapshot change

* Remove redundant multiple call to status API

* Remove unneccesary indent

* Add documentation for timeout fix

* Update changelog fragment to reflect real changes

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

* Update changelog fragment to reflect real changes

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

* Add Tests for Snapshot rollback

* Update tests/unit/plugins/modules/cloud/misc/test_proxmox_snap.py

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

* Update changelogs/fragments/4377-allow-proxmox-snapshot-restoring.yml

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

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit dbad1e0f11)

Co-authored-by: Timon Michel <ich.bin@ein.dev>
2022-04-25 06:54:22 +02:00