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

1654 commits

Author SHA1 Message Date
Doc_Tiebeau
27a4ffc293
Fix: Duplicate vmid in proxmox_disk module #5492 (#5493)
https://github.com/ansible-collections/community.general/issues/5492
2022-11-13 21:03:30 +01:00
Alexei Znamensky
bc0f99386b
xfconf: prune deprecated facts-generation code (#5502)
* xfconf: prune deprecated facts-generatin code

* add changelog fragment

* adjust changelog fragment

* Update changelogs/fragments/5502-xfconf-facts-deprecation.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-10 21:18:52 +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
Alexei Znamensky
6b20572ea1
Short descriptions (batch3) - massive fix on Capitalization and trailing period (#5521)
* short_description fix batch 3

* Update plugins/modules/telegram.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-09 21:09:09 +01:00
Alexei Znamensky
f683d6a05d
short_description fix batch 2 (#5520) 2022-11-09 13:57:41 +01:00
Sam Doran
c604cc5ba9
onepassword_raw - Add missing parameter to doc string (#5511)
* onepassword_raw - Add missing parameter to doc string

* Remove redundant mention of default value

* Update changelogs/fragments/5506-onepassword_raw-missing-param.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-09 07:28:49 +01:00
Alexei Znamensky
97b584e261
Short descriptions (batch1) - massive fix on Capitalization and trailing period (#5503)
* short_description fix batch 1

* Update plugins/modules/ali_instance.py

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

* Update plugins/modules/apt_rpm.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-09 07:18:40 +01:00
wh1t3 r4bb1t
621fb6a619
one_vm: fix for 'NoneType' object has no attribute 'split' in get_vm_labels_and_attributes_dict (#5489)
* Fix for 'NoneType' object has no attribute 'split'

* Added changelog to fix

* Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml

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

* Fix line ending in changelog

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-08 23:00:05 +01:00
Kelly Brazil
27827cbea4
Clarification to use underscores instead of dashes in parser name (#5500)
* Clarification to use underscores instead of dashes in parser name

* Update plugins/filter/jc.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-08 20:06:59 +01:00
Alexei Znamensky
858eaac500
minor docs update (#5501) 2022-11-08 14:03:07 +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
Guillaume MARTINEZ
bc7e7f8fcb
[Scaleway] Remove unused sensitive values filtering (#5497)
* [Scaleway] Remove unused sensitive values filtering

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

* Try adding function back.

Maybe that works aound the bug in pylint. (Also it won't be a breaking change anymore.)

Signed-off-by: Lunik <lunik@tiwabbit.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-07 20:57:33 +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
8758f6a43f
mksysb: using CmdRunner (#5484)
* mksysb: using CmdRunner

* add changelog fragment

* adjust code when check_mode true

* Update plugins/modules/mksysb.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-07 20:02:10 +01:00
Yuhua Zou
c757e20d10
fix the issue#5275: iso_create doesn't add folders (#5468)
* fix the issue

* add changelog

* add changelog file

* Update changelogs/fragments/5468-iso-create-not-add-folders.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-07 07:00:55 +01:00
Alexei Znamensky
7a9af2b601
hponcfg: using CmdRunner (#5483)
* hponcfg: using CmdRunner

* add changelog fragment
2022-11-07 06:43:21 +01:00
Felix Fontein
ac6ac73276
Document attributes (_info and _facts modules for now) (#5481)
* Add attributes docs fragment.

* Use attributes for _info and _facts modules.
2022-11-06 21:16:43 +01:00
Felix Fontein
8de0221ae6
Convert copyright docstings to proper copyright comments (#5480)
* Drop stable-3 from weekly CI; migrate stable-4 from nightly to weekly.

* Convert copyright docstings to proper copyright comments.
2022-11-06 20:28:56 +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
fb90b5cbe8
ansible_galaxy_install: using CmdRunner (#5477)
* ansible_galaxy_install: using CmdRunner

* fix sanity checks

* add changelog fragment
2022-11-06 11:40:30 +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
Martin
ee39fd5c90
Allow for DN's to have {x} prefix on first RDN (#5450)
* Allow for DN's to have {x} prefix on first RDN

* Update changelogs/fragments/5450-allow-for-xordered-dns.yaml

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

* Assign attrs to throw-away var

* Update plugins/module_utils/ldap.py

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

* Escape DN before creating filter

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-05 12:43:28 +01:00
Reto Kupferschmid
1a97ca1a6f
ldap_attrs: escape ldap search filter (#5435)
* escape ldap search filter

* move escape to separate line

* add changelog fragment

* Update changelogs/fragments/5435-escape-ldap-param.yml

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

* fix encoding

* fixup! fix encoding

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-04 07:07:06 +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
2b0bebc8fc Fix defaults. 2022-11-02 21:00:09 +01: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
Simon-TheUser
5cb9a9e4f0
nsupdate: issues/4657 (#5377)
* Insert new entries before deleting old ones.
resolves #4657

* Slight wording changes.

* lint fix

* Address lint

* Added changelog
Fixed lint

* More linting

* Update changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-02 20:13:50 +01:00
Jan-Philipp Litza
e4b9e098c7
Clearer error logging in passwordstore lookup (#5436)
* Clearer error logging in passwordstore lookup

* Add changelog fragment for passwordstore errmsgs

Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2022-11-02 20:12:21 +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
Mike Raineri
ea3550d838
Redfish: centralize payload inspection logic and OEM logic (#5425)
* Redfish: centralize payload checking when performing modification requests to a Redfish service

* CI fixes

* Updates based on unit testing

* CI fix

* Modified vendor-specific logic to establish common pattern for workarounds
2022-11-02 07:40:21 +01:00
Felix Fontein
47cc2a4e8e
dnstxt lookup - add option to return empty list. (#5457) 2022-11-01 22:19:33 +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
f84a9bf932
Fix non-matching defaults. (#5452) 2022-11-01 19:25:51 +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
f1d5f71b8d
proxmox inventory, remove redundant and simplify code (#5437)
* remove redundant and simplify code

we already have a templar from base class

loop reuses code instead of X copies of it

* whitey

* no need to import templar again

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-01 07:33:54 +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
Jan-Piet Mens
df34a7b0f2 add option to force dig lookup to return empty list instead of list of empty strings. (#5439)
fixes https://github.com/ansible-collections/community.general/issues/5428
2022-10-29 10:51:03 +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
Martin
091bdc77c3
ldap_attrs: search_s based _is_value_present (#5385)
* search_s based _is_value_present

* Fix formatted string and ldap import

* Add changelog fragment

* Remove superfluous import ldap

* Improve fragment

* Code format {x} prefix

* Lower-case fixes

* Fix suggestions to changelog

* Break with the past and let bools be bools

* Let ldap_attrs break on invalid DN's
2022-10-25 08:01:57 +02:00
Ron Green
70c57dcb6a
clarify jc filter usage in the example (#5396)
* Update jc.py

##### SUMMARY
<!— Your description here –>


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

* Update jc.py

* Update plugins/filter/jc.py

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

* Update jc.py

* Update plugins/filter/jc.py

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

* Update jc.py

* Update jc.py

* Update jc.py

* Update plugins/filter/jc.py

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

* Update plugins/filter/jc.py

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

* change all of the tags to be FQMN

FQMN = fully qualified module name

* Update jc.py

* Update plugins/filter/jc.py

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

* Update jc.py

* Update jc.py

* Update plugins/filter/jc.py

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

* Update jc.py

* Update plugins/filter/jc.py

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

* Update plugins/filter/jc.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-24 19:25:24 +02:00
Alexander Holzapfel
b9d0864957
Send string instead of boolean to proxmox api (#5198)
* Send string instead of boolean to proxmox api

* Add changelog fragment.

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

Co-authored-by: castorsky <csky57@gmail.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: castorsky <csky57@gmail.com>
2022-10-23 18:25:03 +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
91cac4c816
MH CmdModuleHelper: deprecation (#5370)
* MH CmdModuleHelper: deprecation

* add changelog fragment

* add deprecation comments in many parts of the code
2022-10-23 16:34:04 +02:00
Alexei Znamensky
f5ca03047d
django_manage: deprecate venv creation when missing (#5405)
* deprecate venv creation when missing

* add changelog fragment

* fix sanity checks

* Update changelogs/fragments/5404-django-manage-venv-deprecation.yml

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

* Update plugins/modules/web_infrastructure/django_manage.py

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

* Update plugins/modules/web_infrastructure/django_manage.py

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

* minor change to help future removal of feature

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-23 16:33:14 +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
Alexei Znamensky
389dfe9f09
manageiq_tags_info: new module (#5368)
* manageiq_tags: refactor ManageIQTags class out to utils

* add manageiq_tags_info module

* refactor query_resource_id as a method in ManageIQ

* minor adjustments

* fix comments from PR

* rollback register result in examples

* add basic docs for return value
2022-10-23 11:33:07 +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
ajakk
8072d11d06
portage: update comment, drop gentoolkit requirement (#5406)
This reflects the changes made in
9189f7a6bf.

Signed-off-by: John Helmert III <ajak@gentoo.org>

Signed-off-by: John Helmert III <ajak@gentoo.org>
2022-10-23 10:30:05 +13:00
Alexei Znamensky
7857d0669e
django_manage: deprecate old commands (#5400)
* deprecate old commands

* add changelog fragment

* fix django version in docs

* fix wording on the deprecations

* Update changelogs/fragments/5400-django-manage-deprecations.yml

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

* update chglog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-22 08:42:52 +02:00
Felix Fontein
a023f2a344
archive: better expose requirements (#5392)
* Better expose requirements.

* Move sentence back to notes.

* Update plugins/modules/files/archive.py

Co-authored-by: Maxwell G <gotmax@e.email>

* Break line.

Co-authored-by: Maxwell G <gotmax@e.email>
2022-10-21 07:08:39 +02:00
Felix Fontein
5aa1e58749
Do not crash when lzma is not around. (#5393) 2022-10-20 20:32:18 +02:00
Felix Fontein
c3bdc4b394
Fix module. (#5383) 2022-10-19 10:13:04 +02:00
Paul Sanchez
b0bb994c3e
virtualbox: Fix crash when handling deeply nested hostvars (#5348)
* virtualbox: Fix nested data parsing

- Skip parsing values with keys that have both a value and nested data.
- Skip parsing values that are nested more than two keys deep.

* Update changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-18 09:17:49 +02:00
Alexei Znamensky
dfe1f9a29e
consul: pythonisms + a couple of required_if clauses (#5367)
* consul: pythonisms + a couple of required_if clauses

* adjust condition of if

* adjust condition of if (again)

* Update plugins/modules/clustering/consul/consul.py

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

* simplify parse_check logic

* fix condition of if

* remove test made redundant by required_if

* add changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-18 09:17:13 +02:00
Victor Martinez
5732023aa2
[opentelemetry][callback] support opentelemetry-api 1.13 (#5342)
* [opentelemetry][callback] support opentelemetry-api 1.13

* [opentelemetry][callback] changelog fragment

* Update changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml

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

* [opentelemetry-callback] refactor time_ns in a function

* fix linting

* change branch outside of the function

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

* [opentelemetry]: remove options from suggestion

* Apply suggestions from code review

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-18 09:16:11 +02:00
ajakk
2a54644cfa
portage: drop usage of gentoolkit, add knobs for --with-bdeps, --backtrack (#5349)
* portage: drop dependency on gentoolkit (provides equery)

Portage installs a Python module, which is available anywhere that
Portage itself is available. We can use that instead of calling a
shell command.

Signed-off-by: John Helmert III <ajak@gentoo.org>

* portage: add knob for emerge's --backtrack flag

Signed-off-by: John Helmert III <ajak@gentoo.org>

* portage: add knob for portage's --with-bdeps option

Also, this option does not accept "True" like other options. Instead,
it only uses 'y' and 'n', so parse booleans properly into these chars.

Signed-off-by: John Helmert III <ajak@gentoo.org>

* Add changelog entry for #5349

Signed-off-by: John Helmert III <ajak@gentoo.org>

Signed-off-by: John Helmert III <ajak@gentoo.org>
2022-10-14 22:31:02 +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
Wei Liao
7e2a6cf198
Updated to use the new newrelic v2 api (#5341)
* updated to use the new newrelic v2 api

* check that application_id is set

* indenting issue

* added back app_name

* fix import ordering

* resolving various spellings & wordings

* fixed wordings

* validate_certs

* fixed unreachable code
2022-10-12 10:42:17 +02:00
Alexei Znamensky
4941a25c40
added missing aliases to documentation (#5351) 2022-10-12 10:40:06 +02:00
Alexei Znamensky
32f9d78fa3
manageiq_policies_info: new module (#5321)
* manageiq_provider_info: new module

* fix reference to manageiq.module

* add missing alias in suboption

* fix filename in botmeta

* Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py

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

* Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py

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

* fix description of parameters

* Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py

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

* Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py

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

* remove change applied on the wrong branch

* fix the module name in metadata files

* Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py

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

* adjust RETURN documentation

* adjust RETURN documentation indentation

* Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py

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

* Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py

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

* Update plugins/modules/remote_management/manageiq/manageiq_policies_info.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-12 10:27:21 +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
henkwiedig
96b6ef5765
znode: add options for authentication (#5306)
* add options for authentication

* Update changelogs/fragments/5306-add-options-for-authentication.yml

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

* Update plugins/modules/clustering/znode.py

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

* Update plugins/modules/clustering/znode.py

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

* Update plugins/modules/clustering/znode.py

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

* Update plugins/modules/clustering/znode.py

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

* rename scheme to auth_scheme, credential to auth_credential

* make pycodestyle happy

* Update plugins/modules/clustering/znode.py

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

* Update plugins/modules/clustering/znode.py

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

* remove unneeded quotes

* Update changelogs/fragments/5306-add-options-for-authentication.yml

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

* Update version_added.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-05 08:23:15 +02:00
clovis-monmousseau
7b86fa6a7d
keycloak_user_federation: add explanation and example to vendor option (#4893)
* Add explanation and example to vendor option

##### SUMMARY
<!— Your description here –>


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

* Update plugins/modules/identity/keycloak/keycloak_user_federation.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-05 07:57:01 +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
cfiehe
6fe2a84e87
Fix #5313: redhat_subscription module is not idempotent when pool_ids (#5319)
This fix ensures the idempotency of the redhat_subscription module when pool_ids are used. The main problem was, that a 'None' quantity was not properly handled and that the quantity check compared a string with an integer.

Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>

Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
2022-10-03 20:24:53 +02:00
betuxy
394647df84
bitwarden: Add field to search for all item attributes, instead of on… (#5297)
* bitwarden: Add field to search for all item attributes, instead of only name.

* bitwarden: Add change to changelog.

* bitwarden: Update changelog entry.

* Update changelogs/fragments/5297-bitwarden-add-search-field.yml

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

Co-authored-by: Ole Pannbacker <opannbacker@cronon.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-01 18:19:39 +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
Kevin Carter
2eba5dc4e7
chore: Update lxc_container to support py3 (#5304)
* chore: Update lxc_container to support py3

This change is mostly just a documentation change which will report the requirements
correctly for python3-lxc. I've also removed the use of six which results in us
changing `xrange` to `range`.

Resolves: https://github.com/ansible-collections/community.general/issues/5294
Signed-off-by: Kevin Carter <kevin.carter@figment.io>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update changelogs/fragments/5280-lxc_container-py3.yaml

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

* Update changelogs/fragments/5280-lxc_container-py3.yaml

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

* Update 5280-lxc_container-py3.yaml

* Update 5280-lxc_container-py3.yaml

Signed-off-by: Kevin Carter <kevin.carter@figment.io>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-01 18:02:48 +02:00
azrdev
202cabc769
terraform: run init with no-color, too (#5147)
* terraform: run `init` with no-color, too

When running `terraform init` fails, it would output ansi color sequences, making the output hard to read.

Maybe setting TF_IN_AUTOMATION would also be beneficial: https://www.terraform.io/cli/config/environment-variables#tf_in_automation

* add changelog fragment for `terraform init -no-color`

* move changelog into correct directory; add PR link
2022-10-01 10:25:12 +02:00
Giorgio Gallo
ec9e10d6d1
nmcli: fix error when setting previously unset mac address (#5291)
* fix #5290

* add changelog fragment

* remove unnecessary braces

* Update changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-28 22:49:07 +02:00
nxet
25e3031c2f
[feat] proxmox_snap: snapshot containers with configured mountpoints (#5274)
* module_utils.proxmox: new `api_task_ok` helper + integrated with existing modules

* proxmox_snap: add `unbind` param to snapshot containers with mountpoints

* [fix] errors reported by 'test sanity pep8'
at 
https://github.com/ansible-collections/community.general/pull/5274#issuecomment-1242932079

* module_utils.proxmox.api_task_ok: small improvement

* proxmox_snap.unbind: version_added, formatting errors, changelog fragment

* Apply suggestions from code review

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

* proxmox_snap.unbind: update version_added tag

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-28 22:48:11 +02:00
Ben Brown
f3bcfa5a75
machinectl: include the success command (#5287)
Combines the success command when building the become command. This is
consistent with other become plugins.
2022-09-25 21:09:08 +02:00
tejabailey
d9d830a168
Add SetSessionService to redfish_config (#5009)
* Add SetSessionService to redfish_config
adding SetSessionService command to redfish_config
to set BMC default session timeout policy.

Fixes #5008

* fix white space issues

* Making Requested changes:
 - changed category from SessionService to Sessions
 - changed set_sessionservice() to set_session_service()
 - other misc. changes for cleanup

* Apply suggestions from code review

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

* Fix issues with checks

* Fix issues with checks part 2

* Fix issues with checks part 3

* Update plugins/modules/remote_management/redfish/redfish_config.py

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-25 17:07:45 +02:00
Bartosz-lab
fb1cf91ebd
locale_gen: fix UbuntuMode (#5282)
* Fix UbuntuMode

* Fix indentation

* Create 5281-locale_gen.yaml

* Update and rename 5281-locale_gen.yaml to 5282-locale_gen.yaml

* apply suggested changes

* apply suggested change
2022-09-25 16:31:32 +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
Marc Leuser
a6c8078ccf
netcup_dnsapi: Add timeout paramter (#5301)
* netcup_dnsapi: Add timeout paramter

* add changelog fragment

* Apply suggestions from code review

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

* remove unnecessary newline

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-22 07:17:45 +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
Alexei Znamensky
35e3a9615a
pipx module utils: removed unused import (#5288) 2022-09-18 11:52:15 +02:00
sprnza
b5d311a171
slack: add CP channel prefix (#5249)
* add CP channel prefix

* changelog added

* altered docs

* added description for docs change

* fix line length

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update changelogs/fragments/5249-add-new-channel-prefix.yml

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

Co-authored-by: Денис Сперанский <d_speranskiy@head-point.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-12 20:32:14 +02:00
Yvan Watchman
19e4b7d3ab
add a couple conditionals to make sure updating can be done with vmid… (#5206)
* add a couple conditionals to make sure updating can be done with vmid only

* add changelog to PR

* replace conditional with any

* any takes list

* fix next conditional

* Update changelogs/fragments/5206-proxmox-conditional-vmid.yml

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

* capitalize VM and remove conditional for name requirement upon creation

* Fix URL destroyed by GitHub.

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

Co-authored-by: Yvan E. Watchman <git@yvanwatchman.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-09-12 20:31:30 +02:00
Alexei Znamensky
fbb6ceea1d
gitlab_hook: minor refactoring (#5271)
* gitlab_hook: minor refactoring

* add changelog fragment
2022-09-12 20:30:49 +02:00
Alexei Znamensky
6b463e6fa6
gitlab modules: improved imports (#5259)
* gitlab modules: improved imports

* add changelog fragment

* refactored the import check to its sole function
2022-09-12 20:30:02 +02:00
Alexei Znamensky
0a85bb7d23
multiple modules: removed unused imports (#5258) 2022-09-10 11:19:14 +02:00
Shaul Shnaidman
33059a807c
changed the default proxmox container unprivileged flag (#5224)
* changed the default proxmox container to unprivileged

* Reverted the default value with a deprecation.

* use true/false instead of yes/no

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

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

* Apply suggestions from code review

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

* param -> parameter

* Apply suggestions from code review

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

* fix

* review

* Update changelogs/fragments/5224-proxmox-unprivileged-default.yaml

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-10 10:53:08 +02:00
Pavel Zwerschke
f929422dac
osx_defaults: add expand_user_and_vars flag to write (#5243)
* Add expand_user_and_vars flag to write

Closes #5234

* Add changelog

* Update changelogs/fragments/5243-osx-defaults-expand-user-flags.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-10 10:52:14 +02:00
Alexei Znamensky
775be1d3f3
multiple modules: removed unused imports (#5240)
* multiple modules: removed unused imports

* fixed ali_instance(_info) import check

* add changelog fragment

* Update changelogs/fragments/5240-unused-imports.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-09 22:23:48 +02:00
Dawid Dziurla
be9acc7fba
homebrew: add Linux brew path to defaults (#5241)
* homebrew: add Linux brew path to defaults

* changelogs: add 5241 fragment

* homebrew_tap: add Linux brew path to defaults

* changelogs: update 5241 entry

* homebrew_tap: format path separator in desc

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-08 07:46:10 +02:00
betuxy
b4f89b78dd
nmcli: Add xmit_hash_policy to bond options. (#5149)
* Add xmit_hash_policy to nmcli bond-options.

* #5149 - Add changelog fragment.

* Update plugins/modules/net_tools/nmcli.py

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

* Update changelogs/fragments/5149-nmcli-bond-option.yml

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

Co-authored-by: Ole Pannbacker <opannbacker@cronon.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-08 07:45:23 +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
Felix Fontein
015566fb06
Normalize more booleans. (#5247) 2022-09-06 20:42:17 +02:00
Alexei Znamensky
570445adc4
nagios: some refactoring (#5239)
* nagios: some refactoring

* rollback one change

* add changelog fragment

* Update changelogs/fragments/5239-nagios-refactor.yaml

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

* Update plugins/modules/monitoring/nagios.py

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

* Update plugins/modules/monitoring/nagios.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-06 07:33:55 +02:00
Alexei Znamensky
88c3865cdb
Multiple doc fix 3 (#5238)
* multiple modules 2: fixed markups in doc

* multiple modules 3: fixed markups in doc

* fixed yaml

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-06 07:32:35 +02:00
Alexei Znamensky
999fc475a2
multiple modules 2: fixed markups in doc (#5237)
* multiple modules 2: fixed markups in doc

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-06 07:31:25 +02:00
Alexei Znamensky
6e011f00f4
multiple modules: fixed markups in doc (#5227) 2022-09-04 15:25:34 +02:00
Alexei Znamensky
ac8b034061
ali_instance: fixed markups in doc (#5226)
* ali_instance: fixed markups in doc

* Update plugins/modules/cloud/alicloud/ali_instance.py

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

* Update plugins/modules/cloud/alicloud/ali_instance.py

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

* Update plugins/modules/cloud/alicloud/ali_instance.py

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

* Update plugins/modules/cloud/alicloud/ali_instance.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-04 15:23:02 +02:00
Alexei Znamensky
a481f8356e
ipwcli_dns: fixed markups in doc (#5225)
* ipwcli_dns: fixed markups in doc

* added punctuation
2022-09-04 15:21:44 +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
wilfriedroset
feabe20c63
consul: add support for session token (#5193)
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
2022-09-03 12:17:54 +02:00
PKehnel
36a7939962
Bugfix - EnvironmentError with wrong indentation (#5202)
* The EnvironmentError is now handled in the splid_pid_name function.

The error also had a wrong indentation. See previous setup with correct setup: 6a7811f696/plugins/modules/system/listen_ports_facts.py

* Add changelog fragment

* Sanity Check failed before

* Update changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml

Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-03 12:04:42 +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
Petr Lautrbach
4c52fdb9d9
seport: add local argument (#5203)
Using `local: true` users can enforce to work only with local policy
modifications. i.e.

    # Without `local`, no new modification is added when port already exists
    $ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp' localhost

    localhost | SUCCESS => {
        "changed": false,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "present"
    }

    $ sudo semanage port -l -C

    # With `local`, a port is always added/changed in local modification list
    $ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp local=true' localhost

    localhost | CHANGED => {
        "changed": true,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "present"
    }

    $ sudo semanage port -l -C
    SELinux Port Type              Proto    Port Number

    ssh_port_t                     tcp      22

    # With `local`, seport removes the port only from local modifications
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost

    localhost | CHANGED => {
        "changed": true,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "absent"
    }

    $ sudo semanage port -l -C

    # Even though the port is still defined in system policy, the module
    # result is success as there's no port local modification
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost

    localhost | SUCCESS => {
        "changed": false,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "absent"
    }

    # But it fails without `local` as it tries to remove port defined in
    # system policy
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp' localhost

    An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Port tcp/22 is defined in policy, cannot be deleted
    localhost | FAILED! => {
        "changed": false,
        "msg": "ValueError: Port tcp/22 is defined in policy, cannot be deleted\n"
    }

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
2022-09-03 11:53:57 +02:00
Markus Reiter
82d69bb871
Fix exception when agent argument is not specified. (#5194) 2022-08-28 12:03:27 +02:00
jixj5
766c109d47
Update redfish module for compatibility with VirtualMedia resource location (#5124)
* Update redfish module for compatibility with VirtualMedia resource location from Manager to Systems

* Add changelogs fragments for PR 5124

* Update some issue according to the suggestions

* update changelogs fragment to list new features in the minor_changes catagory

Co-authored-by: Tami YY3 Pan <panyy3@lenovo.com>
2022-08-24 21:36:35 +02:00
Felix Fontein
57e1e2bd8e
Fix indent. (#5177) 2022-08-24 20:47:06 +02:00
Felix Fontein
3a08903e1c
Adjust booleans in cloud modules. (#5155) 2022-08-24 20:16:25 +02:00
Felix Fontein
19ce50f6b9
Adjust booleans in misc plugins. (#5161) 2022-08-24 20:00:39 +02:00
Felix Fontein
403c4f7477
Adjust booleans in misc modules. (#5160) 2022-08-24 20:00:26 +02:00
Felix Fontein
7533f9ac26
Adjust booleans in net tools, web infrastructure, and clustering modules. (#5159) 2022-08-24 20:00:11 +02:00
Felix Fontein
675bdef190
Adjust booleans in source control modules. (#5158) 2022-08-24 19:59:56 +02:00
Felix Fontein
35a283918a
Adjust booleans in notification modules. (#5157) 2022-08-24 19:59:46 +02:00
Felix Fontein
1b480e9f37
Adjust booleans in monitoring modules. (#5156) 2022-08-24 19:59:30 +02:00
Felix Fontein
ddc989ec6d
Adjust booleans in packaging modules. (#5154) 2022-08-24 19:59:13 +02:00
Felix Fontein
be2de15c66
Adjust booleans in system modules (#5153)
* Adjust booleans in system modules.

* Fix some IP addresses

Co-authored-by: Sandra McCann <samccann@redhat.com>

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-08-24 19:59:01 +02:00
Felix Fontein
bcecf2dcdc
Adjust booleans in doc fragments. (#5152) 2022-08-24 19:58:42 +02:00
Tom Reeb
9f39294f50
adding nested try block for tss.py to import new Delinea library (#5151)
* 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>
2022-08-23 21:53:06 +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
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
Jonathan Lung
ad8965218d
Fix nsupdate when updating NS record (#5112)
* 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>
2022-08-20 13:22:13 +02:00
Markus Reiter
0be7b6e7b9
Change Proxmox agent argument to string. (#5107)
* Change Proxmox `agent` argument to string.

* Add changelog entry.

* Pass boolean directly to `proxmoxer`.
2022-08-20 13:21:07 +02:00
Alexei Znamensky
3c960ac620
pipx: add state latest (#5105)
* pipx: add state latest

* add changelog fragment

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-18 06:44:18 +02:00
Felix Fontein
a54af8909c
Fix linting errors; fix some real bugs (#5111)
* Fix linting errors.

* Fix bugs.

* Another linter error ignored.

* More fixes.

* Ignore sanity errors with older versions.

ci_complete

* Forgot to commit more changes.
2022-08-12 11:07:30 +02:00
Markus Reiter
0338eb7a7c
Fix Proxmox node, name condition. (#5108)
* Fix Proxmox `node`, `name` condition.

* Add changelog entry.
2022-08-12 14:03:57 +12:00
Alexei Znamensky
83317419d7
pipx: add required_if fo upgrade and reinstall (#5100)
* pipx: add required_if for upgrade and reinstall

* add changelog fragment
2022-08-09 10:15:51 +02:00
Felix Fontein
aab22e7f32
Add remaining copyright statements, add licenses sanity test (#5098)
* Add sanity test (currently fails).

* doc_fragments can also be non-GPLv3+.

* Replace 'Author:' by 'Copyright:' in some specific cases.

* Avoid matching string for license checkers.

* Reformulate not to throw license detection off.

* Add PSF copyright notice for plugins/module_utils/_mount.py.

* Add generic copyright notices.

* Update changelog fragment.
2022-08-08 23:23:08 +02:00
Felix Fontein
424d706f92
Fix more copyright lines, add more default copyright lines (#5095)
* Fix copyright lines.

* Add default copyright line.
2022-08-08 14:24:58 +02:00
Alexei Znamensky
2ecaa91f68
pipx: use CmdRunner (#5085)
* pipx: use CmdRunner

* added BOTMETA entry for pipx module_utils

* add changelog fragment

* add missing line

* Update plugins/module_utils/pipx.py

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

* Update plugins/module_utils/pipx.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-08 08:02:56 +02:00
Felix Fontein
2a9fd7359f
Add more license statements (#5079)
* Add more license statements. These were modified manually incorporating existing data.

* Remove accidentally added line.
2022-08-07 13:37:23 +02:00
Mike Moerk
6062ae8fae
WDC Redfish support for chassis indicator LED toggling. (#5059)
* WDC Redfish support for chassis indicator LED toggling.

* Added changelog fragment.

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-07 09:56:07 +02:00
Felix Fontein
496bf27b5c
Fix copyright lines (make sure 'Copyright' is there). (#5083) 2022-08-05 22:12:10 +02:00
Felix Fontein
1ab2a5f1bc
Add default license header to files which have no copyright or license header yet (#5074)
* Add default license header to files which have no copyright or license header yet.

* yml extension should have been xml...
2022-08-05 14:03:38 +02:00
Maxwell G
8f37638480
aix_filesystem: Fix examples (#5067)
`community.general.filesystem` is not a valid argument to
aix_filesystem.
2022-08-05 12:35:24 +02:00
Felix Fontein
123c7efe5e
Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065)
* Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt.

* Replace 'Copyright:' with 'Copyright'

sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:')

Co-authored-by: Maxwell G <gotmax@e.email>
2022-08-05 12:28:29 +02:00
Felix Fontein
f67473024d
Fix docs. (#5063) 2022-08-04 20:22:16 +02:00
Mike
4eb3540c8e
WDC Redfish firmware update support for update image creds (#5056)
Allows user to specify Basic Auth credentials for firmware update image.
2022-08-02 09:54:58 +02:00
Alexei Znamensky
5933d28dc4
xfconf: add command output to results (#5037)
* xfconf: add command output to results

* add changelog fragment

* add docs for return value cmd

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-01 11:21:06 +02:00
Jonathan Lung
ab0cd83bb1
New lookup plug-in: bitwarden (#5012)
* Basic support for Bitwarden lookups

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.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>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-08-01 10:00:05 +02:00
Jonathan Lung
e8e6b9bbd7
lastpass lookup: use config manager, improve documentation (#5022)
* LastPass lookup: use config manager, improve documentation

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

* Update changelogs/fragments/5022-lastpass-lookup-cleanup.yml

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

Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-01 09:36:07 +02:00
Dishant Pandya
88a3daf2ec
Fix: Add user-agent header to allow request through WAF with bot protection (#5024)
* Fix: Add user agent header to allow request through CDN/WAF with bot protection

* upate doc-fragment

* move http_agent variable assignment

* set http_agent param for all Keycloak API Requests

* Update plugins/doc_fragments/keycloak.py

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

* Update changelogs/fragments/5023-http-agent-param-keycloak.yml

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

* fix formatting

* Update plugins/doc_fragments/keycloak.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-01 09:35:05 +02:00
Richard Tuin
3fe9592cf1
Slack: Add support for (some) groups (#5019)
* 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>
2022-07-31 23:35:07 +02:00
PKehnel
c273498a03
Module listen ports facts extend output (#4953)
* Initial Rework of netstat and ss to include additional information.
State, foreign address, process.

* Fixed sanity tests. Python 2 compatible code. pylint errors resolved.

* Sanity tests. ss_parse fix minor error I created before.

* Rename variable for clarity

* Python2 rsplit takes no keyword argument. -> remove keyword argument

* Generic improvments for split_pid_name. Added changelog

* Sanity Test (no type hints for python2.7)

* add include_non_listening param. Add param to test. Add documentation. Only return state and foreign_address when include_non_listening

* Update changelogs/fragments/4953-listen-ports-facts-extend-output.yaml

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

* Add info to changelog fragment. Clarify documentation.

* The case where we have multiple entries in pids for udp eg: users:(("rpcbind",pid=733,fd=5),("systemd",pid=1,fd=30)) is not in the tests. So roll back to previous approach where this is covered. Fix wrong if condition for include_non_listening.

* Rewrite documentation and formatting.

* Last small documentation adjustments.

* Update parameters to match description.

* added test cases to check if include_non_listening is set to no by default. And test if ports and foreign_address exists if set to yes

* undo rename from address to local_address -> breaking change

* Replace choice with bool, as it is the correct fit here

* nestat distinguishes between tcp6 and tcp output should always be tcp

* Minor adjustments in the docs (no -> false, is set to yes -> true)

Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-31 22:12:38 +02:00
Minei3oat
9f3841703f
Pacman: Add support for install reason (#4956)
* Pacman: Add support for setting install reason

* Improved description

* Fix documentation

* Add changelog fragment

* Use source for installation

* Get all reasons at once

* Removed default for reason

* Added version info to documentation

* Fix NameError

* Moved determination of reason to _build_inventory

* Fix duplication and sanity errors

* adjust tests for changed inventory

* Documentation: remove empty default for reason

* mention packages with changed reason in exit params/info

* Added integration tests for reason and reason_for

Inspired by the integration tests for url packages

* Correct indentation

* Fix indentation

* Also sort changed packages in normal mode

* Also sort result in unit test

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-31 22:10:49 +02:00
wilfriedroset
d214f49be7
consul: add support for session TTL (#4996)
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
2022-07-31 13:17:43 +02:00
Alexei Znamensky
aba089369e
mh base: add verbosity() property (#5035)
* mh base: add verbosity property

* add changelog fragment
2022-07-31 11:28:17 +02:00
Sylvia van Os
3eb29eb4b6
Fix returnall for gopass (#5027)
* Fix returnall for gopass

Gopass was always given the --password flag, despite there being no need for this.

* Add changelog fragment

Co-authored-by: Sylvia van Os <sylvia.van.os@politie.nl>
2022-07-29 14:24:15 +02:00
Alexei Znamensky
f544aac024
gconftool2: deprecate state get (#4778)
* gconftool2: deprecate state get

* added changelog fragment

* Update plugins/modules/system/gconftool2.py

* Update plugins/modules/system/gconftool2.py
2022-07-29 11:38:37 +02:00
Felix Fontein
9290381bea
xfconf: fix setting of boolean values (#5007) 2022-07-27 07:42:25 +02:00
CactiChameleon9
be0e47bfdc
Apk: add support for a custom world file (#4976)
* Apk: add support for a custom world file

* Apk: Add changelog fragment for custom world file
2022-07-26 11:14:17 +02:00
Thomas
037c75db4f
fixing minor documentation flaws (#5000)
Co-authored-by: Thomas Blaesing <thomas.blaesing@erwinhymergroup.com>
2022-07-26 08:01:43 +02:00
Raul Gabriel Verdi
a2677fd051
Expose unredirected_headers on maven_artifact (#4812)
* Expose unredirected_headers to module

In some cases, when the initial request returns a redirect and we want
to follow it to get the artifact, we might not want to include certain
headers in the redirection request. Specially headers like
Authorization and Cookies.
Or perhaps the redirect server returns a 400 because it included some
unexpected headers.
Fetch url already supports this feature, but it was being shadowed by
maven_artifact. In here we just expose it.

* Fix Linting errors

* Applied Comments

 - Specified version added
 - Changed description of unredirected_headers

* Check for ansible version

If it's 2.11 or older, we ignore unredirected_headers, otherwise we use
it, as fetch_url has them

* Applied comments

- Removed duplicated code in the call of fetch_url. Used kwargs instead
- Added check if unredirected_params is not empty and the fetch_url
  function does not support it
- Changed function that checks for ansible version
- Removed unused import

* Remove 2.11 breaking change

Made default only for ansible-core version 2.12 and above, but for keep
it empty for ansible-core version 2.11 and below.
Also include the following changes:
  - change doc to use C() on the function description
  - changed doc to use ansible-core instead of Ansible

* Changes in description for readability

* Add changelog fragment

* Change description changelog fragment
2022-07-24 12:09:58 +02:00
Alexei Znamensky
31ef6c914b
xfconf and xfconf_info: use do_raise (#4975)
* remove redundant XfConfException class

* adjusted indentation in the documentaiton blocks

* add changelog fragment
2022-07-24 12:09:24 +02:00
Benjamin
2662bc881f
Introduce dig lookup argument fail_on_error (#4973)
with default False for backwards compatibility.

Allows fail-fast behavior on lookup failures instead of returning strings and continuing.
2022-07-24 12:08:47 +02:00
Sargun Vohra
e2426707e2
Fix keyring_info when using keyring library (#4964)
* Fix keyring_info when using keyring library

This line used to always clobber the passphrase retrieved via the `keyring` library, making it useless on everything except gnome-keyring. After this change, it'll only use the alternate method if the default one didn't work.

* delete whitespace

* add changelog fragment

* Update changelogs/fragments/4964-fix-keyring-info.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-24 12:08:12 +02:00
Florian
3204905e5c
Update to new Github account for notifications (#4986)
* Update to new Github account for notifications

* Update to new Github account for notifications
2022-07-23 13:33:13 +02:00
Minei3oat
788cfb624a
Pacman: Fix name of URL packages (#4959)
* 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.
2022-07-21 13:58:03 +02:00
miyuk
c57204f9a9
proxmox module_utils: fix get_vm int parse handling (#4945)
* 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>
2022-07-21 07:19:44 +02:00
Sylvia van Os
c31e6413f2
Fix path detection for gopass (#4955)
* Fix path detection for gopass

As per fc8c9a2286/docs/features.md (initializing-a-password-store), gopass defaults to ~/.local/share/gopass/stores/root for its password store root location.

However, the user can also override this, and this will be stored in the gopass config file (ed7451678c/docs/config.md (configuration-options)).

This patch ensures that the config setting in gopass is respected, falling back to the default gopass path. pass' behaviour remains unchanged.

* Formatting improvements

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

* Add changelog fragment

* Formatting improvement

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-07-21 07:19:31 +02:00
Mike
be70d18e3f
Redfish modules for Western Digital UltraStar Data102 storage enclosures (#4885)
* WDC Redfish Info / Command modules for Western Digital Ultrastar Data102 storage enclosures.
Initial commands include:
* FWActivate
* UpdateAndActivate
* SimpleUpdateStatus

* delete unnecessary __init__.py modules

* PR Feedback

Notes list not guaranteed to be sorted
Use EXAMPLES tos how specifying ioms/basuri
Import missing_required_lib

* Apply suggestions from code review

Suggestions that could be auto-committed.

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

* Remove DNSCacheBypass

It is now the caller's responsibility to deal with stale IP addresses.

* Remove dnspython dependency.

Fix bug that this uncovered.

* Apply suggestions from code review

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

* PR Feedback

* Documentation, simple update status output format, unit tests.

Add docs showing how to use SimpleUpdateStatus
Change the format of SimpleUpateStatus format, put the results in a sub-object.
Fix unit tests whose asserts weren't actually running.

* PR Feedback

register: result on the 2nd example

* Final adjustments for merging for 5.4.0

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-16 22:59:13 +02:00
ube
aa03c71267
proxmox inventory: fix for agent enabled (#4910)
* 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>
2022-07-12 11:03:13 +02:00
Abhijeet Kasurde
bf94f08bc4
Misc. typo fixes (#4940)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-07-08 23:11:57 +02:00
Louis Seubert
35ddf31b5f
added password prompt support for machinectl (#4849)
* added password prompt support for machinectl

* include review comments

This includes the review comments as well as changelog fragment. This also gives more information about the polkit rule.

* fix yaml doc with leftover bracket

* include review comments 2

* move regex compile to global scope
2022-07-08 23:11:14 +02:00
Evgeni Golov
a5ff53f2ae
allow configuring opentelementry callback via config file (#4916)
this is especially useful for the `enable_from_environment` option, as
this allows to set a default for the whole project, instead of relying
on everyone setting the environment variable
2022-07-07 21:51:04 +02:00
Teddy Caddy
9a928d5ffb
Fix syntax in rax_clb_nodes that breaks in Python3 (#4933)
* 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
2022-07-07 21:49:45 +02:00
antonc42
905f9ec399
fix lxd connection plugin inventory_hostname (#4912)
* 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>
2022-07-07 21:49:10 +02:00
Felix Fontein
1c06e237c8
Fix license filenames. (#4923) 2022-07-04 21:23:02 +02:00
andrii-zakurenyi
7ffa2b525c
Do not ignore tld option in DSV lookup plugin (#4911)
* 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>
2022-07-04 20:25:34 +02:00
Jacob Yundt
f60d12cf2d
Fix GetChassisPower when multiple chassis are present (#4902)
* 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>
2022-06-30 20:36:01 +02:00
Jacob Yundt
93dcd3f54d
Add GetFirmwareVersion command to redfish_info (#4900)
* Add GetManagerInventory command to redfish_info

Adding GetManagerInventory command to redfish_info, similar to
GetSystemInventory to report Manager specific information like:
- FirmwareVersion
- Model
- ManagerType

Fixes #4899

* Update changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-30 20:35:35 +02:00
Álvaro García Jaén
265c052c27
Fix command variable usage in CmdRunner (#4903)
* Fix command variable usage

* Add changelog fragment for cmd-runner bugfix (#4903)
2022-06-30 07:08:55 +02:00
Felix Fontein
2dcdd2faca
Fix various module docs. (#4887) 2022-06-22 22:43:48 +02:00
Felix Fontein
aa4c994dfd
Fix docs. (#4881) 2022-06-22 13:36:23 +02:00
Jon Ellis
97c72f88b7
Sudoers validate (#4794)
* Use visudo to validate sudoers rules before use

* Replace use of subprocess.Popen with module.run_command

* Switch out apt for package

* Check file mode when verifying file to determine whether something needs to change

* Only install sudo package for debian and redhat environments (when testing)

* Attempt to install sudo on FreeBSD too

* Try just installing sudo for non-darwin machines

* Don't validate file ownership

* Attempt to install sudo on all platforms

* Revert "Attempt to install sudo on all platforms"

This reverts commit b9562a8916.

* Remove file permissions changes from this PR

* Add changelog fragment for 4794 sudoers validation

* Add option to control when sudoers validation is used

* Update changelog fragment

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

* Add version_added to validation property

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

* Also validate failed sudoers validation error message

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

* Make visudo not executable instead of trying to delete it

* Update edge case validation

* Write invalid sudoers file to alternative path to avoid breaking sudo

* Don't try to remove or otherwise modify visudo on Darwin

* Update plugins/modules/system/sudoers.py

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

* Remove trailing extra empty line to appease sanity checker

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-21 12:41:24 +02:00
ahussey-redhat
45362d39a2
Add keyring and keyring_info modules (#4764) 2022-06-20 19:15:08 +02:00
FRUCHTiii
5e57d2af0a
redfish_command: VirtualMediaInsert does not work with Supermicro (#4839)
* bugfix virtual media support for supermicro hardware

* Added Changelog for PR4839
2022-06-20 19:13:31 +02:00
s-hamann
44e21dd407
sudoers: fix handling of state: absent (#4852) (#4853)
* sudoers: fix handling of state: absent (#4852)

* typo fixes
2022-06-19 15:34:24 +02:00
Felix Fontein
dcdfc9c413
Add PSF-license.txt for plugins/module_utils/_mount.py (#4847)
* Add PSF-license.txt for plugins/module_utils/_mount.py.

* Move other licenses to licenses/.

* Revert "Move other licenses to licenses/."

This reverts commit eab4209889.
2022-06-17 08:21:34 +02:00
grembo
006f3bfa89
passwordstore: Make compatible with shims (#4780)
* passwordstore: Make compatible with shims, add backend config

This allows using the passwordstore plugin with scripts that wrap other
password managers. Also adds an explicit configuration (`backend` in
`ini` and `passwordstore_backend` in `vars`) to set the backend to `pass`
(the default) or `gopass`, which allows using gopass as the backend
without the need of a wrapper script. Please be aware that gopass
support is currently limited, but will work for basic operations.

Includes integrations tests.

Resolves #4766

* Apply suggestions from code review
2022-06-15 08:08:04 +02:00
pastral
7f4c11cd64
Add scw_compute_private_network (#4727)
* Add scw_compute_private_network

* fix argument required and BOTMETA

* little fix in commentary/doc

* test with link for ansible-doc check

* remove unwanted file

* fix entry missing in  meta/runtime.yml

* scaleway_compute_private_network add some check in test and  some fic in doc

* a=add missing  del os.environ

* fix whitespace

* test_scaleway_compute_private_network : fix test

* test_scaleway_compute_private_network : fix pep8

* scaleway_compute_private_network

add . in description

* scaleway_compute_private_network: fix var name

* [scaleway_compute_private_network] add name for the example's task

* Update plugins/modules/cloud/scaleway/scaleway_compute_private_network.py

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

* Update plugins/modules/cloud/scaleway/scaleway_compute_private_network.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-15 08:07:02 +02:00
Alexei Znamensky
739ca737f1
cmd_runner: add __call__ method to invoke context (#4791)
* cmd_runner: add __call__ method to invoke context

* change xfconf to use the callable form

* add changelog fragment

* Update changelogs/fragments/4791-cmd-runner-callable.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-15 08:06:26 +02:00
Felix Fontein
84d8ca9234
Fix alternatives module (#4836)
* Only pass subcommands when they are specified as module arguments.

* When 'subcommands' is specified, 'link' must be given for every subcommand.

* Extend subcommand tests.
2022-06-14 16:02:31 +02:00
Pino Toscano
a45b90e93f
redhat_subscription: call 'remove' instead of 'unsubscribe' (#4809)
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'.
2022-06-14 07:26:38 +02:00
Marius Rieder
57e83ac80b
alternatives: Fix bug with priority default (#4810)
* alternatives: Fix bug with priority default

If neigther the priority nor the subcommands where specified the module decided to update the priority with the default value anyway. This resulted in bug #4803 and #4804

* Add changelog fragment.

* Distinguish None from 0.

* Address review comments.

* Update plugins/modules/system/alternatives.py

Co-authored-by: Pilou <pierre-louis@libregerbil.fr>

* Remove unrelated issues from changelog.

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Pilou <pierre-louis@libregerbil.fr>
2022-06-13 21:40:02 +02:00
geichelberger
72faebffc6
nmcli: do not convert undefined lists to empty strings (#4813)
* do not convert undefined lists to empty strings

* add changelog fragment (#4813)
2022-06-13 11:56:10 +02:00
Wouter Schoot
e51221896b
proxmox_kvm: fix typos (#4798)
* Typofix

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-13 11:55:27 +02:00
Jon Ellis
2d1e58663c
Ensure managed sudoers config files have 0440 permissions (#4814)
* 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>
2022-06-12 08:17:56 +02:00
Jeffrey van Pelt
71745b8024
Added conditional to only collect qmpstatus on qemu VMs (#4816)
* Added conditional to only collect qmpstatus on qemu VMs

* Processed feedback, added changelog

* Initial change to unit tests

* Made Sanity tests happy again

* Missed a function call, removed superfluous function

* Derp, no need to mock get_vm_status anymore

* Added detail checks whether hosts are mapped to the paused/prelaunch groups

* Fix sanity check

* Processed feedback

* Processed feedback - noqa
2022-06-11 13:46:17 +02:00
José Roberto Emerich Junior
e5e485390d
add support to create L2TP and PPTP VPN connection (#4746)
* add support to create L2TP and PPTP VPN connection

* 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>

* 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>

* 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>

* 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>

* apply changes pointed on tests and review

- add changelog fragment
- change example code to use jinja2 in place of shell command

* removes trailing whitespace

* 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>

* removes linux command from examples

* remove unnecessary brakets

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

* remove unnecessary brakets

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

* simplify psk encoding on example

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>

* add unit tests

- test unchenged l2tp and pptp vpn connections
- test create l2tp and pptp vpn connections
- fix is_connection_changed to remove default ifname attribuition

* improve tests on vpn.data param

- fix _compare_conn_params to handle vpn.data as lists

* removes block and set_fact from example

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

* makes line shortter to better reading

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

* Update plugins/modules/net_tools/nmcli.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-06 21:16:27 +02:00
Alexei Znamensky
8ba3d94740
xfconf module utils: providing a cmd_runner object (#4776)
* xfconf: changed implementation to use cmd_runner

* added module_utils/xfconf.py

* xfconf_info: using cmd_runner

* added module_utils to BOTMETA.yml

* added changelog fragment

* use cmd_runner_fmt instead of deprecated form
2022-06-06 10:38:46 +02:00
Marius Rieder
373da56b5b
Add subcommands parameter for module alternatives. (#4654)
* Add slaves parameter for module alternatives.

* alternatives: Improve documentation abous slaves parameter

* alternatives: Apply suggestions from code review

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

* alternatives: Add schangelog for slaves parameter

* alernatives: Add integration tests

* alternatives: Improv tests

* alternatives: Update tests/integration/targets/alternatives/tasks/slaves.yml

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

* alternatives: Rework logic to support updating priority and subcommands

* alternatives: Use more inclusive naming

* alternatives: Fix linter warnings

* alternatives: Dont fail if link is absent

* alternatives: Update changelog fragment

* alternatives: Add tests for prio change and removing

* alternatives: Apply suggestions from code review

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

* alternatives: Add `state=auto`to reset mode to auto

* alternatives: Fix linter warnings

* alternatives: Fix documentation.

* alternatives: Combine multiple messages.

* alternatives: Set command env for all commands.

* alternatives: Do not update subcommands if parameter is omited

* alternatives: Fix a bug with python 2.7 var scoping

* alternatives: Improce diff before generation

* alternatives: Fix linter warnings

* alternatives: Fix test names

* alternatives: Simplify subcommands handling and improve diffs

* aliases: Only test for subcommand changes if subcommands parameter is set.

* Update plugins/modules/system/alternatives.py

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

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-06 10:33:39 +02:00
Ge0rgi0s
62ff263ac1
Add puppet confdir option (#4740)
* Add puppet confdir option

* Add puppet confdir option change fragment

* Improve quoting in plugins/modules/system/puppet.py

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

* Add version_added to plugins/modules/system/puppet.py

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

Co-authored-by: Georg Vogt <georg.vogt@tngtech.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-06 10:32:20 +02:00
Alexei Znamensky
b87edda3c7
ModuleHelperException module utils - improved exception initialization (#4755)
* 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>
2022-06-06 10:30:55 +02:00
Alexei Znamensky
2d38c8d892
cmd_runner: deprecate fmt as the name for the format class (#4777)
* cmd_runner: deprecate fmt as the name for the format class

* added changelog fragment

* fixing the deprecation comment
2022-06-05 18:37:59 +02:00
Ilija Matoski
b556b142ec
Proxmox Inventory: added new statuses for qemu (#4723)
* added new statuses for qemu

* added document fragment

* lint fixes

* replaced f strings with %

* move the qmpstatus for qemu to a dedicated group

* added documentation to explain the new addition

* update changelog fragment to reflect the change correctly

* update changelog fragment to reflect the change correctly

* Apply suggestions from code review

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

* added a switch to get the qemu extended status

* Apply suggestions from code review

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

* groups created when qemu_extended_statuses is true and added tests to make sure they are there

* added test to make sure the groups are not present when qemu_extended_statuses is false

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-04 09:15:02 +02:00
Alexei Znamensky
d019e22e7d
ansible_galaxy_install: minor improvements based on MH updates (#4752)
* ansible_galaxy_install: minor improvements based on MH updates

* added changelog fragment
2022-06-04 09:14:17 +02:00