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

810 commits

Author SHA1 Message Date
Alexei Znamensky
7da2c16b4a
added supports_check_mode=True to info/facts modules (#3084)
* added supports_check_mode=True to info/facts modules

* added changelog fragment

* rolled back vertica_info

* rolled back utm_proxy_*_info

* updated changelog fragment with latest adjustments

* Update changelogs/fragments/3084-info-checkmode.yaml

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

* added check mode to xenserver_facts + oneview_*_info

* added check mode to utm_proxy_*_info

* updated changelog

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-27 18:24:29 +02:00
quidame
21d5668c97
java_cert: import certificate+key bundle from pkcs12 (#3080)
* import certificate+key bundle from pkcs12

* fix typo/syntax

* fix variable name

* fix passwords order and improve error handling

* add changelog fragment

* enter keystore pass only once if keystore already exists, and twice at creation

* nomalize tests

- Replace `command` tasks by dedicated (community.crypto) modules.
- Add spaces around jinja2 variable names.
- Call modules by their FQCNs.

* Add tests to check keystore has a private key

fix tests for RedHat/CentOS < 8 (run openssl command as an alternative to
`openssl_pkcs12` module)
2021-07-26 11:42:13 +02:00
Yvan Watchman
ac03881002
Succesful clone from proxmox_kvm should return new vm id, not id from cloned vm. (#3034)
* Clone sucess should return new vm id, not id from cloned vm.

* add changelog fragment

* Update changelogs/fragments/3034-promox-kvm-return-new-id.yaml

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

Co-authored-by: Yvan E. Watchman <git@yvanwatchman.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-26 06:33:01 +02:00
Alexei Znamensky
c8b2d7c1e5
supervisorctl - bugfix + using ansible validation + pythonification (#3068)
* supervisorctl - bugfix + pythonification

* added changelog fragment

* rollback check on the binpath
2021-07-25 22:04:23 +02:00
Alexei Znamensky
95ceb53676
taiga_issue - bugfix + pythonification (#3067)
* taiga_issue - bugfix + pythonification

* added changelog fragment
2021-07-25 22:03:45 +02:00
Alexei Znamensky
d54d2fa4a6
xfconf - deprecate get state in favour of the xfconf_info module (#3049)
* Deprecate get state in favour of the xfconf_info module

* added changelog fragment

* added comments in ignore files

* Update changelogs/fragments/3049-xfconf-deprecate-get.yaml

bummer, forgot that

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

* Update plugins/modules/system/xfconf.py

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

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-25 11:14:30 +02:00
Ajpantuso
31189e9645
archive - fixing determination of archive root when root is '/' (#3036)
* Initial commit

* Fixing units and path joins

* Ensuring paths are consistently ordered

* Adding changelog fragment

* Using os.path.join to ensure trailing slashes are present

* optimizing use of root in add_targets

* Applying initial review suggestions
2021-07-24 22:10:56 +02:00
Max Bidlingmaier
d057b2e3b2
gitlab_group_members/gitlab_project_members - fix pagination issue (#3054)
* Fix

* fixed linter stuff

* typo in section name of changlog fragment

Co-authored-by: Max Bidlingmaier <Max-Florian.Bidlingmaier@sap.com>
2021-07-24 21:13:09 +02:00
The Right Honourable Reverend
99c28313e4
proxmox inventory plugin: Easy fix (#3052)
* Don't know why this works but it does.

Plugin was crashing on this line on Python 3.9.2 deployed on qemu image with debian bullseye. It doesn't crash anymore.

* Create 3052_proxmox_inventory_plugin.yml

* Update changelogs/fragments/3052_proxmox_inventory_plugin.yml

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-07-24 20:40:08 +02:00
Jeffrey van Pelt
32e9a0c250
Proxmox inventory: Added snapshots fact (#3044)
* Added snapshots fact

* Added changelog

* Made linter happy again

* Processed feedback

* Fix changelog type

* Punctuation ;-)

* Punctuation ;-), take 2
2021-07-22 22:55:07 +02:00
Max Bidlingmaier
38e70ae0e4
github_repo: support GitHub on premise installations (#3039)
* added possibility to manage on prem github

* added changelog

* fixed module tests

* Update changelogs/fragments/3038-enhance_github_repo_api_url.yml

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

* Update plugins/modules/source_control/github/github_repo.py

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

Co-authored-by: Max Bidlingmaier <Max-Florian.Bidlingmaier@sap.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-22 16:55:09 +02:00
suukit
a3607a745e
Feature/gitlab project configuration (#3002)
* added
-         only_allow_merge_if_all_discussions_are_resolved
- only_allow_merge_if_all_discussions_are_resolved
- only_allow_merge_if_pipeline_succeeds
- only_allow_merge_if_pipeline_succeeds
- packages_enabled
- remove_source_branch_after_merge
- squash_option

* minor fix

* added changelog

* Fixedlinter findings

* changed version_added to 3.4 -> check requires to do so

* Update changelogs/fragments/3001-enhance_gitlab_module.yml

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

* Update plugins/modules/source_control/gitlab/gitlab_project.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project.py

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

* rework due to review of felixfontein:
- changed option description to full sentences
- change default behaviour of new properties

* Requested changes

Co-authored-by: Max Bidlingmaier <Max-Florian.Bidlingmaier@sap.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-19 11:52:32 +02:00
Ajpantuso
9fd2ba60df
archive - staging idempotency fix (#2987)
* Initial Commit

* Fixing PY26 filter

* Adding changelog fragment

* Removing checksum related code

* Removing list comparisons due to Jinja errors

* Applying review suggestions

* Applying review suggestions - typos
2021-07-19 08:14:23 +02:00
Felix Fontein
7b9687f758
Fix snap's channel option. (#3028) 2021-07-19 13:36:59 +12:00
Scott Seekamp
ea822c7bdd
Redfish Bootoverride Disable behaves incorrectly (#3006)
* https://github.com/ansible-collections/community.general/issues/3005

Bypass the boot device argument check when the command is: DisableBootOverride
as it isn't needed to perform this operation.

* Add changelog fragment
2021-07-16 19:02:34 +02:00
Alexei Znamensky
a3a40f6de3
pamd - fixed single line issue (#2989)
* fixed pamd single line issue

* added changelog fragment

* supported case for 0 lines, improved test
2021-07-14 13:04:35 +02:00
omula
9ffc1ef393
[nmcli] add runner and runner-hwaddr-policy for network teaming (#2901)
* [nmcli] add runner and runner-hwaddr-policy for network teaming

* [nmcli] delete extra space

* Update plugins/modules/net_tools/nmcli.py

* Update plugins/modules/net_tools/nmcli.py

* [nmcli] add changelog fragment

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Oriol MULA VALLS <oriol.mula@lxp.lu>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-07-14 08:24:27 +02:00
Gaetan2907
3fc97bf80a
Keycloak: Improve diff mode on keycloak_authentication module (#2963)
* Fix diff mode when updating authentication flow with keycloak_authentication module

* Add changelog fragment

* Fix unit test

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update changelogs/fragments/2963-improve-diff-mode-on-keycloak_authentication.yml

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update documentation of create_or_update_executions function (return tuple instead of dict)

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-07-13 06:57:16 +02:00
Alexei Znamensky
c5cbe2943b
module_helper cmd - added feature flag to control whether CmdMixin adds rc, out and err t… (#2922)
* added feature flag to control whether CmdMixin adds rc, out and err to the result of the module

* added changelog fragment

* changed from a global flag to parameters in run_command

* updated changelog

* fixed brainless copy-paste of yours truly
2021-07-11 11:43:40 +12:00
Tyler Schwend
7a41833e59
feat: support datadog_monitor composite type (#2958)
* feat: support datadog_monitor composite type

* docs: note support for composite types

* lint

* lint: line lengths

* doc: changelog frag
2021-07-10 19:24:09 +02:00
Ajpantuso
111c5de550
proxmox inventory - fix parsing for offline nodes (#2967)
* Initial commit

* Adding changelog fragment

* Applying initial review suggestions
2021-07-10 16:39:51 +02:00
quidame
9023d4dba1
filesystem: extend support for FreeBSD (#2902)
* extend support for FreeBSD

* Check if FS exists with `fstyp` if `blkid` fails to find FS signature
  (fix a potential data loss)
* Add support for FreeBSD special devices (character devices).
* Add support for FreeBSD native fstype (UFS).
* Update DOCUMENTATION accordingly.

* add/update integration tests

* Add tests for `fstype=ufs` on FreeBSD.
* Run `remove_fs` tests (`state=absent`) on FreeBSD.
* Run `overwrite_another_fs` tests on FreeBSD.

* add a changelog fragment

* fix indentation

* restrict new tests to regular files

* fix typo

* fix searching of providersize (block count)

* add '-y' option to growfs command

* remove references to versions older than the collection itself

* bump version adding new feats to 3.4.0

* reformat *collection* and *version added* for better DOCUMENTATION parsing

* skip tests for FreeBSD < 12.2

* run tests for FreeBSD >= 12.2

* re-enable tests for FreeBSD < 12.2 and give it a try with group1

* util-linux not available on FreeBSD < 12.2
2021-07-10 16:37:31 +02:00
Alexei Znamensky
0e90ff48b5
rax_mon_notification_plan - fixed validation check (#2955)
* fixed validation-modules for plugins/modules/cloud/rackspace/rax_mon_notification_plan.py

* fixed sanity check

* added changelog fragment
2021-07-10 13:05:20 +02:00
Alexei Znamensky
1990f79d8a
launchd - fixed validation check (#2960)
* replaced use of expanduser() with value from HOME var

* fixed sanity check

* added changelog fragment
2021-07-10 13:03:41 +02:00
Ajpantuso
288fe1cfc6
archive - adding dest_state return value and enhancing integration tests. (#2913)
* Initial commit

* Adding changelog fragment

* fixing changelog fragment

* Updating documentation

* Applying review suggestions
2021-07-10 12:58:30 +02:00
Gaetan2907
1b80a9c587
Add option to the keycloak_client module (#2949)
* Add authentication_flow_binding_overrides option to the keycloak_client module

* Add changelog fragment

* Update changelogs/fragments/2949-add_authentication-flow-binding_keycloak-client.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Add unit test authentication_flow_binding_overrides feature on keycloak_client module

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-07-09 08:33:35 +02:00
Tong He
d97a9b5961
jenkins_job_info: Remove necessities of password or token. (#2948)
* Remove necessities on password or token.

* Upper case letter -> Lower case letter

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Documentation update.

* C -> I

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-07-09 08:32:46 +02:00
Alexei Znamensky
56acd4356f
MH - dicts and lists change-tracking is fixed (#2951)
* dicts and lists change-tracking is fixed

* added changelog fragment

* fixed sanity check
2021-07-08 07:20:01 +02:00
Amin Vakil
c0740ca398
pacman: fix changed status when ignorepkg has been defined (#2936)
* pacman: fix returned code when ignorepkg has been defined

* add changelog

* make ignored check preciser
2021-07-06 22:06:36 +02:00
Amin Vakil
b2b4877532
lvol: honor check_mode on thinpool (#2935)
* lvol: support check_mode on thinpool

* add changelog

* Add %s when needed

* correct changelog sentence

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-05 20:46:19 +02:00
Alexei Znamensky
9b02230477
snap - fixed param order (#2918)
* fixed param order

* added changelog fragment

* rebased and uncommented tests per PR

* added /snap link in RH

* typo in tests

* Update tests/integration/targets/snap/tasks/default.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-03 16:31:30 +02:00
Shahar Mor
a0915036f9
npm - fix installing from package.json (#2924)
correctly handle cases where a dependency does not have a `version` property because it is either missing or invalid
2021-07-02 21:42:50 +02:00
Ajpantuso
ffe505a798
archive - fix removal failures for nested files with tar archives (#2923)
* Initial commit

* Adding changelog fragment
2021-07-02 21:30:40 +02:00
Felix Fontein
c63dc624b7
Fix snap module, and module helper behavior on rc != 0 in output (#2912)
* Try some snap fixes.

* Fix logic.

* Try to run tests privileged.

* Prevent failure on rc != 0.

* Fix formatting.

* Revert "Try to run tests privileged."

This reverts commit 77ca91f502.

* Try to run tests on RHEL instead.

* Make sure that snapd is running.

* Add changelog fragment.

* str -> to_native.

* Make sure that installed binary is actually found.

* Add check mode tests.

* Mention #2835 in changelog fragment.
2021-07-01 18:53:48 +02:00
Gaetan2907
0e829e6a23
Fix bug when 2 identical executions in same auth flow (#2904)
* Fix bug when 2 identical executions in same auth flow

* Add changelog fragment

* Fix unit tests

* Update changelogs/fragments/2904-fix-bug-when-2-identical-executions-in-same-auth-flow.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-30 15:01:17 +02:00
NivKeidan
9c7b539ef6
Add fallback url for jenkins plugin (#1334)
* uncoupled updates_url from plugin download urls
added new parameters: versioned_plugins_url, latest_plugins_url

* parameters updates_url, latest_plugins_url and versioned_plugins_url changed type to list of strings to implement fallback URLs usage
added type conversion if they are string (backward compatibility)

* removed type conversion this is handled by ansible validation
fix: dont fail if first url fails

* added fallback: if installation from plugin manager fails, try downloading the plugin manually

* fixed test failures

* PEP8 indent fix

* changelog fragment

* added debug outputs for new url fallback behavior

* added version_added in description for latest_plugins_url

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

* added version_added in description for versioned_plugins_url

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

* Update changelogs/fragments/1334-jenkins-plugin-fallback-urls.yaml

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

* improve backwards-compatibility
add optional arg to allow custom update-center.json targets

* pep8 fixes

* fix inconsistency in argument documentation

* Apply suggestions from code review

Co-authored-by: Amin Vakil <info@aminvakil.com>

* add unit tests

* fix pep8

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-29 10:26:59 +04:30
omula
2d1527a564
[nmcli] add connection.slave-type for teamed devices (#2827)
* [nmcli] add connection.slave-type for teamed devices

* [nmcli] add fragment with changes for #2827

* [nmcli] add tests for network team

* [nmcli] fix testing

Co-authored-by: Oriol MULA VALLS <oriol.mula@lxp.lu>
2021-06-28 20:46:44 +02:00
Amin Vakil
0a9cf38118
yum_versionlock: fix idempotency when using wildcard (asterisk) (#2787)
* Check idempotency on yum_versionlock

* Lock packages wildcard

* fix formatting

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

* Fix formatting in asserts

* little closer but not still there

* Import fnmatch

* Change check_mode logic

* Add check_mode for add

* Add changelog

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-27 16:40:49 +02:00
Stef Graces
c7cf6f2eb7
gitlab_project - Add ability to create project under a user (#2824)
* Add ability to create project under a user

* Add changelog

* Add username option

* Update changelogs/fragments/2824-gitlab_project-project-under-user.yml

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

* Make group and username mutually exclusive

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-27 18:39:41 +04:30
quidame
199ead85d0
java_keystore: fix keystore type (#2516)
* fix keystore type; update unit tests

* add changelog fragment

* document new param 'keystore_type'

* add keystore_type support (backward compatible)

* check JKS format with magic bytes
* update integration tests
* revert first changes in unit tests
* update changelog fragment

* fix magic bytes for python2/python3

* fix integration tests (irrelevant check_mode)

* fix unit test (keystore removed before failure => changed=true)

* fix typo

* fix spelling

* shorten a branch

* mock is_jks_or_pkcs12

* fix function path in unit tests

* Apply suggestions from code review (spelling)

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* rename a method (module + unit tests)

* move ArgumentSpec class content to main()

* refactor create() to not loose existing keystore in case of error

* update unit tests

* add integration test (error handling)

* fix keystore backup cleanup

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-06-27 14:56:43 +02:00
Stef Graces
2fb0877577
Fix/gitlab project user workspace (#2881)
* Add ability to create project under a user

* Add changelog

* Change minor_changes in changelog

As suggested in this comment https://github.com/ansible-collections/community.general/pull/2824#discussion_r653411741

* Fix user's namespace

* Delete changelog

* Add changelog

* Fix changelog

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>

* Change user_group_id to namespace_group_id

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

* Change to namespace_id

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-27 16:31:06 +04:30
Alexei Znamensky
9dd91f949a
terraform - added check_destroy (#2874)
* added check_destroy

This is based on the work done in PR 398. Authors from that PR:

Co-authored-by: effaamponsah <kamponsah.amponsah@gmail.com>
Co-authored-by: m-yosefpor
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* added changelog fragment

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update changelogs/fragments/2874-terraform-check-destroy.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: effaamponsah <kamponsah.amponsah@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-27 12:38:04 +02:00
Felix Fontein
147425ef93
ini_file: fix regression reported in #2578 (#2875)
* Add regression test.

* Add more Unicode tests.

* Add fix.

* Add changelog.

* Work completely with Unicode.

* Update plugins/modules/files/ini_file.py

Co-authored-by: quidame <quidame@poivron.org>

Co-authored-by: quidame <quidame@poivron.org>
2021-06-27 10:00:01 +02:00
Felix Fontein
1b94d09209
Add option type validation. (#2878) 2021-06-27 09:57:51 +02:00
Alexei Znamensky
acf7b106c9
_mount module utils - fixed sanity checks (#2883)
* updated _mount.py, removed ignore lines

* added changelog fragment
2021-06-27 09:39:08 +02:00
Felix Fontein
fafabed9e6
Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877)
* Replace ansible.module_utils._text by ansible.module_utils.common.text.converters.

* Also adjust tests.
2021-06-26 23:59:11 +02:00
Ajpantuso
d180390dbc
modprobe - fix task status when module cannot be loaded (#2843)
* Initial Commit

* Adding changelog fragment

* Ensured params are present during verbose output and enhanced check_mode

* Making specific to builtins

* Removing unneccessary external call

* Acutal bugfix
2021-06-26 23:27:41 +12:00
Felix Fontein
2d1f5408d3
Redis: slave -> replica (#2867)
* Redis: slave -> replica

* Fallback for old Redis versions in CI.
2021-06-24 22:33:29 +02:00
Ajpantuso
24dabda95b
archive - refactor and bugfix (#2816)
* Initial Commit

* Further refinement

* Fixing archive name distortion for single file zips

* Applying initial review suggestions

* Updating path value for single target

* Adding test case for single target zip archiving

* Fixing integration for RHEL/FreeBSD on ansible 2.x

* Fixing integration second attempt

* Adding changelog fragment

* Updating changelog fragment
2021-06-24 13:33:10 +02:00
Tong He
860b2b89a3
jenkins_build: Support stop a running Jenkins build (#2850)
* Support stop a running Jenkins build. Meanwhile enrich document content and test cases.

* Fix the inconsistencies regarding the function name.

* Submit the changelog and fix a PEP8 issue.

* Remedy whitespace related PEP8 issues.

* Implement the idempotent test case for the stop build function.

* Make sure it returns proper changed status when we stop a build repeatedly.

* Fix incorrect usages on comparison with True or False and incorrect usages on validating the changed status.

* In this mocking situation, adjust the mock return value and test case to perform unit testing.

* Implement JenkinsMockIdempotent() to mock return value in idempotent test cases.

* Fix issues reported by CI.

* Refactor the code to avoid CI exception and remove get_build_status() from mock function as they should not be there.

* Update plugins/modules/web_infrastructure/jenkins_build.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-23 23:29:50 +02:00
Lennert Mertens
d6d0b6f0c1
gitlab_user: add support for identity provider (#2691)
* Add identity functionality

* Add functionality for user without provider or extern_uid

* Fix missing key error and documentation

* Fix failing tests

* Update docs

* Add changelog fragment

* Update plugins/modules/source_control/gitlab/gitlab_user.py

Add version

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

* Update plugins/modules/source_control/gitlab/gitlab_user.py

Update boolean default

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

* Update plugins/modules/source_control/gitlab/gitlab_user.py

Fix syntax

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

* Update plugins/modules/source_control/gitlab/gitlab_user.py

Remove no_log

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

* Update changelogs/fragments/2691-gitlab_user-support-identity-provider.yml

Update syntax

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

* Update plugins/modules/source_control/gitlab/gitlab_user.py

Update syntax

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

* Update docs

* Add functionality to add multiple identities at once

* Fix identity example

* Add suboptions

* Add elements

* Update plugins/modules/source_control/gitlab/gitlab_user.py

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

* Apply comma's at the end of dictionaries

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

* Add check mode

* Change checkmode for user add and identity delete

* Update plugins/modules/source_control/gitlab/gitlab_user.py

* Update changelogs/fragments/2691-gitlab_user-support-identity-provider.yml

Add more features to changelog as suggested here https://github.com/ansible-collections/community.general/pull/2691#discussion_r653250717

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

* Add better description for identities list and overwrite_identities boolean

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

Co-authored-by: lennert.mertens <lennert.mertens@nubera.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: stef.graces <stef.graces@nubera.eu>
Co-authored-by: Stef Graces <stefgraces@hotmail.com>
Co-authored-by: Stef Graces <sgraces@sofico.be>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-06-21 21:32:07 +02:00
Stanislav German-Evtushenko
ce35d88094
gem_module: Add bindir option (#2837)
* gem_module: Add bindir option

This option allows to specify directory to install executables, e.g.
`/home/user/bin` or `/home/user/.local/bin`. This comes especially handy
when used with user_install option as the default path of executables is
not in PATH.

* Update changelogs/fragments/gem_module_add_bindir_option.yml

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* gem_module: Integration tests for bindir option

* gem_module: Update Integration tests for bindir option

* gem_module: Update Integration tests for bindir option

Make sure gist is not installed system-wide prior the tests

* Revert "gem_module: Update Integration tests for bindir option"

This reverts commit 04eec6db27.

* Do not check "install_gem_result is changed" for ansible develop on openSUSE

* Revert "Do not check "install_gem_result is changed" for ansible develop on openSUSE"

This reverts commit 48ecb27889.

* gem_module: Use --norc to avoid surprises

Run install and uninstall actions with `--norc`. This way ansible has
more control over the way gems are installed.

* Revert "gem_module: Use --norc to avoid surprises"

This reverts commit 66f40bcfe6.

* gem_module: bindir - Ignore openSUSE Leap

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

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

* gem_module: Use --norc to avoid surprises

Run install and uninstall actions with `--norc` when supported (rubygems >= 2.5.2).
This way ansible has more control over the way gems are installed.

* Try distutils.version instead of packaging

* ver is an list, not string

* ver is not list either but tuple

* Update changelogs/fragments/gem_module_add_bindir_option.yml

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

* ver can be None (when can this happen?)

* gem: Add norc option

* Apply suggestions from code review

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

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

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

* Use tuples to compare versions

* Apply suggestions from code review

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

* lost norc option check is back

* Move handling norc option to separate function

* cosmetic

* fix for the previos commit

* Apply suggestions from code review

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

* Cache result of get_rubygems_version

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-21 19:53:03 +12:00
Alexei Znamensky
519411e026
ali_instance_info - marked parameters for deprecation in c.g. 5.0.0 (#2844)
* marked parameters for deprecation in c.g. 5.0.0

* added changelog fragment

* deprecate params in arg_spec

* doc adjusment per PR
2021-06-20 13:17:58 +02:00
Alexei Znamensky
2768eda895
serverless - deprecating unused param (#2845)
* deprecating unused param

* added changelog fragment

* deprecate param in arg_spec

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-20 13:07:45 +02:00
Anup Chenthamarakshan
db713bd0f5
proxmox_kvm: Fix ZFS device string parsing (#2841)
ZFS-backed block devices may contain just the bare device name and
not have extra options like `,size=foo`, `,format=qcow2` etc. This
breaks an assumption in existing regex (which expects a comma).

Support such device strings and add a couple of testcases to validate.
2021-06-20 12:42:19 +02:00
Felix Fontein
08f7ad06be
Remove inventory and vault scripts (#2696)
* Remove inventory and vault scripts.

* Remove foreman inventory script tests.
2021-06-19 15:06:58 +02:00
omula
67cabcb2aa
Nmcli add options (#2732)
* [nmcli] add new network configuration options

* [nmcli_add_options] add documentation for new parameters nad add disabled method for IPv6

* [nmcli] fix and version adding. Add changelog fragment

* Update plugins/modules/net_tools/nmcli.py

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

* Update changelogs/fragments/2732-nmcli_add_options.yml

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

* Update changelogs/fragments/2732-nmcli_add_options.yml

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

* [nmcli_add_options] fix testing

* 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 changelogs/fragments/2732-nmcli_add_options.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Oriol MULA VALLS <oriol.mula@lxp.lu>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-19 14:42:05 +02:00
Shahar Mor
1ed4394c5e
npm - fix updating version specific modules (#2830)
* npm - fix updating version specific modules

if a version specific module is used, the comparison will be used with the version and not only by name

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update changelogs/fragments/2830-npm-version-update.yml

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update changelogs/fragments/2830-npm-version-update.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update changelogs/fragments/2830-npm-version-update.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-18 22:08:46 +02:00
TizeN85
ee23c26150
fix sudorule_add_allow_command_group (#2821)
* fix sudorule_add_allow_command_group

fix sudorule_add_allow_command_group is not working on freeIPA 4.8.7 at least, sudorule_add_allow_command should be used instead with item sudocmdgroup

* Added changelog fragment
2021-06-17 19:08:42 +02:00
Anas
c9cf641188
datadog_event : Adding api_host as an optional parameter (#2775)
* 2774 Module datadog_event _ Adding api_host as an optional parameter

* Update changelogs/fragments/2774-datadog_event_api_parameter.yml

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

* Update plugins/modules/monitoring/datadog/datadog_event.py

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

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update plugins/modules/monitoring/datadog/datadog_event.py

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

* Update plugins/modules/monitoring/datadog/datadog_event.py

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

* Update plugins/modules/monitoring/datadog/datadog_event.py

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

* Update plugins/modules/monitoring/datadog/datadog_event.py

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

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Anas Hamadeh <anas.hamadeh@klarna.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-17 19:05:35 +02:00
Alexei Znamensky
3997d5fcc8
flatpak - allow to add/remove multiple flatpaks at once (#2521)
* reviving flatpack PR

* added changelog fragment

* adjusted integration tests per PR

* adjusted examples to use the full name of the module

* Use new local artifacts.

* Re-add StrictVersion import.

* Try to clean up PR.

* ...

* Use original name in installed/not installed list.

* More fixes.

* Work around flatpak bug.

* Fix bug I introduced.

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-17 08:00:49 +02:00
Ajpantuso
3ca98c2edd
callback_splunk - Add user-configurable event correlation id (#2790)
* Initial commit

* Adding changelog fragment

* Updating batch description

* Update plugins/callback/splunk.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-16 22:28:09 +04:30
Tong He
2f2f384b4e
redhat_subscription: Add server_prefix and server_port as supported arguments (#2779)
* Add server_prefix and server_port as supported arguments for the redhat_subscription module.

* Adjust the argument sequence in the test case to be consistent with the original code in line 364 in redhat_subscription.py and add the changelog fragment.

* Grammatical changes such as adding full stops and using 'an HTTP' instead of 'a HTTP'.

* Commit the suggested changelog update.

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Fix typo.

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-16 11:31:54 +04:30
Abhijeet Kasurde
0bd345bfb0
timezone: change warning to debug (#2789)
* timezone: change warning to debug

Convert warning message to debug when timedatectl found but not usable.

Fixes: #1942

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* add changelog entry

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-14 18:22:01 +02:00
Loïc
c2ce7a0752
[scaleway inventory] Fix JSON object must be str, not 'bytes' (#2771)
* Fix JSON object decoding

* Code improvement : python 3.5 fix

* Add changelog fragment

* Update changelogs/fragments/2771-scaleway_inventory_json_accept_byte_array.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-11 13:05:29 +02:00
Amin Vakil
dab5d941e6
Add domain option to onepassword lookup (#2735)
* Add domain to onepassword lookup

* Add changelog

* Add default to domain documentation

* Improve format

* Fix sanity issue

* Add option type to documentation

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

* Add domain to init

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-08 11:41:21 +02:00
Felix Fontein
bb37b67166
flatpak: add tests in CI, add no_dependencies parameter (#2751)
* Similar version restrictions than flatpak_remote tests.

* ...

* Try to work around missing dependencies.

* Revert "Try to work around missing dependencies."

This reverts commit 66a4e38566.

* Add changelog.

* App8 -> App2; make sure that there are two apps App1 and App2.

* Fix forgotten variabe.

* Remove test notices.

* Seems like flatpak no longer supports file:// URLs.

The tests would need to be rewritten to offer the URL via http:// instead.

* Try local HTTP server for URL tests.

* ...

* Lint, add status check.

* Add boilerplate.

* Add 'ps aux'.

* Surrender to -f.

* Work around apparent flatpak bug.

* Fix YAML.

* Improve condition.

* Make sure test reruns behave better.
2021-06-08 08:46:20 +02:00
Amin Vakil
94a53adff1
zypper_repository: fix idempotency on adding repo with releasever and basearch variables (#2722)
* zypper_repository: Check idempotency on adding repo with releasever

* Name required when adding non-repo files.

* Initial try to fix releasever

* Replace re.sub with .replace

* name releaseverrepo releaseverrepo

* Change  to ansible_distribution_version for removing repo

* improve asserts format

* add changelog

* Fix changelog formatting

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

* improve command used for retrieving releasever variable

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

* add basearch replace

* Add basearch to changelog fragment

* Check for releasever and basearch only when they are there

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-08 08:23:32 +02:00
Alexei Znamensky
6a41fba2f8
ModuleHelper - also uses LC_ALL to force language (#2731)
* also uses LC_ALL to force language

* adjusted test_xfconf and test_cpanm

* added changelog fragment

* Update changelogs/fragments/2731-mh-cmd-locale.yml

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

* adjusted chglog frag per PR

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-07 13:06:23 +02:00
Alexei Znamensky
f74b83663b
Bugfix + sanity checks for stacki_host (#2681)
* fixed validation-modules for plugins/modules/remote_management/stacki/stacki_host.py

* sanity fix

* added changelog fragment

* extra fix to the documentation

* Update plugins/modules/remote_management/stacki/stacki_host.py

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

* Update plugins/modules/remote_management/stacki/stacki_host.py

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

* rollback params

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-07 07:58:26 +02:00
quidame
463c576a67
iptables_state: fix async status call (-> action plugin) (#2711)
* fix call to async_status (-> action plugin)

* add changelog fragment

* Apply suggestions from code review

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

* rename a local variable for readability

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-06 08:20:52 +02:00
The Binary
9d8bea9d36
open_iscsi: allow same target selected portals login and override (#2684)
* fix: include portal and port for logged on check

* refactor: remove extra space

* fix: allow None portal and port on target_loggedon test

* add auto_portal_startup argument

* fix: change param name for automatic_portal

* add changelog fragment

* refactor: Update changelogs/fragments/2684-open_iscsi-single-target-multiple-portal-overrides.yml

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

* add version added info to auto_portal_startup arg

* add example for auto_portal_startup

* fix: remove alias for auto_portal form arg_spec as well

* refactor: elaborate in fragment changelogs

Elaborate change

Co-authored-by: Amin Vakil <info@aminvakil.com>

* open_iscsi: elaborate changelog fragment

* Update plugins/modules/system/open_iscsi.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-05 22:40:49 +02:00
fkuep
0e6d70697c
Wire token param into consul_api #2124 (#2126)
* Wire token param into consul_api #2124

* Update changelogs/fragments/2124-consul_kv-pass-token.yml

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

* #2124 renamed release fragment to match pr, removed parse_params.

* putting look back in, do some linting   #2124

* try more linting

* linting

* try overwriting defaults in parse_params with get_option vals, instead of removing that function completely.

* Revert "back to start, from 2nd approach: allow keyword arguments via parse_params for compatibility."

This reverts commit 748be8e366.

* Revert " linting"

This reverts commit 1d57374c3e.

* Revert " try more linting"

This reverts commit 91c8d06e6a.

* Revert "putting look back in, do some linting   #2124"

This reverts commit 87eeec7180.

* Revert " #2124 renamed release fragment to match pr, removed parse_params."

This reverts commit d2869b2f22.

* Revert "Update changelogs/fragments/2124-consul_kv-pass-token.yml"

This reverts commit c50b1cf9d4.

* Revert "Wire token param into consul_api #2124"

This reverts commit b60b6433a8.

* minimal chnages for this PR relative to current upstream.

* superfluous newline in changlog fragment.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-06-05 22:38:42 +02:00
Anton Nikolaev
1a4af9bfc3
Reduce stormssh searches based on host (#2568)
* Reduce stormssh searches based on host

Due to the stormssh searches in the whole config values, we need to reduce the search results based on the full matching of the hosts

* Removed whitespaces in the blank line

* Added changelog fragment and tests for the fix.

* Added newline at the end of the changelog fragment

* Added newline at the end of the tests

* Fixed bug with name in tests

* Changed assertion for the existing host

* Update changelogs/fragments/2568-ssh_config-reduce-stormssh-searches-based-on-host.yml

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

* Adjusted tests

* New line at the end of the tests

Co-authored-by: Anton Nikolaev <anikolaev@apple.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-05 14:53:02 +02:00
christophemorio
c49a384a65
Terraform: ensure workspace is reset to current value (#2634)
* fix: ensure workspace is reset to current value

* chore: linter

* chore: changelog
2021-06-04 19:12:29 +02:00
Benjamin Schubert
efbda2389d
keycloak_realm.py: Fix the ssl_required parameter according to the API (#2693)
* keycloak_realm.py: Fix the `ssl_required` parameter according to the API

The `ssl_required` parameter is a string and must be one of 'all',
'external' or 'none'. Passing a bool will make the server return a 500.

* fixup! keycloak_realm.py: Fix the `ssl_required` parameter according to the API

* Update changelogs/fragments/keycloak_realm_ssl_required.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-03 21:44:54 +02:00
Benjamin Schubert
fe5717c1aa
keycloak_realm.py: Mark 'reset_password_allowed' as no_log=False (#2694)
* keycloak_realm.py: Mark 'reset_password_allowed' as no_log=False

This value is not sensitive but Ansible will complain about it otherwise

* fixup! keycloak_realm.py: Mark 'reset_password_allowed' as no_log=False

* Apply all suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-03 21:42:05 +02:00
Gene Gotimer
ca1506fb26
Added SHA1 option to maven_artifact (#2662)
* Added SHA1 option

* Add changelog fragment

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

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

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

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

* Combined hash functions

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

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

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

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

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

* Removed unused functions (rolled into _local_checksum)

* Update changelogs/fragments/2661-maven_artifact-add-sha1-option.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-01 22:06:26 +02:00
Chih-Hsuan Yen
1ad85849af
nmcli: new arguments to ignore automatic dns servers and gateways (#2635)
* nmcli: new arguments to ignore automatic dns servers and gateways

Closes #1087

* Add changelog fragment

* Address review comments
2021-06-01 22:04:09 +02:00
Ajpantuso
b6c0cc0b61
archive - Adding exclusion_patterns option (#2616)
* Adding exclusion_patterns option

* Adding changelog fragment and Python 2.6 compatability

* Minor refactoring for readability

* Removing unneccessary conditional

* Applying initial review suggestions

* Adding missed review suggestion
2021-05-31 07:51:29 +02:00
quidame
f09c39b71e
iptables_state: fix broken query of async_status result (#2671)
* use get() rather than querying the key directly

* add a changelog fragment

* re-enable CI tests

* Update changelog fragment

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-29 10:50:24 +02:00
Ajpantuso
b281d3d699
proxmox_kvm - Fixed vmid result when VM with name exists (#2648)
* Fixed vmid result when VM with name exists

* Adding changelog fragment
2021-05-29 09:00:12 +02:00
Amin Vakil
c3cab7c68c
composer: add composer_executable (#2650)
* composer: add composer_executable

* Add changelog

* Improve documentation thanks to felixfontein

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-28 12:49:29 +02:00
Alexei Znamensky
3afcf7e75d
minor refactors on plugins/modules/cloud/misc (#2557)
* minor refactors on plugins/modules/cloud/misc

* added changelog fragment

* removed unreachable statement

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

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

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

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

* adjusted per PR comment

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-27 19:13:21 +02:00
christophemorio
285639a4f9
Terraform overwrite init (#2573)
* feat: implement overwrite_init option

* chore: changelog
2021-05-27 19:03:39 +02:00
Felix Fontein
7cd96d963e
meta/runtime.yml and __init__.py cleanup (#2632)
* Remove superfluous __init__.py files.

* Reformat and sort meta/runtime.yml.

* The ovirt modules have been removed.

* Add changelog entry.
2021-05-27 18:49:26 +02:00
sgalea87
4aa50962cb
influxdb_user: Fix bug introduced by PR 2499 (#2614)
* Update influxdb_user.py

Fixed function name

* Create 2614-influxdb_user-fix-issue-introduced-in-PR#2499

Added changelog

* Rename 2614-influxdb_user-fix-issue-introduced-in-PR#2499 to 2614-influxdb_user-fix-issue-introduced-in-PR#2499.yml

Fixed extension

* Update changelogs/fragments/2614-influxdb_user-fix-issue-introduced-in-PR#2499.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-27 08:01:28 +02:00
Alexei Znamensky
4764a5deba
redis cache - better parsing of connection uri (#2579)
* better parsing of connection uri

* added changelog fragment

* fixed tests for ansible 2.9

* Update tests/unit/plugins/cache/test_redis.py

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

* Update tests/unit/plugins/cache/test_redis.py

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

* Adjustments from PR

* Update test_redis.py

* Update test_redis.py

* Update plugins/cache/redis.py

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

* Update plugins/cache/redis.py

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

* Update tests/unit/plugins/cache/test_redis.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-26 07:07:09 +02:00
Alexander Moiseenko
6df3685d42
jenkins_plugin: HTTP Error 405: Method Not Allowed on disable/enable plugin #2510 (#2511)
* define POST method for pluginManager api requests

Jenkins makeEnable/makeDisable api requests requires to use POST method

* add changelog fragment

* fix my yoda lang thx to aminvakil

Co-authored-by: Amin Vakil <info@aminvakil.com>

* update changelog fragment

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-26 07:00:53 +02:00
Brian Coca
d871399220
json_query, no more 'unknown type' errors (#2607)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-25 13:04:19 +02:00
DasSkelett
63012eef82
Use str() to get exception message (#2590) 2021-05-25 12:58:20 +02:00
Tong He
593d622438
rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases (#2571)
* rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases.

* Fix the unit test error: The new release_matcher could pass a wider range of patterns but that would not cause extra issue to the whole module.

* Submit the changelog fragment.

* Update changelogs/fragments/2571-rhsm_release-fix-release_matcher.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-24 21:59:52 +02:00
Alexei Znamensky
cc293f90a2
ini_file - opening file as utf-8-sig (#2578)
* opening file as utf-8-sig

* added changelog fragment

* using io.open()

* Update tests/integration/targets/ini_file/tasks/main.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-22 22:20:37 +02:00
abikouo
3100c32a00
ovir4 inventory script (#2461)
* update configparser

* changelog

* handle multiple python version

* Update changelogs/fragments/2461-ovirt4-fix-configparser.yml

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

* Update ovirt4.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-22 13:34:19 +02:00
absynth76
8f083d5d85
java_cert - fix incorrect certificate alias on pkcs12 import (#2560)
* fix wrong certificate alias used when importing pkcs12, modify error output, stdout is more relevant than stderr

* add changelog fragment

* fix changelog fragment
2021-05-22 13:33:27 +02:00
momcilo78
7a169af053
Add comment_visibility parameter for comment operation for jira module (#2556)
* Add comment_visibility parameter for comment operation for jira module

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

* Update plugins/modules/web_infrastructure/jira.py

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

* Update plugins/modules/web_infrastructure/jira.py

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

* addressed pep8 E711

* Added missing parameter.

* params is not in use anymore.

* It appears other modules are using options, where in documentation they use suboptions. Inconsistancy?

* adjusted indentation

* tweaked suboptions, fixed documentation

* Added fragment

* Update changelogs/fragments/2556-add-comment_visibility-parameter-for-comment-operation-of-jira-module.yml

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

* Update plugins/modules/web_infrastructure/jira.py

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

Co-authored-by: felixfontein <felix@fontein.de>
2021-05-20 22:06:00 +02:00
Alexei Znamensky
1403f5edcc
ModuleHelper: CmdMixin custom function for processing cmd results (#2564)
* MH: custom function for processing cmd results

* added changelog fragment

* removed case of process_output being a str
2021-05-20 19:43:16 +02:00
Andre Lehmann
c4624d3ad8
pacman: add 'executable' option to use an alternative pacman binary (#2524)
* Add 'bin' option to use an alternative pacman binary

* Add changelog entry

* Incorporate recommendations

* Update plugins/modules/packaging/os/pacman.py

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-18 12:59:11 +02:00
quidame
2c1ab2d384
iptables_state: fix per-table initialization command (#2525)
* refactor initialize_from_null_state()

* Use a more neutral command (iptables -L) to load per-table needed modules.

* fix 'FutureWarning: Possible nested set at position ...' (re.sub)

* fix pylints (module + action plugin)

* unsubscriptable-object
* superfluous-parens
* consider-using-in
* unused-variable
* unused-import
* no-else-break

* cleanup other internal module_args if they exist

* add changelog fragment

* Apply suggestions from code review (changelog fragment)

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

* Remove useless plugin type in changelog fragment

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-18 11:51:37 +02:00
quidame
f6db0745fc
filesystem: revamp module (#2472)
* revamp filesystem module to prepare next steps

* pass all commands to module.run_command() as lists
* refactor grow() and grow_cmd() to not need to override them so much
* refactor all existing get_fs_size() overrides to raise a ValueError if
  not able to parse command output and return an integer.
* override MKFS_FORCE_FLAGS the same way for all fstypes that require it
* improve documentation of limitations of the module regarding FreeBSD
* fix indentation in DOCUMENTATION
* add/update function/method docstrings
* fix pylint hints

filesystem: refactor integration tests

* Include *reiserfs* and *swap* in tests.
* Fix reiserfs related code and tests accordingly.
* Replace "other fs" (unhandled by this module), from *swap* to *minix*
  (both mkswap and mkfs.minix being provided by util-linux).
* Replace *dd* commands by *filesize* dedicated module.
* Use FQCNs and name the tasks.
* Update main tests conditionals.

* add a changelog fragment

* Apply suggestions from code review

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

* declare variables as lists when lists are needed

* fix construction without useless conversion

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-18 06:46:45 +02:00
Alexei Znamensky
d24fc92466
ModuleHelper - cmd params now taken from self.vars instead of self.module.params (#2517)
* cmd params now taken from self.vars instead of self.module.params

* added changelog fragment

* Update changelogs/fragments/2517-cmd-params-from-vars.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 22:44:00 +02:00
Xabier Napal
b89eb87ad6
influxdb_user: allow creation of first user with auth enabled (#2364) (#2368)
* influxdb_user: allow creation of first user with auth enabled (#2364)

* handle potential exceptions while parsing influxdb client error

* fix changelog

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

* influxdb_user: use generic exceptions to be compatible with python 2.7

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 21:00:35 +02:00
Alexei Znamensky
2a376642dd
ModuleHelper - better mechanism for customizing "changed" behaviour (#2514)
* better mechanism for customizing "changed" behaviour

* dont drink and code: silly mistake from late at night

* added changelog fragment
2021-05-17 20:28:21 +02:00
quidame
2b1eff2783
java_keystore: pass in secret to keytool via stdin (#2526)
* java_keystore: pass in secret to keytool via stdin

* add changelog fragment
2021-05-17 20:05:24 +02:00
Lauri Tirkkonen
dc0a56141f
zfs_delegate_admin: drop choices from permissions (#2540)
instead of whitelisting some subset of known existing permissions, just
allow any string to be used as permissions. this way, any permission
supported by the underlying zfs commands can be used, eg. 'bookmark',
'load-key', 'change-key' and all property permissions, which were
missing from the choices list.
2021-05-17 18:55:00 +02:00
Alexei Znamensky
345d5f2dfa
snap - revamp + implementing enabled/disabled states (#2411)
* revamp of snap module

* added changelog fragment

* fixed description

* Update changelogs/fragments/2411-snap-revamp-enabled-disabled-states.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 14:03:15 +02:00
Jan Baier
350380ba8c
Add option missing to passwordstore lookup (#2500)
Add ability to ignore error on missing pass file to allow processing the
output further via another filters (mainly the default filter) without
updating the pass file itself.

It also contains the option to create the pass file, like the option
create=true does.

Finally, it also allows to issue a warning only, if the pass file is not
found.
2021-05-17 13:50:40 +02:00
Dennis Israelsson
448b8cbcda
fix error when cache is disabled (#2518) 2021-05-17 07:35:15 +02:00
sgalea87
ea200c9d8c
Update influxdb_user.py Fixed Multiple No Privileges (#2499)
* Update influxdb_user.py

Fixed Multiple No Privileges

* Update influxdb_user.py

Fixed line spaces

* Update influxdb_user.py

Fixed whitespace

* Create 2499-influxdb_user-fix-multiple-no-privileges.yml 

Added changelog
2021-05-17 07:33:40 +02:00
iridian
5b77515308
1085 updating the hcl whitelist to include all supported options (#2495)
* 1085 updating the hcl whitelist to include all supported options

* Update changelogs/fragments/1085-consul-acl-hcl-whitelist-update.yml

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

Co-authored-by: Dillon Gilmore <dgilmor@rei.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 07:32:51 +02:00
Alexei Znamensky
c8f402806f
Cleanup connections plugins (#2520)
* minor refactors

* minor refactors in plugins/connection/saltstack.py

* minor refactors in plugins/connection/qubes.py

* minor refactor in plugins/connection/lxc.py

* minor refactors in plugins/connection/chroot.py

* minor refactors in plugins/connection/funcd.py

* minor refactors in plugins/connection/iocage.py

* minor refactors in plugins/connection/jail.py

* added changelog fragment
2021-05-16 13:24:37 +02:00
Ajpantuso
a385cbb11d
java_keystore: New ssl_backend option for cryptography (#2485)
* Adding cryptography as a backend for OpenSSL operations

* Updating unit tests and adding changelog fragment

* Allowing private key password option when using unprotected key

* Incorporating suggestions from initial review

* Centralizing module exit path
2021-05-14 22:31:44 +02:00
Amin Vakil
054eb90ae5
gitlab_user: add expires_at option (#2450)
* gitlab_user: add expires_at option

* Add changelog

* Add integration test

* Add expires_at to addSshKeyToUser function

* password is required if state is set to present

* Check expires_at will not be added to a present ssh key

* add documentation about present ssh key

* add expires_at to unit tests

* Improve documentation

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

* Only pass expires_at to api when it is not None

* Emphasize on SSH public key

* Apply felixfontein suggestion

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-14 10:00:59 +02:00
Felix Fontein
ee9770cff7
Deprecate nios content (#2458)
* Deprecate nios content.

* Make 2.9's ansible-test happy.

* Add module_utils deprecation.
2021-05-13 21:50:40 +02:00
Felix Fontein
384655e15c
Add groupby_as_dict filter (#2323)
* Add groupby_as_dict filter.

* Test all error cases.
2021-05-13 21:49:57 +02:00
Alexei Znamensky
265d034e31
linode - docs/validation changes + minor refactorings (#2410)
* multiple changes:

- documentation fixes
- minor refactorings

* added param deprecation note to the documentation

* added changelog fragment

* Update changelogs/fragments/2410-linode-improvements.yml

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

* Update changelogs/fragments/2410-linode-improvements.yml

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

* Update plugins/modules/cloud/linode/linode.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-12 17:37:31 +02:00
Xabier Napal
83a0c32269
influxdb_retention_policy - add state argument to module spec (#2383) (#2385)
* influxdb_retention_policy: add state option to module argument spec

* influxdb_retention_policy: simplify duration parsing logic (suggested in #2284)

* add changelog

* fix documentation and changelog

* add constants for duration and sgduration validations

* restyle ansible module spec

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

* improve changelog

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

* set changed result in check mode for state absent

* remove required flag in optional module arguments

* influxdb_retention_policy: improve examples readability

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-12 17:33:27 +02:00
spike77453
b9fa9116c1
nmcli: Remove dead code, 'options' never contains keys from 'param_alias' (#2417)
* nmcli: Remove dead code, 'options' never contains keys from 'param_alias'

* Update changelogs/fragments/2417-nmcli_remove_dead_code.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-11 19:35:30 +02:00
Alexei Znamensky
d22dd5056e
module_helper.py Breakdown (#2393)
* break down of module_helper into smaller pieces, keeping compatibility

* removed abc.ABC (py3 only) from code + fixed reference to vars.py

* multiple changes:

- mh.base - moved more functionalities to ModuleHelperBase
- mh.mixins.(cmd, state) - CmdMixin no longer inherits from ModuleHelperBase
- mh.mixins.deps - DependencyMixin now overrides run() method to test dependency
- mh.mixins.vars - created class VarsMixin
- mh.module_helper - moved functions to base class, added VarsMixin
- module_helper - importing AnsibleModule as well, for backward compatibility in test

* removed unnecessary __all__

* make pylint happy

* PR adjustments + bot config + changelog frag

* Update plugins/module_utils/mh/module_helper.py

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

* Update plugins/module_utils/mh/module_helper.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-11 19:31:10 +02:00
TrevorSquillario
9d46ccf1b2
modified redfish_config and idrac_redfish_config to skip incorrect attributes (#2334)
* modified redfish_config and idrac_redfish_config to skip incorrect attributes

Signed-off-by: Trevor Squillario Trevor_Squillario@Dell.com

* modified redfish_utils.py and idrac_redfish_config.py to return empty warning message

* modified redfish_config.py and idrac_redfish_config.py to use module.warn()

* updated changelog fragment for pr 2334
2021-05-11 19:30:09 +02:00
sam-lunt
8e7aff00b5
Avoid incorrectly marking zfs tasks as changed (#2454)
* Avoid incorrectly marking zfs tasks as changed

The zfs module will incorrectly mark certain tasks as having been
changed. For example, if a dataset has a quota of "1G" and the user
changes it to "1024M", the actual quota vale has not changed, but since
the module is doing a simple string comparison between "1G" and "1024M",
it marks the step as "changed".

Instead of trying to handle all the corner cases of zfs (another example
is when the zpool "altroot" property has been set), this change simply
compares the output of "zfs-get" from before and after "zfs-set" is
called

* update changelog format

* Update changelogs/fragments/2454-detect_zfs_changed.yml

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

* add note about check_mode

* Update plugins/modules/storage/zfs/zfs.py

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

* Update plugins/modules/storage/zfs/zfs.py

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

* clarify check mode qualifications

* rephrase to avoid hypothetical

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-10 17:55:19 +02:00
vbarba
4cdff8654a
fix stackpath_compute validate_config (#2448)
* fix stackpath_compute validate_config

get the lenght for the client_id / client_secret to validate inventory configuration

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-09 22:25:00 +02:00
Felix Fontein
9906b9dbc7
Remove vendored ipaddress module. (#2441) 2021-05-05 12:31:01 +02:00
Jan Orel
aaa561163b
OpenNebula one_vm.py: Fix missing keys (#2435)
* OpenNebula one_vm.py: Fix missing keys

* fixup OpenNebula one_vm.py: Fix missing keys
2021-05-04 12:21:55 +02:00
zigaSRC
06bdabcad9
lvol - bug fix - Convert units to lowercase when using LVS or VGS command (#2369)
* Added lower call for units when checking lvs/vgs size

* Changelog

* Size roudning correction

* Rounding

* Changelog

* Remove whitespace
2021-05-03 21:25:52 +02:00
Alexei Znamensky
5064aa8ec6
linode_v4 - fixed error message (#2430)
* fixed error message

* added changelog fragment
2021-05-03 13:27:16 +02:00
spike77453
7359b1fbe5
nmcli: Compare MAC addresses case insensitively (#2416)
* nmcli: Compare MAC addresses case insensitively

* Update changelogs/fragments/2416-nmcli_compare_mac_addresses_case_insensitively.yml

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

* Update plugins/modules/net_tools/nmcli.py

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

* Add mac to TESTCASE_BRIDGE so test_bridge_connection_unchanged covers case sensitive mac address comparison

* Update plugins/modules/net_tools/nmcli.py

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

* Convert current_value to uppercase as well in case nmcli changes behaviour

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-03 07:28:53 +02:00
spike77453
b5f8ae4320
nmcli: Add 'slave-type bridge' to nmcli command if type is bridge-slave (#2409) 2021-05-03 07:27:56 +02:00
Amin Vakil
26aba8e766
puppet - replace stdout with console in logdest option (#2407)
* Change stdout to console

* readd stdout, resulting in console

* add changelog

* readd stdout to docs and add a warning when it is used

* version of what???

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

* postpone deprecation in another PR

* remove console option, so it can be backported

* change changelog respectively

* Fix changelog formatting

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-03 07:26:47 +02:00
Daniel Werner
cd957fae4c
Fix #2373 - TypeError: a bytes-like object is required, not 'str' (#2375)
* Fix #2373

* Changelog fragment for #2373

* Update changelogs/fragments/2373-svr4pkg-fix-typeerror.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update changelogs/fragments/2373-svr4pkg-fix-typeerror.yml

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-03 07:25:08 +02:00
George Angelopoulos
eb455c69a2
composer: --no-interaction when discovering available options (#2348)
The composer module always uses the no-interaction option if it
discovers it _after_ calling "composer help ..." but not on the help
call itself. The lack of this option caused composer to not exit when
called through the ansible module.

The same example command when ran interactively does not prompt for user
interaction and exits immediately. It is therefore currently unknown why
the same command hangs when called through the ansible composer module
or even directly with the command module.

Example command which hangs:
php /usr/local/bin/composer help install --format=json
2021-05-01 18:23:14 +02:00
Xabier Napal
26c3bd25f6
influxdb_retention_policy: fix duration parsing to support INF values (#2396)
* influxdb_retention_policy: fix duration parsing to support INF values

* add changelog
2021-05-01 14:19:05 +02:00
Alexei Znamensky
48ef05def3
spotinst_aws_elastigroup - fixed elements for many lists (#2355)
* fixed elements for many lists

* added changelog fragment

* Removed verbose types in description - still missing formatting and properly documenting dicts
2021-04-27 13:18:29 +02:00
Alan Rominger
2ad004b97b
Make inventory scripts executable (#2337)
* Make inventory scripts executable

* Mark inventory scripts in vault folder as executable

* Add changelog entry for making inventory scripts exectuable

* Update changelogs/fragments/2337-mark-inventory-scripts-executable.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-26 21:24:26 +02:00
Felix Fontein
9931cdc1e7 stable-3 has been created, prepare for next 3.x.y release. 2021-04-26 18:33:30 +02:00
Alexei Znamensky
99c564398a
jira - module revamp -> moved code to class (#2208)
* rebased after jira bugfix

* Update plugins/modules/web_infrastructure/jira.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-26 13:09:19 +02:00
zigaSRC
ffd73296de
lvol - extending volumes with '+' only work for percentages (#2267)
* Merged changes from old PR

* Added suppurt for -, other adaptations regarding size.

* Implementing +- support for -l

* Added changelog

* Renamed changelog

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-26 07:07:14 +02:00
Xabier Napal
aea12899cc
influxdb_retention_policy: ensure duration parameters are idempotent (#2281) (#2284)
* influxdb_retention_policy: ensure duration parameters are idempotent (#2281)

* add changelog for pr #2284
2021-04-26 07:03:36 +02:00
Felix Fontein
5195536bd8
Fix Python 2 compatibility issue. (#2340) 2021-04-26 06:56:21 +02:00
Alexei Znamensky
8ddb81a36f
jira - fixed base64 decode bug (#2349)
* fixed base64 decode bug

* added changelog fragment
2021-04-26 06:54:57 +02:00
Anubhav Chakraborty
f11f6595cc
convert string returned by plugin to unicode (#2329)
* convert string returned by plugin to unicode

* add changelog fragment

* fix changelog format

* fix changelog format yet again

Co-authored-by: Anubhav Chakraborty <anubchak@cisco.com>
2021-04-24 12:20:11 +02:00
TeamOSEOLA
fb1b756d48
Add plugin_paths parameter to terraform module. (#2308)
* Add plugin_paths parameter to terraform module.

The list `plugin_paths` is used in the init phase of terraform by setting
the `-plugin-dir` command line argument to a path that contains
terraform plugins. When the `-plugin-dir` argument is set, the plugin
discovery and auto-download of terraform is disabled. This is useful when
running terraform in automation environments for testing where the production
endpoints are strictly controlled or on air-gapped networks and you need
to control the versions of plugins available.

* Added `elements: path` to `plugin_paths` parameter documentation in terraform.py

* added changelog fragment

* Update changelogs/fragments/2308-terraform-add-plugin_paths-parameter.yaml

use double back-ticks vice single

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

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

Add version added to documentation

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

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

Add markup around URL in documentation

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

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

remove `required=False` and `default=None` from module argument spec, as that is the default behavior and redundant

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Added directory structure info to documentation and examples sections.

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

grammatical fix

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

* grammar fix to description.

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-04-21 16:05:37 -07:00
Dennis Israelsson
31c9ed0fe6
nmap: fix cache support (#2282)
* add cache support

* pep8 e501 fix

* revert verify_file function

* revert description update

* add changelog fragment

Co-authored-by: Dennis Israelsson <github@mdh.nu>
2021-04-21 16:00:03 -07:00
Felix Fontein
6f6b80fd89 Add PR URLs to changelog fragment. 2021-04-21 22:41:55 +02:00
Ilija Matoski
ca48917b4f
inventory/proxmox: Added some cases for unsupported network interface and multi-nic and unsupported guest error (#2263)
* added some cases for unsupported network interface and multi-nic without IP addresses

* added changelog fragment

* lint fixes and added option for ansible_host setting

* added description about the new option

* lint fix too long line

* Update changelogs/fragments/2259-proxmox-multi-nic-and-unsupported.yml

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

* Update plugins/inventory/proxmox.py

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

* Update plugins/inventory/proxmox.py

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

* Update plugins/inventory/proxmox.py

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

* Added CommandDisabled

* refactored to code and added a test case where an interfaces doesnt have a mac address or is invalid to reset it to 00:00:00:00:00:00

* Update tests/unit/plugins/inventory/test_proxmox.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update tests/unit/plugins/inventory/test_proxmox.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* mac-address is set to None instead of 00:00:... when not defined

* changed None to empty string for mac-address

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-04-21 19:52:45 +02:00
Ajpantuso
68243063d1
pids module: Adding pattern and ignore_case options (#2280)
* Adding pattern and ignore_case options

* Adding changelog fragment

* Fixing changelog fragment

* Addressing FreeBSD 11.4/python 3 errors with explicit conversion

* Correcting descriptions

* Reverting back to regex input

* Fixing test syntax errors
2021-04-21 12:45:09 +02:00
Gaetan2907
6ab9b05da3
Allow keycloak modules to take token as parameter for the auth. (#2250)
* Allow keycloak_group.py to take token as parameter for the authentification

* Fix some pep8 issues

* Add changelog fragment

* Refactor get_token to pass module.params + Documentation

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Fix unit test and add new one for token as param

* Fix identation

* Check base_url format also if token is given

* Update plugins/doc_fragments/keycloak.py

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

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

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

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

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

* Allow keycloak_group.py to take token as parameter for the authentification

* Refactor get_token to pass module.params + Documentation

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

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

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

* Check if base_url is None before to check format

* Fix unit test: rename base_url parameter to auth_keycloak_url

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update changelogs/fragments/2250-allow-keycloak-modules-to-take-token-as-param.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update changelogs/fragments/2250-allow-keycloak-modules-to-take-token-as-param.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

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

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Switch to modern syntax for the documentation (e.g. community.general.keycloak_client)

* Add check either creds or token as argument of all keyloak_* modules

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-04-20 13:20:46 +02:00
Gonéri Le Bouder
b10d707a8b
nmcli: manual overwrite MAC address for any devices (#2224)
* nmcli: manual overwrite MAC address for any devices

Don't restrict the ability to manually set the MAC address to the
bridge. NetworkManager is able to set a static MAC address to the
vaste majority of the device types.

* Update changelogs/fragments/2224_nmcli_allow_MAC_overwrite.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-19 19:02:48 +02:00
Alexei Znamensky
fbbd8ecd6f
Fixed validations in a couple of modules (#2268)
* fixed udm_dns_zone

* fixed udm_dns_record

* removed lines from ignore files

* added changelog fragment

* moved the list elements fix to minor_changes
2021-04-19 18:48:16 +02:00
Felix Fontein
91a0264f38
java_keystore: overwrite instead of fail when password or alias does not match (#2262)
* Overwrite instead of fail when password does not match.

* Update documentation.

* Fix tests.

* Update plugins/modules/system/java_keystore.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Fix documentation.

* Apply suggestions from code review

Co-authored-by: quidame <quidame@poivron.org>

* Update tests/unit/plugins/modules/system/test_java_keystore.py

* One more.

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: quidame <quidame@poivron.org>
2021-04-19 06:59:52 +02:00
Gonéri Le Bouder
6a8eb7b388
nmcli: add wifi support (#2220)
* nmcli: add wifi support

Ability to:

- connect NetworkManager to a Wifi network
- attach the connection to a master (bond).

* target 3.0.0
2021-04-18 10:59:23 +02:00
Alexei Znamensky
ec9c23437c
cpanm - revamp module (#2218)
* copying from the previous branch

* passing sanity - docs incomplete

* adjusted parameter name

* adjusted unit tests for mode=new

* adjusted integration tests for mode=new

* added 'russoz' to list of maintainers for cpanm

* Update tests/integration/targets/cpanm/tasks/main.yml

* Update tests/integration/targets/cpanm/tasks/main.yml

* ensuring backward compatibility + tests

* added changelog fragment

* version for new parameter and adjusted example

* typo and formatting

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

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

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

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

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

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

* multiple changes

- some fixes from PR
- supporting tests
- integration is no longer unsupported => destructive, should run on
  apt- and rpm-based systems only

* only run integration tests in redhat-family > v7 or debian-family

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-18 10:55:47 +02:00
Felix Fontein
721589827e
Remove ldap_entry's params option completely (#2257)
* Remove ldap_entry's params option completely.

* Regular sanity error fixing.
2021-04-18 10:09:46 +02:00
Fabio Sangiovanni
f9e3e229dd
linode_v4: add support for private_ip option. (#2249)
* linode_v4: add support for `private_ip` option.

* linode_v4: remove `required` attribute from `private_ip` parameter.

* linode_v4: add changelog fragment.

* linode_v4: add PR link to changelog fragment.

Co-authored-by: Amin Vakil <info@aminvakil.com>

* linode_v4: add the `version_added` attribute to the `private_ip` section of module documentation

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

* linode_v4: improve styling of `private_ip` docs

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-18 09:45:26 +02:00
rainerleber
1400051890
Fix for Terraform 0.15 (#2246)
* Fix for Terraform 0.15

removed the append of variables in terraform validate because this is deprecated in Terraform 0.15. See: https://github.com/hashicorp/terraform/blob/v0.15/CHANGELOG.md >> The -var and -var-file options are no longer available on terraform validate. These were deprecated and have had no effect since Terraform v0.12

* Create terraform-validate.yaml

* Update and rename terraform-validate.yaml to 2246-terraform-validate.yaml

* Update changelogs/fragments/2246-terraform-validate.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update terraform.py

remove `-force` add `-auto-approve` on destroy as described in issue #2247

* Update and rename 2246-terraform-validate.yaml to 2246-terraform.yaml

* Update 2246-terraform.yaml

* add a function which check the used tf version

* add a function which check the used tf version

* Update changelogs/fragments/2246-terraform.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update changelogs/fragments/2246-terraform.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* add version return to function

* changed it to pass sanity check

* change variable name

* changed to a more specialized data types

* remove use_unsafe_shell=True

* Update changelogs/fragments/2246-terraform.yaml

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

* add description

* Update changelogs/fragments/2246-terraform.yaml

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Rainer Leber <rainer.leber@sva.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-17 22:32:54 +02:00
Ajpantuso
118d903e7d
New filter plugins: hashids_encode and hashids_decode (#2244)
* New filters hashids_encode and hashids_decode

* Adding changelog

* Correcting whitespace issue in vars file

* Attempt to fix integration test failures

* Correcting copyright

* Addressing initial review comments

* Updating decoded sequence return from tuple to list

* Correcting capitilization and spelling
2021-04-17 20:00:03 +02:00
quidame
3a8206fe62
java_keystore: add certificate_path and private_key_path options (#2230)
* java_keystore: add `certificate_path` and `private_key_path` options

* Update DOCUMENTATION and EXAMPLES accordingly.
* Refactor integration tests to play the same tasks twice.
* Add a changelog fragment (minor_changes).

refactor DOCUMENTATION

* Add useful info for better understanding of what options allow
  keystore regeneration on the fly, and what other options lead the
  module to fail, if their values change.
* Fix indentation and tenses.
* Add myself as author.

* readability-related stuff + changelog fragment
2021-04-17 18:17:53 +02:00
Gonéri Le Bouder
f77aa51ab8
nmcli: do not set IP configuration bond slaves (#2223)
The master interface holds the IP configuration. If we try to update the
IP configuration of the slaves, NetworkManager raises an error.
2021-04-17 10:33:40 +02:00
Jeffrey van Pelt
123b5a9a3c
Proxmox inv fix agent string parsing (#2245)
* Added handling for commas in the agent field for agent configuration

* Removed test statement

* Added changelog fragment

* Fixed spelling on fragment :-)
2021-04-17 10:08:41 +02:00
Brian Coca
f4858d64f4
funcd connection plugin is now usable/loadable (#2235)
* funcd connection plugin is now usable/loadable

* Update changelogs/fragments/allow_funcd_to_load.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-14 09:25:57 +02:00
Alexei Znamensky
bfd6d2b3aa
jira - fixed isinstance error (#2236)
* fixed isinstance error

* added changelog fragment
2021-04-14 09:11:31 +02:00
Felix Fontein
081c534d40
Remove deprecated modules scheduled for removal in 3.0.0 (#1924)
* Remove deprecated modules scheduled for removal in 3.0.0.

* Update BOTMETA.

* Update ignore-2.12.txt.

* Next release will be 3.0.0.
2021-04-13 11:19:25 +00:00
Brandon McNama
98af8161b2
Add Jira attach operation (#2192)
* Add Jira attach operation

Adds the `attach` operation to the `web_infrastructure.jira` module,
which allows a user to attach a file to an issue. The user can supply
either the path to a file, which will be read from storage, or a file
name and content (as bytes).

* Apply suggestions from code review

* Update plugins/modules/web_infrastructure/jira.py

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>
2021-04-13 07:41:31 +02:00
Ajpantuso
8ab356520d
Proxmox_Inv: Adding agent network interaces fact (#2148)
* Added agent network interaces fact

* Adding changelog fragment

* More concise looping over interfaces

* Adding unit test case for agent interfaces

* Correcting whitespace issue

* Commented new dummy json returns with corresponding method
2021-04-12 22:24:33 +02:00
quidame
89b7e7191f
java_keystore: improve error handling and returned results (#2183)
* java_keystore - improve error handling and returned results

* set check_rc=False to return results as documented when module fails
* set LANG, LC_ALL and LC_MESSAGES to C to rely keytool output parsing
* fix pylint's `no-else-return` and `unused-variable` hints
* update related unit tests accordingly
* add a changelog fragment

update unit test (remove stdout_lines from returned dict)

fix unit test: failure is now expected when alias does not exist

* Update changelogs/fragments/2183-java_keystore_improve_error_handling.yml

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

* fix integration test: overwrite keystore at the same location

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-12 21:23:43 +02:00
Amin Vakil
fa13826273
npm: Add no_bin_links option (#2146)
* Add no-bin-links option to npm

* Add changelog

* Fix changelog format

* Add integration test

* Change node package from thelounge to ncp
2021-04-11 05:58:48 +02:00
justchris1
5502e4ec17
Added fields to the ipa_config module (#2116)
* Added fields to the ipa_config module: ipadefaultprimarygroup, ipagroupsearchfields, ipahomesrootdir, ipamaxusernamelength, ipapwdexpadvnotify, ipasearchrecordslimit, ipasearchtimelimit, ipauserauthtype, ipausersearchfields

* Fixed typos in documentation spec

* Updated a field that was missing the version_added decoration

* Add changelog fragment

* Update plugins/modules/identity/ipa/ipa_config.py

Cleanup example to be consistent with others.

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

* Cleanup example to be consistent with others.

* Fixed changelog fragment

* Updated punctuation in examples

* Switched some elements to use int instead of str, and fixed duplicated example

* Change type of field for ipauserauthtype to list of str, add support for ipaconfigstring and ipakrbauthzdata

* Update fragment to represent adding support for ipaconfigstring and ipakrbauthzdata

* Update changelogs/fragments/2116-add-fields-to-ipa-config-module.yml

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

* Update plugins/modules/identity/ipa/ipa_config.py

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

* Update plugins/modules/identity/ipa/ipa_config.py

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

* Address review comments by making inputs into group search and user search fields a list of strings, even though IPA does not treat it as a multiselect field

* Update plugins/modules/identity/ipa/ipa_config.py

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

* Update plugins/modules/identity/ipa/ipa_config.py

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

Co-authored-by: Chris Costa <chris.costa@compellingtech.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-11 05:57:36 +02:00
Álvaro Torres Cogollo
8eb2331aea
Bugfix: PyGithub does not support explicit port in base_url (#2204)
* Bugfix: PyGithub does not support explicit port in base_url

* Fix unit tests

* Fix unit tests

* Added changelog

* Update changelogs/fragments/2204-github_repo-fix-baseurl_port.yml

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-04-09 06:00:21 +02:00
Ilija Matoski
4b71e088c7
inventory/proxmox: added constructable and added keyed_groups, groups and compose (#2180)
* added constructable and added keyed_groups, groups and compose

* Update changelogs/fragments/2162-proxmox-constructable.yml

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

* added constructed to extends_documentation_fragment and version_added to all the items

* renamed _apply_rules to _apply_constructable for more clarity

* Update changelogs/fragments/2162-proxmox-constructable.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-08 22:32:18 +02:00
Alexei Znamensky
0cd0f0eaf6
module_helper - fixed decorator cause_changes (#2203)
* fixed decorator cause_changes

* added changelog fragment

* typo
2021-04-08 07:58:39 +02:00
Felix Fontein
b6ae47c455
Add dict filter (#2171)
* Add dict and list_to_dict filters.

* Remove list_to_dict filter.

* Add myself as maintainer.
2021-04-08 07:50:28 +02:00
Felix Fontein
4b6722d938
Add path_join compatibility shim (#2172)
* Add path_join compatibility shim.

* Add myself as maintainer.
2021-04-08 07:49:57 +02:00
justchris1
595d590862
Fix issue where multiselect field in userauthtype did not allow multiple values (#2174)
* Fix issue where multiselect field in userauthtype did not allow multiple values

* Add changelogfragment for change

* Update changelogs/fragments/2174-ipa-user-userauthtype-multiselect.yml

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

* Update plugins/modules/identity/ipa/ipa_user.py

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

* Update changelogs/fragments/2174-ipa-user-userauthtype-multiselect.yml

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

Co-authored-by: Chris Costa <chris.costa@compellingtech.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 20:57:04 +02:00
justchris1
7f91821bcc
ipa_user sshpubkey can now support multi word comments in the key (#2159)
* ipa_user sshpubkey can now support multi word comments in the key

* Add documentation fragment for pull request

* Update changelogs/fragments/2159-ipa-user-sshpubkey-multi-word-comments.yaml

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

* Cleaner implementation of multi word comments

Co-authored-by: Chris Costa <chris.costa@compellingtech.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:32:45 +02:00
absynth76
40ce0f995b
Update java_cert module (#2008)
* porting https://github.com/ansible/ansible/pull/56778 as requested in https://github.com/ansible-collections/community.general/issues/821

* fix imports, add back trust_cacerts option

* try to fix import, ansible-lint fixes

* modify import to use ansible.module_utils.six instead

* cleanup indentation for tests/integration/targets/java_cert/tasks/main.yml file

* remove external crypto dependency - switch to openssl, work on password obfuscation, using files compare to reduce logic

* java_cert - remove latest run_command using password in arguments

* fix sanity check

* rename changelog fragment file - wrong extension

* add openssl dependency

* fix openssl_bin parameter missing on _get_digest_from_x509_file function call

* remove useless close files, fix paragraph, fix changelog, clean import re

* fix missing dots at end-of-line in changelogs fragments

* fix reminder case

* fix changelog

* restore .gitignore

* fix indentation on integration test files, delete useless json file

* fix typo importing tasks in tests/integration/targets/java_cert/tasks/main.yml

* Update changelogs/fragments/2008-update-java-cert-replace-cert-when-changed.yml

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

* Update tests/integration/targets/java_cert/tasks/state_change.yml

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

* Update plugins/modules/system/java_cert.py

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

* Update plugins/modules/system/java_cert.py

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

* Update plugins/modules/system/java_cert.py

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

* Update plugins/modules/system/java_cert.py

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

* Update plugins/modules/system/java_cert.py

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

* Update plugins/modules/system/java_cert.py

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

* Update plugins/modules/system/java_cert.py

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

* fix hardcoded executable keytool, use re.sub instead of import, add required cert_url or cert_alias parameter when absent, fix python script and cert_url test

* fix pylint issue with setupSSLServeR.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 19:31:58 +02:00
Norman Ziegner
7145204594
Fix HAProxy draining (#1993)
* Fix HAProxy draining by manually entering the 'MAINT' state

Inspired by rldleblanc: https://github.com/ansible/ansible/issues/37591#issuecomment-610130611

Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>

* Add changelog fragment

Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>

* Fix drain function docstring

Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>

* Fix typos

Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>

* Update changelog fragment

Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
2021-04-07 19:29:10 +02:00
Alexei Znamensky
beb3b85a4f
jira - changing the logic for transition (#1978)
* attempt at fixing the issue

* Update plugins/modules/web_infrastructure/jira.py

* Fixed setting of "fields" element in the payload

* added changelog fragment

* added accountId parameter + minor fixes in docs

* added integration test for jira

* adjustments per PR

* Update plugins/modules/web_infrastructure/jira.py

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

* Update plugins/modules/web_infrastructure/jira.py

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

* Update plugins/modules/web_infrastructure/jira.py

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

* Update plugins/modules/web_infrastructure/jira.py

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

* Update plugins/modules/web_infrastructure/jira.py

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

* adjustments per PR

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-07 08:14:03 +02:00
Alexei Znamensky
9aec9b502e
Applying ModuleHelper variable mgmt to xfconf -> improvements on MH (#2188)
* applying MH variable mgmt to xfconf - improvements on MH

* added changelog fragment
2021-04-06 21:21:05 +02:00
Alexei Znamensky
9a5191d1f9
xfconf - state absent was not honoring check_mode (#2185)
* state absent was not honoring check_mode

* added changelog fragment
2021-04-06 12:49:50 +02:00
quidame
eb851d4208
replace inline clear password by environment variable (#2177)
* replace inline clear password by environment variable on a per-command basis.

* add changelog fragment
* update related unit tests

* Update changelogs/fragments/2177-java_keystore_1668_dont_expose_secrets_on_cmdline.yml

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

* fix unit test: force result without lambda

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-05 16:37:13 +02:00
Alexei Znamensky
d2070277e8
ModuleHelper variables management (#2162)
* added metadata for variables in module helper

* adjustments

* added separate support for tracking changes

* rewrote the diff code

* added integration test for module_helper

* using ansible.module_utils.common.dict_transformations.dict_merge

* improved dependency management

* restore ModuleHelper to base classes of CmdStateModuleHelper

* added assertions to ensure the failing module name appears in the error messages

* added test code for state-based modules

* fixed test name

* renamed class to VarMeta

* small fixes

* fixes from the PR

* fixed VarDict.__set_attr__

* added VarDict.__getitem__()

* added changelog fragment

* adjustments per PR

* ModuleHelper.output is now aware of conflicting variable names

* Update plugins/module_utils/module_helper.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-05 15:19:13 +02:00
quidame
533e01a3f9
java_keystore/fix 1667 improve temp files storage (#2163)
* improve temporary files storage (naming/removal)

* update unit tests

* Update changelogs/fragments/2163-java_keystore_1667_improve_temp_files_storage.yml

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

* add dedicated function to randomize PKCS#12 filename

fix unit tests (also mock the new function)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-05 14:40:36 +02:00
Alexei Znamensky
b81a7cdd16
removed unreachable code (#2157)
* removed unreachable code

* added changelog fragment
2021-04-05 09:22:28 +02:00
Alexei Znamensky
b97e31dd55
rewritten as list literals (#2160)
* rewritten as list literals

* added changelog fragment
2021-04-05 09:22:06 +02:00
Alexei Znamensky
d92d0632eb
fixed calls to list.extend() (#2161)
* fixed calls to list.extend()

* added changelog fragment

* Update changelogs/fragments/2161-pkgutil-list-extend.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-04 23:38:59 +02:00
Alexei Znamensky
c8885fdfbd
using get_bin_path() on atomic modules (#2144)
* using get_bin_path() on atomic modules

* added changelog fragment

* Update changelogs/fragments/2144-atomic_get_bin_path.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-02 22:06:07 +02:00
Alexei Znamensky
3312ae08af
kibana_plugin: fixed remove call + run_command with list instead of str (#2143)
* fixed remove call + run_command with list instead of str

* fixed the other calls to run_command()

* added changelog fragment

* adjustment on run_command params

* Update changelogs/fragments/2143-kibana_plugin-fixed-function-calls.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-02 22:05:28 +02:00
Alexei Znamensky
1d1cbc4f56
apache2_mod_proxy - minor improvements/fixes (#2142)
* minor improvements/fixes

- moved imports from the bottom of the code to the top (ansible-style).
- pythonified/simplified get_member_status()/set_member_status()
- reduced clutter in Balancer.__init__()

* added changelog fragment
2021-04-01 07:50:24 +02:00
Alexei Znamensky
f1dbef4143
fixed str formatting (#2139) 2021-03-31 13:05:40 +02:00
Gaige B Paulsen
604a5dbf49
fix type information for vmadm.resolvers (#2136)
* fix type information for vmadm.resolvers

* Update changelogs/fragments/2135-vmadm-resolvers-type-fix.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-31 09:25:28 +00:00
Alexei Znamensky
eb24e33666
git_config - fixed bug with scope file (#2125)
* fixed bug

- scope file was not working
- added test to guarantee that behaviour
- marked integration test as destructive, because it overwrites ~/.gitconfig

* added changelog fragment

* Update tests/integration/targets/git_config/tasks/setup_no_value.yml

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

* Update tests/integration/targets/git_config/tasks/get_set_state_present_file.yml

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

* Update tests/integration/targets/git_config/tasks/get_set_state_present_file.yml

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

* Update tests/integration/targets/git_config/aliases

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

* Update changelogs/fragments/2125-git-config-scope-file.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-30 08:24:08 +02:00
Amin Vakil
73bb0f1900
vdo: add force option (#2110)
* vdo: add force option

* Add changelog

* Improve the diff the next time something is added :)

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

* Add warning text placeholder by felixfontein

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

* Add warning text

* Apply suggestion for warning text from rhawalsh

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-27 15:13:53 +01:00
Stefan Richter
e7a0a12c3f
Bugfix: Respect PATH env variable in zypper modules (#2094)
* Bugfix: Respect PATH env variable in zypper modules

* Improve changelogs/fragments/2094-bugfix-respect-PATH-env-variable-in-zypper-modules.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-25 22:30:35 +01:00
Georg Gadinger
926c0a71d0
opennebula: port one_image to pyone (#2032) 2021-03-24 07:32:12 +01:00
Alexei Znamensky
5fc56676c2
stacki_host - configured params to use fallback instead of default (#2072)
* configuredd params to use fallback instead of default

* added changelog fragment
2021-03-21 13:56:41 +01:00
Ajpantuso
6529390901
New Filter plugin from_csv (#2037)
* Added from_csv filter and integration tests

* Cleaning up whitespace

* Adding changelog fragment

* Updated changelog fragment name

* Removed temp fragment

* Refactoring csv functions Part 1

* Syncing refactored csv modules/filters

* Adding unit tests for csv Module_Util

* Updating changelog fragment

* Correcting whitespace in unit test

* Improving changelog fragment

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

* Update changelogs/fragments/2037-add-from-csv-filter.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-21 13:21:54 +01:00
Alexei Znamensky
c147d2fb98
snmp_facts - added timeout and retries params to module (#2065)
* added timeout and retries params to module

* added changelog fragment

* Update plugins/modules/net_tools/snmp_facts.py

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

* Update plugins/modules/net_tools/snmp_facts.py

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

* removed default for retries per suggestion in PR

* Update plugins/modules/net_tools/snmp_facts.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-21 11:37:12 +01:00
Alexei Znamensky
606eb0df15
archive - a first refactoring (#2061)
* a first refactoring on archive

* added changelog fragment

* suggestion from PR
2021-03-21 11:12:41 +01:00
quasd
ff9f98795e
ipa_sudorule add support for setting runasextusers (#2031)
* Add support for setting runasextusers

* fix formatting

* add changelog fragment

* Update plugins/modules/identity/ipa/ipa_sudorule.py

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

* Update changelogs/fragments/2031-ipa_sudorule_add_runasextusers.yml

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

Co-authored-by: quasd <qquasd@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-21 11:09:49 +01:00
Felix Fontein
24f8be834a
Fix nios modules to work with ansible-core 2.11 (#2057)
* Fix nios modules to work with ansible-core 2.11.

* Adjust tests.
2021-03-20 13:45:42 +01:00