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

1279 commits

Author SHA1 Message Date
genofire
72bffce2fe
feat(ipa_dnsrecord): add multiple record support (#4578)
Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-09 22:28:34 +02:00
vvatlin
cf55ef852e
[pritunl] add mac_addresses parameter (#4535)
* add mac_addresses parameter

* add changelog

* remove debug line

* add second blank line

* add mac_addresses comparision

* Update changelogs/fragments/4535-pritunl-add-mac_addresses-parameter.yml

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

* Update plugins/modules/net_tools/pritunl/pritunl_user.py

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

* Update plugins/modules/net_tools/pritunl/pritunl_user.py

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

* Update plugins/modules/net_tools/pritunl/pritunl_user.py

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

* Update plugins/modules/net_tools/pritunl/pritunl_user.py

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

Co-authored-by: vadim <vadim>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-09 07:38:10 +02:00
Sam Doran
9e1af2d1bc
onepassword - Get first found config file (#4640)
* 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>
2022-05-09 07:24:35 +02:00
Alexei Znamensky
bca7f09b71
ModuleHelper module utils: delegates unknown attributes to AnsibleModule (#4600)
* ModuleHelper module util: delegates unknown attributes to AnsibleModule

* added changelog fragment

* delegate only a few selected attrs

* Update plugins/module_utils/mh/base.py

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

* Update changelogs/fragments/4600-mh-delegate.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-09 07:10:49 +02:00
Alexei Znamensky
b9266c31d0
zfs: refactoring (#4650)
* zfs: refactoring

* added changelog fragment
2022-05-08 13:50:53 +02:00
Jan-Piet Mens
e57fc54a10
Clarify ansible_pre_command_output (#4636)
##### SUMMARY
Clarify what ansible_pre_command_output actually is

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2022-05-08 08:45:55 +02:00
Andrea Tartaglia
4b0245355e
change list.copy() with list[:] for py2 compat in terraform module (#4621)
* 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>
2022-05-08 08:45:15 +02:00
Victor Martinez
9f702946cd
[opentelemetry][callback] fix hardcoded value for ansible_task_message (#4624)
* [opentelemetry][callback] fix hardcoded value for ansible_task_message

* opentelemetry: add changelog fragment
2022-05-05 12:42:59 +02:00
Alexei Znamensky
532a26692c
vmadm: improvements (#4581)
* improvements on vmadm

* added changelog fragment

* Update plugins/modules/cloud/smartos/vmadm.py

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

* Update plugins/modules/cloud/smartos/vmadm.py

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

* Update plugins/modules/cloud/smartos/vmadm.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-05 08:23:52 +02:00
Alexei Znamensky
5a8422c8cb
consul: fixed bug in ConsulService when storing checks (#4590)
* consul: fixed bug in ConsulService when storing checks

* added changelog fragment

* typo
2022-05-05 08:23:00 +02:00
Victor Martinez
841b46ff6a
[opentelemetry][callback] fix warning when using the include_tasks (#4623)
* opentelemetry: fix include_tasks missing _task_fields

* opentelemetry: add uts for the include_tasks

* opentelemetry: add changelog fragment

* pep8: fix spaces
2022-05-05 08:21:16 +02:00
Felix Fontein
b711038b3b
dig lookup: deprecate DLV record type (#4618)
* Deprecate DLV record type.

* Use correct name.
2022-05-05 08:18:04 +02:00
Felix Fontein
9462506edc
Rename single-filter plugins so that the filename equals the filter name. (#4625) 2022-05-05 08:03:49 +02:00
Adam Robinson
f8889d1dd8
redfish_command: VirtualMediaInsert does not work with HPE iLO4 (#4596)
* Inserted not supported in patch on some hardware

Signed-off-by: Adam Robinson <adarobin@umich.edu>

* return error for ilo4 options with no defaults

* Update changelog

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

* make virtual_media_insert_via_patch backwards compatible

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

* remove ilo 4 specific properties check

* return ExtendedInfo as a string if no Message

* only worry about Inserted and WriteProtected

* update changelog

* fix for PEP8

* fix up comments

* fix VirtualMediaEject for iLO4 as well

* update changlog

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-05 07:56:26 +02:00
René Moser
dd9afc09a8
time_filter: allow 0 to return 0 (#4612)
* time_filter: allow 0 to return 0

* add changelog

* Update changelogs/fragments/4612-time_filter_zero.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-04 07:38:16 +02:00
René Moser
8d37591605
doc: time_filter: fix duplicate (#4611) 2022-05-03 17:46:36 +02:00
Felix Fontein
5cb7c2e45e
Small fixes. (#4605) 2022-05-02 07:49:49 +02:00
Felix Fontein
f055f47161
Document all filter and test plugins (#4597)
* Fix/improve docs.

* Document the a_module test.

* Document the dict filter.

* Linting.

* Add more filter docs.

* More filters.

* Update BOTMETA.

* Add another plugin.

* Fix typos.

* Add explicit entries.

* Fix lookup documentation.
2022-05-02 07:25:45 +02:00
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
7743ecd776
Replace symlinks with meta/runtime.yml redirects. (#4562) 2022-04-26 20:33:13 +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
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
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
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
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
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