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

1895 commits

Author SHA1 Message Date
Alexei Znamensky
a7499ce319
hponcfg: added missing types in documentation (#4589) 2022-04-28 07:58:03 +02:00
Alexei Znamensky
e96d2a5a3e
hpilo_info: added missing types in documentation (#4588) 2022-04-28 07:27:37 +02:00
Brian Coca
e62a56e15c
Add docs for ansible-core 2.13 use (#4202)
* Add docs for ansible-core 2.13 use

local testing shows fine, adding here as example for other filters/tests

* Update plugins/filter/random_mac.py

* Improve docs.

* Remove wrong 'positional'.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-27 23:13:05 +02:00
Brian Coca
378b20ac32
documenting to_seconds filter (#4203)
* documenting to_seconds filter

example of documenting filters when multiple exist inside one file

* Update to_seconds.yml

* Apply suggestions from code review

* Extend documentation. Add BOTMETA entry.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-27 22:39:36 +02:00
Alexei Znamensky
79f9d30989
hpilo_boot: added missing types in documentation (#4582) 2022-04-27 18:17:54 +02:00
Alexei Znamensky
c35bca6c8f
vmadm: deprecating unused parameter debug (#4580)
* vmadm: deprecating unused parameter debug

* added changelog fragment
2022-04-27 08:04:29 +02:00
Felix Fontein
520705df30
Make sure plugins/ contains no symbolic links or other things that aren't regular files (#4579) 2022-04-26 22:19:34 +02:00
Felix Fontein
7743ecd776
Replace symlinks with meta/runtime.yml redirects. (#4562) 2022-04-26 20:33:13 +02:00
Felix Fontein
7ee38eadf3
Increase coverage of CI groups. (#4563) 2022-04-26 12:48:01 +02:00
Felix Fontein
1a9b3214fd
[5.0.0] Remove Ansible 2.9 / ansible-base 2.10 compatibility code (#4548)
* Remove Ansible 2.9 / ansible-base 2.10 compatibility code.

* Remove path_join shim from BOTMETA.

* Update comment.

* Bump minimally required ansible-core version.
2022-04-26 11:51:01 +02:00
Felix Fontein
36a0eca193
Deprecate norc's default. (#4517) 2022-04-26 11:45:43 +02:00
Felix Fontein
54b2f0819d
[5.0.0] Bump version to 5.0.0, remove deprecated features (#4516)
* Remove deprecated features.

* Fix changelog.

* Remove ignore.txt entries.

* One more.

* Remove state=get tests.
2022-04-26 11:45:15 +02:00
Tanner Prestegard
29c49febd9
Add 'state' parameter for alternatives (#4557)
* 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>
2022-04-26 08:20:29 +02:00
CWollinger
d7e5e85f3e
New module alerta_customer (#4554)
* first draft of alerta_customer

* Update BOTMETA.yml

* update after review

* fix pagination and state description

* remove whitespace
2022-04-26 07:58:32 +02:00
Philippe Pépos-Petitclerc
346bfba9c5
Parse lxc key from api data for lxc containers (#4555)
* 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>
2022-04-25 22:21:36 +02:00
Raymond Chang
1d3506490f
New Module: LXD Projects (#4521)
* add lxd_project module

* documentation improvement and version_added entry

* improve documentation

* use os.path.expanduser

* exclude from use-argspec-type-path test

* improve documentation
2022-04-25 22:20:54 +02:00
Alexei Znamensky
f5b1b3c6f0
Command Runner (#4476)
* 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>
2022-04-25 22:12:00 +02:00
Timon Michel
dbad1e0f11
Allow Proxmox Snapshot Restoring (#4377)
* 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>
2022-04-25 06:39:15 +02:00
Daniel
c8c2636676
Proxmox inventory: implement API token auth (#4540)
* Proxmox inventory: implement api token auth

* Apply suggestions from code review

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

* fix linter errors

* add changelog fragment

* add examples

* fix a typo and break long lines

* Update changelogs/fragments/4540-proxmox-inventory-token-auth.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-24 12:55:47 +02:00
Alexei Znamensky
3b103f905e
Removed 'default=None' in a batch of modules 2 (#4567)
* removed default=None

* added changelog fragment
2022-04-24 07:42:36 +02:00
Alexei Znamensky
b916cb369b
Removed 'default=None' in a batch of modules (#4556)
* removed default=None

* removed default=None

* removed default=None

* removed default=None

* added changelog fragment
2022-04-24 07:41:24 +02:00
Felix Fontein
828656a761 Fix filename. 2022-04-22 23:29:45 +02:00
Raymond Chang
552db0d353
Add project support for lxd_container and lxd_profile module (#4479)
* add project support for lxd modules

* fix lxd_container yaml format error

* add changelog fragement add version_add entry

* fix LXD spelling

* complete lxd_profile example
2022-04-22 22:32:32 +02:00
Alexandr
0620cd2e74
Fix keycloak realm parameters types (#4526)
* Fix keycloack realm parameters types

* Add changelog fragment

* Update changelog fragment

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-22 22:31:38 +02:00
dupondje
53f6c68026
nmcli: Change hairpin default mode (#4334)
* nmcli: Deprecate default hairpin mode

Deprecate the default hairpin mode for a bridge.
Plain nmcli/bridge tools defaults to no, but for some reason ansible
defaults to yes.

We deprecate the default value so we can switch to default 'no' in
ansible 6.0.0

* Code review fixes

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

* Fix comments

* Update changelogs/fragments/4320-nmcli-hairpin.yml

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

* Update changelogs/fragments/4320-nmcli-hairpin.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-04-22 22:30:53 +02:00
Felix Fontein
2f980e89fe
Fix import. (#4550) 2022-04-21 14:24:49 +02:00
Bill Sanders
8e72e98adb
Implement contructable support for opennebula inventory plugin: keyed… (#4524)
* Implement contructable support for opennebula inventory plugin: keyed_groups, compose, groups

* Fixed templating mock issues in unit tests, corrected some linting errors

* trying to make the linter happy

* Now trying to make python2.7 happy

* Added changelog fragment

* changelog fragment needs pluralization

* Update changelogs/fragments/4524-update-opennebula-inventory-plugin-to-match-documentation.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-21 13:16:15 +02:00
Felix Fontein
d9ba598938
Remove distutils from unit tests. (#4545) 2022-04-21 11:12:29 +02:00
ottobits
3cce1217db
nmap inventory plugin: Add sudo nmap (#4506)
* nmap.py: Add sudo nmap

* Update plugins/inventory/nmap.py

Change description of new plugin option adding version_added

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

* Update plugins/inventory/nmap.py

Change boolean values of sudo option in example

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

* Create 4506-sudo-in-nmap-inv-plugin.yaml

* Fix typo in yaml format

* Update changelogs/fragments/4506-sudo-in-nmap-inv-plugin.yaml

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

* Update changelogs/fragments/4506-sudo-in-nmap-inv-plugin.yaml

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

* Document default as false.

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-04-21 09:54:38 +02:00
Felix Fontein
405284b513
Add Lowess as maintainer of pritunl module utils. (#4539) 2022-04-20 21:33:13 +02:00
Alexei Znamensky
a2bfb96213
xfconf: added missing value types (#4534)
* xfconf: added missing value types

* added changelog fragment

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-20 20:58:40 +02:00
vvatlin
51a68517ce
[pritunl] removed unnecessary data from auth string (#4530)
* removed unnecessary data from auth string

* add changelog

Co-authored-by: vadim <vadim>
2022-04-20 09:24:29 +02:00
Alexei Znamensky
3c6cb547f3
xfconf: improve docs (#4533) 2022-04-20 08:24:51 +02:00
Marcin
8076f16aa9
Correctly handle exception when no VM name returned by proxmox (#4508) 2022-04-19 18:31:12 +02:00
York Wong
a8abb1a5bf
remove deprecated branch.unprotect() method in community.general.gitlab_branch (#4496)
* remove deprecated branch.protect method

* add changelog fragment

* Update changelogs/fragments/4496-remove-deprecated-method-in-gitlab-branch-module.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-19 18:26:09 +02:00
Felix Fontein
9e537d4a6b
Bump version numbers for deprecation and removal since we didn't deprecate this in 4.0.0. (#4515) 2022-04-16 21:28:11 +02:00
Felix Fontein
26cebb9c30
CI: remove FreeBSD 12.0 and 12.2, re-enable pkgng tests (#4511)
* Remove FreeBSD 12.0 and 12.2 from CI.

* Revert "Temporarily disable the pkgng tests. (#4493)"

This reverts commit 5ecac692de.
2022-04-16 12:09:35 +02:00
Felix Fontein
efbf02f284
Remove no longer true statement. (#4505) 2022-04-15 15:35:02 +02:00
Martin
3c515dd221
pacman: Fix removing locally installed packages (#4464)
* pacman: Fix removing locally installed packages

Without this, using `absent` state for a locally installed package (for example from AUR, or from a package that was dropped from repositories) would return that package is already removed, despite remaining installed

* Undo unwanted whitespace removal

* Add changelog fragment

* Update changelogs/fragments/4464-pacman-fix-local-remove.yaml

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

* Add test.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-13 13:34:33 +02:00
John Villalovos
fe4bbc5de3
gitlab: Use all=True in most list() calls (#4491)
If `all=True` is not set then by default only 20 records will be
returned when calling `list()`. Use `all=True` so that all records
will be returned.

For the `list()` use where do not desire to retrieve all entries then
use`all=False` to show explicityly that we don't want to get all of
the entries.

Fixes: #3729
Fixes: #4460
2022-04-13 13:32:25 +02:00
Kamil Markowicz
e4a25beedc
Terraform init -upgrade flag (#4455)
* Adds optional `-upgrade` flag to terraform init.

This allows Terraform to install provider dependencies into an existing project when the provider constraints change.

* fix transposed documentation keys

* Add integration tests for terraform init

* Revert to validate_certs: yes for general public testing

* skip integration tests on irrelevant platforms

* skip legacy Python versions from CI tests

* add changelog fragment

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

Adds version_added metadata to the new module option.

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

* Change terraform_arch constant to Ansible fact mapping

* correct var typo, clarify task purpose

* Squashed some logic bugs, added override for local Terraform

If `existing_terraform_path` is provided, the playbook will not download Terraform or check its version.

I also tested this on a local system with Terraform installed, and squashed some bugs related to using of an
existing binary.

* revert to previous test behavior for TF install

* readability cleanup

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-13 11:16:54 +00:00
drevai753
06675034fe
dnsmadeeasy: only get monitor if it is not null api response (#4459)
* Only get monitor if it is not null api response

* Add changelog fragment

* Update changelogs/fragments/4459-only-get-monitor-if-it-is-not-null-api-response.yaml

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

* Update plugins/modules/net_tools/dnsmadeeasy.py

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

Co-authored-by: drevai <revai.dominik@gravityrd.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-13 07:10:15 +02:00
elara-leitstellentechnik
8ccc4d1fbb
Implement btrfs resize support (#4465)
* Implement btrfs resize support

* Add changelog fragment for btrfs resize support

Co-authored-by: Fabian Klemp <fabian.klemp@frequentis.com>
2022-04-13 07:07:51 +02:00
Felix Fontein
5ecac692de
Temporarily disable the pkgng tests. (#4493) 2022-04-11 20:10:49 +02:00
Mike Raineri
a9125c02e7
Redfish: Added IndicatorLED commands to the Systems category (#4458)
* Redfish: Added IndicatorLED commands to the Systems category

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Method call typo fix

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Update 4084-add-redfish-system-indicator-led.yml

* Backwards compatibility suggestion

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
2022-04-11 20:10:18 +02:00
ermeaney
6edc176143
add support for datadog monitors of type event-v2 (#4457)
* add support for datadog monitors of type event-v2

See https://docs.datadoghq.com/events/guides/migrating_to_new_events_features/

* add changelog fragement for PR

* typos

* add link to PR

* minor_fetaure, not bugfix

* add to description when we added event-v2 type

* Update changelogs/fragments/4457-support-datadog-monitors-type event-v2.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-11 07:09:27 +02:00
Cameron Nemo
d3adde4739
modules/xbps: fix error message (#4438)
The previous error message was not giving the full or even correct
information to the user.
2022-04-11 07:05:04 +02:00
Alexei Znamensky
7e6a2453d0
seport: minor refactor (#4471)
* seport: minor refactor

* added changelog fragment

* Update plugins/modules/system/seport.py

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

* Update plugins/modules/system/seport.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-10 14:34:15 +02:00
Felix Fontein
aa27f2152e
Switch from antsibull to antsibull-docs. (#4480) 2022-04-10 10:47:00 +02:00
Felix Fontein
865d7ac698
Deprecate want_proxmox_nodes_ansible_host option's default value. (#4466) 2022-04-10 08:46:49 +02:00