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

2075 commits

Author SHA1 Message Date
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
Felix Fontein
0e9cd5e6b6
Ignore mpdehaan in BOTMETA. (#5524) 2022-11-09 18:37:43 +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
Sam Doran
eae33c20f6
Actually sort the fixtures (#5510)
* Actually sort the fixtures

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

* Sort by class name
2022-11-09 07:28:14 +01:00
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
Felix Fontein
df9c5d1d35 Add stable-6 to nightlies. 2022-11-07 21:51:24 +01:00
Felix Fontein
16cd2ae76e Next expected release will be 6.1.0. 2022-11-07 21:33:42 +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
Felix Fontein
90ac53d150 Drop stable-3 from weekly CI; migrate stable-4 from nightly to weekly. 2022-11-06 12:52:45 +01:00
Felix Fontein
f4bad50bbb Prepare 6.0.0 release. 2022-11-06 11:48:14 +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
Alexei Znamensky
fc817601bc
django_manage: add extra tests (#5476) 2022-11-06 11:38:38 +01:00
Sam Doran
be0b5e5f8c
onepassword - Support v2 (#4728)
* Begin building out separate classes to support  different op cli versions

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

* First pass at mostly working CLI version classes

* Correct mismathched parameters

* Update _run() method to allow updating enviroment

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

* Continuing to improve the interface

* Tear existing tests down to the studs

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

* Fix sanity test

* CLI config file path can be None

* Improve required param checking

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

* Change assert_logged_in() method return value

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

* Improve full login for v2

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

* Remove unused methods

* Add some tests

* Fix linting errors

* Move fixtures to separate file

* Restructure mock test data and add more tests

* Add boilerplate

* Add test scenario for op v2 and increase coverage

* Fix up copyright statements

* Test v1 and v2 in all cases

* Use a more descriptive variable name

* Use docstrings rather than pass in abstract class

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

* Increase test coverage for CLI classes

* Sort test parameters to avoid collection errors

* Update version tested in docs

* Revere test parameter sorting for now

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

* Allow passing kwargs to the lookup module under test

* Favor label over id for v2 when looking for values

Add tests

* Display a warning for section on op v2 or greater

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

* Move test cases to their own file

Getting a bit unwieldy having it in the test file

* Move output into JSON files fore easier reuse

* Switch to using get_options()

* Add licenses for fixture files

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

* Rearrange fixtures

* Add changelog

* Move common classes to module_utils

* Move common classes back to lookup

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

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

* Properly handle sections

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

* Remove some comments that won’t be addressed

* Make test gathering more deterministic to avoid failures

* Update changelog fragment

* Simple fix for making tests reliable
2022-11-06 11:32:35 +01:00
Felix Fontein
5af84e57e4
Sort BOTMETA. (#5474) 2022-11-05 22:31:39 +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
Alexei Znamensky
8dc82b1890
sorted content of sanity/ignore-*.txt files (#5473) 2022-11-05 11:35:39 +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
Guillaume MARTINEZ
c181f2dd08
[Scaleway] Fix function namespace integration tests assertions (#5464)
Signed-off-by: Lunik <lunik@tiwabbit.fr>

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2022-11-03 06:45:37 +01:00
Felix Fontein
524fdf234b The next expected release is 6.0.0. 2022-11-02 22:30:02 +01:00
Felix Fontein
012896da18 Release 6.0.0-a1. 2022-11-02 21:49:29 +01:00
Felix Fontein
32ce09504c Fix version. 2022-11-02 21:47:05 +01:00
Felix Fontein
9d34636edc Prepare 6.0.0a1 release. 2022-11-02 21:45:27 +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