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

1142 commits

Author SHA1 Message Date
Jonathan Piron
0bc4518f3b
Fix: gitlab_deploy_key idempotency (#3473)
* Fix: gitlab_deploy_key idempotency

The module was not retrieving all the deploy keys leading to non
idempotency on projects with multiple deploy keys.
SEE: https://python-gitlab.readthedocs.io/en/stable/api-usage.html#pagination

* Update changelogs/fragments/3473-gitlab_deploy_key-fix_idempotency.yml

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

Co-authored-by: Jonathan Piron <jonathanpiron@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-04 21:03:31 +02:00
Felix Fontein
5895e50185
yaml callback: prevent plugin from modifying PyYAML (#3478)
* Prevent yaml callback from modifying PyYAML.

* Fix changelog fragment.

* Update changelogs/fragments/3478-yaml-callback.yml

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2021-10-01 22:42:39 +02:00
Victor Martinez
774b2f642b
[opentelemetry] minor changes in the import, docs and exception (#3450)
* OrderedDict has been added to the Python stdlib since version 2.7

* Docs: cosmetic change in the python lib

* See https://github.com/ansible/ansible/issues/75726

* Add changelog fragment

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-01 14:39:22 +02:00
Pan Luo
7cfdc2ce8c
Copy the permissions along with file for jboss module (#3426)
* Copy the permissions along with file for jboss module

Issue: The deployment file is copied with file content only. The file
permission is set to 440 and belongs to root user. When the
JBossI(Wildfly) server is running under non root account, it can't read
the deployment file.

With is fix, the correct permission can be set from previous task for JBoss
server to pickup the deployment file.

* Update changelogs/fragments/3426-copy-permissions-along-with-file-for-jboss-module.yml

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-09-29 06:51:18 +02:00
Sreekanth H
53fc2c477b
nmcli: amended the routing-rules4 key values as list (#3401)
* Updated nmcli.py

Amended the routing-rules4 values as list. By this we could add the entries for "routing_rules4" in the form of a list .

* Update nmcli.py 

Fixed typo in line #1701

* 3395-nmcli-needs-type.yml

routing_rules4 module argument is currently accepting only string elements. In order to accept multiple values, amended the type of routing_rules4 as list.

* nmcli: amended the routing-rules4 key values as list

routing_rules4 module argument is currently accepting only string elements. In the case of adding multiple entries to routing_rules4, we need to accept values as list.

* Added 3401-nmcli-needs-type.yml

routing_rules4 module argument is currently accepting only string elements. In the case of adding multiple entries to routing_rules4, we need to accept values as lists

* Amended type to 'minor_changes' 

Amended type to 'minor_changes'  from 'bug_fixes'

* routing_rules4 to a list of element str

nmcli.py - routing_rules4 to a list of element str

* Update changelogs/fragments/3401-nmcli-needs-type.yml

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

* nmcli: allow routing-rules4 key values as list

* nmcli: amended the routing-rules4 key values as list

* nmcli: amended the routing-rules4 key values as list

* nmcli: amended the routing-rules4 key values as list

* test_nmcli: amended whitespaces

* Update 3401-nmcli-needs-type.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-29 06:49:49 +02:00
Frank Dornheim
ef07f9b9ff
Enable deprecaded message for ignore_volatile_options (#3429)
* enable deprecate message for ignore_volatile_options

* fix E128

* add frament 3429

* remove default value and modify the resulting checks
spelling fixes
bump version for deprecated messge

* fix spelling and depricated version

Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
2021-09-28 07:07:55 +02:00
Chris Frage
1bb2ff5128
Fix require_two_factor_authentication can't be null (#3453)
* fix: require_two_factor_authentication default=false

* chore: add changelog fragment

* docs: require_two_factor_authentication default value

* fix: don't send require_two_factor_authentication null value

* chore: fix changelog
2021-09-27 21:50:21 +02:00
Frederic Werner
ba2917a7dc
chore: add deprecation warning for gitlab group membership (#3451)
* chore: add deprecation warning

* chore: add deprecation message, version and collection

* chore: add changelog fragment

* docs: add deprecation info

* fix: max line length and whitespace

* fix continuation line under-indented

* Update changelogs/fragments/3451-gitlab-group-member-deprecate-name-and-path.yml

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

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-27 21:49:52 +02:00
Chris Frage
b6b7601615
Fix: GitLab API searches always return first found match (#3400)
* fix: return correct group id
match only full_path or name

* chore: add changelog fragment

* fix: indentation multiple of four

* refactor: use two loops

* fix: typo of group id

* fix: changelog fragment
2021-09-26 18:59:39 +02:00
Ricardo Sanchez
43a9f09a17
open-iscsi: adding mutual authentication support and updating authentication parameters description (#3422)
* Adding mutual athentication support and changing doucumentation about authentication credentials

* Removing blank line with whitspaces

* Update plugins/modules/system/open_iscsi.py

Adding version_added to node_user_in parameter

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

* Update plugins/modules/system/open_iscsi.py

adding version_added attibute to new parameter password_in

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

* Update plugins/modules/system/open_iscsi.py

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

* Adding changelog fragment for #3422

* Rename 3422-open-iscsi-mutual-authentication-support.yam to 3422-open-iscsi-mutual-authentication-support.yaml

* Update changelogs/fragments/3422-open-iscsi-mutual-authentication-support.yaml

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

* Update changelogs/fragments/3422-open-iscsi-mutual-authentication-support.yaml

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-09-26 13:38:17 +02:00
Gaetan2907
147ca2fe66
Keycloak: Fix bug on keycloak_authentication, requirement not always updated (#3330)
* Fix diff mode when updating authentication flow with keycloak_authentication module

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

* Fix: Update requirement when new exex created

* Add changelog fragment

* Update changelogs/fragments/3330-bugfix-keycloak-authentication-flow-requirements-not-set-correctly.yml.yml

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

* Update changelogs/fragments/3330-bugfix-keycloak-authentication-flow-requirements-not-set-correctly.yml.yml

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

* Edit requirement of sublow

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-26 13:30:29 +02:00
Hartwig Hauschild
ae6cbc2d82
mail: adding capability to specify ehlo hostname (#3425)
* Adding capability to specify ehlo hostname

* Fixing default for ehlohost

the CI did not like "None" as default in the documentation,
judging from the rest of the definitions omitting that seems to be right

* Update plugins/modules/notification/mail.py

Proper spelling in documentation

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

* Adding Changelog Fragment

* Update changelogs/fragments/3425-mail_add_configurable_ehlo_hostname.yml

Proper phrasing in changelog

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

* integration-test for ehlohost parameter

* proper description, increased async-time

changed body of ehlohost-mail to reflect ehlohost
increased async from 30 to 45 as CI failed because
smtp was already down.

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-09-24 05:30:14 +00:00
Frank Dornheim
8e7d49c1c6
lxd_container: do not ignore volatile configs by option (#3331)
* do not ignore volatile - fix #2466

* remove unnecessary checks

* fix ansible-tests sanity

* fix access to the option: ignore_volatile_options

* add fragment

* fix quotation marks error

* fix review findings

* fix sanity error

* fix description - in yaml examples use true not True
comment out the deprecate message

* remove "default=True" at ignore_volatile_options
fix spelling

* fix sanity error that ignore_volatile_options have no default value

* undo changes. add defaut value and remove keyword at dict.get()

* fix sanity error

* small spelling fixes

* change text for fragment

* Fix description sentence.

Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-20 20:31:26 +02:00
Alexei Znamensky
2ad7ed4f83
kernel_blacklist - revamped the module (#3329)
* kernel_blacklist - revamped the module

* file default and setting "lines" when file does not exist

* added changelog fragment

* added change in arg_spec to the documentation block

* Update plugins/modules/system/kernel_blacklist.py

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

* Update plugins/modules/system/kernel_blacklist.py

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

* Update plugins/modules/system/kernel_blacklist.py

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

* fixed: initialize self.pattern before self.var.is_blacklisted

* File writing recoded

* added try/finally for the file

* multiple changes:

- fixed case when last line of the existing file has no newline char
- added integration tests

* PR: integration test now using remote_tmp_dir

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-20 19:39:35 +02:00
Matthew Martin
02d0e3d286
openbsd_pkg: Fix KeyError (#3336)
If package installation has an error after the package is install (e.g.
when running tags), then there will be output on stderr and the fallback
regex will match; however, since pkg_add exited non-zero, changed is
never added as a key to the dictionary. As a result the code at the end
of main that checks if anything has changed raises a KeyError.
2021-09-20 19:19:04 +02:00
Chris Frage
9ce1009643
Add require_two_factor_authentication property to gitlab group (#3367)
* feat: add require_two_factor_authentication property

* chore: add changelog fragment

* chore: add gitlab_group test tasks

* chore: add gitlab tests

* chore: add gitlab group tests

* docs: apply suggestions

* fix: removing default value
2021-09-20 06:55:43 +02:00
Chris Frage
e48f9fdf74
Add gitlab_project CI/CD properties (#3379)
* feat: add ci_config_path property

* feat: add shared_runners_enabled property

* chore: add changelog fragment

* docs: add missing dot

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

* docs: ci_config_path change description

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-09-20 06:54:43 +02:00
Alexei Znamensky
7aae8d5386
Interfaces_file - improvements (#3328)
* pythonific!! no camel cases, bitte

* simplified iface attributes parsing

* some improvements, passing tests

* simplified set_interface_option()

* further simplifications

* remove unreachable stmt

* pythonified a file open

* added changelog fragment

* adjustment per PR

* PR: fixed the auto- case

* PR: added testcase and chglog frag for the misleading change report

* extra line removed

* integration is not destructive
2021-09-19 13:44:37 +02:00
Max Bidlingmaier
7a2efb4775
Get behavior of gitlab_project_members to the one of gitlab_group_members (#3319)
* Initial change to get behaviour of gitlab_project_members like the new gitlab_group_members

* added changelog

* linter: removed trainling whitespaces

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

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

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

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

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

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

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

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

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

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

* requested changes

* linter fixes

* undoing formatting changes to existing code

Co-authored-by: Max-Florian Bidlingmaier <Max.Bidlingmaier@konsolan.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Max Bidlingmaier <Max-Florian.Bidlingmaier@sap.com>
2021-09-16 22:26:31 +02:00
Patrick Pfurtscheller
331f5bdf24
redfish_utils: adding "Id" to the add user function (#3343)
* Adding "Id" to the add user function

Some implementations of Redfish (e.g. the one in Cisco's CIMC) seem to require the id of the new user for account creation.
I'm not that firm with Python but lines 982 and 983 should fix it.

* changed indention

* created changelog fragment

* Update changelogs/fragments/3343-redfish_utils-addUser-userId.yml

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

* Update change type

* supplemented the description of the ID parameter

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-16 22:20:49 +02:00
Martin Vician
dc8d076a25
tss: add option for token authorization (#3327)
* Added token parameter for AccessTokenAuthorizer

Parameters username and password are not required anymore because of
this.

* Added changelog fragments

* Apply suggestions from code review

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

* token authorizer is prioritized

token authorizer is prioritized when token parameter is set

* Apply suggestions from code review

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

* domain optional if token not provided

* Updated examples

- `base_url` is required everywhere
- examples for user, name + domain authorization included
- token authorization included

* Update 3327-tss-token-authorization.yml

* Apply suggestions from code review

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-14 13:34:59 +02:00
Ajpantuso
118c040879
pids - refactor module to make version-based behavior consistent (#3315)
* Initial commit

* Adding changelog fragment

* Further refactoring

* Fixing bad copy/paste and adding task for psutil >= 5.7.0 install

* Inverting psutil installation order to reduce duplication

* Optimizing regex compilation
2021-09-13 07:16:49 +02:00
Raphaël Droz
0a5db85ad5
gitlab_runner: Support project-scoped runners registration (#2971)
* support project-scoped gitlab.com runners registration

* rename glproject variable to gitlab_project

* update version

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

Co-authored-by: Raphaël Droz <raphael.droz+floss@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-13 07:16:06 +02:00
Ajpantuso
29e4066944
New filter plugin - unicode_normalization (#3359)
* Initial commit

* Adding maintainer in BOTMETA

* Adding changelog fragment

* Updating filter_guide

* Applying initial review suggestions
2021-09-12 13:46:53 +02:00
Roy Lenferink
612543919e
Add ipaselinuxusermaporder option to the ipa_config module (#3178) 2021-09-12 13:46:17 +02:00
mkschuel
58d018ebbd
Adds few more gitlab group options (#3248)
* Adds few more gitlab group options

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

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

* Removes default for new string options

* Removes default from argument_spec

* Adds changelog fragment

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

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

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

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

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

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

Co-authored-by: Maik Schueller <maik.schueller@sap.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-10 23:38:26 +02:00
Alexei Znamensky
dd25c0d3bf
django_manage - split params (#3334)
* django_manage - fix fixures

* docs formatting adjustments

* param apps also in need of splitting

* oops, the splitted version was not being properly added to the command args

* added changelog fragment

* check for None

* moving to shlex.split()

* Update changelogs/fragments/3334-django_manage-split-params.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-07 06:22:46 +02:00
Felix Fontein
a20862797e
Fix default value of new option. (#3338) 2021-09-07 08:37:10 +12:00
Alexei Znamensky
0f9311c3d9
zpool_facts - pythonification (#3332)
* pythonification

* added changelog fragment

* adjustment per PR
2021-09-06 19:23:33 +02:00
Manuel Gayer
76317d1f64
nmcli: Support GSM connections (#3313)
* nmcli: Support GSM connections

* Add GSM support
* Add GSM unit test

* nmcli: Add changelog fragment

* nmcli: Fix GSM unit test

* Fix copy-paste error in test_gsm_mod

* nmcli: Fix yaml formatting

* nmcli: Fix yaml formatting

* nmcli: Fix typeerror

* type must be str not string

* nmcli: Fix gsm_show_output

* gsm.username did not match input

* nmcli: Fix gsm_show_output

* doublechecked generated output with test-client

* nmcli: GSM fix unit test

* Removed `mocked_gsm_connection_unchanged`

* Revert "nmcli: GSM fix unit test"

This reverts commit 2d112b779a.

* nmcli: gsm fix unit test

* Add needed output to `TESTCASE_GSM_SHOW_OUTPUT`
* Move `mocked_gsm_connection_unchanged`to sort correctly

* nmcli: gsm fix _compare_conn_params

* Strip double-qoutes of gsm.apn if exist

* nmcli: GSM apply suggestions from code review

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

* nmcli: GSM: Fix documentation

* Shorten too long lines

* nmcli: GSM apply suggestions from code review

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

* nmcli: GSM add version

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-05 18:28:04 +02:00
Kyle Williams
3502f3b486
redfish: clean etag of quotes before patch (#3296)
* Some vendors surround header etag with quotes, which need to be cleaned before sending a patch

* Minor change fragment

* Add etag strip quote option

* Rebase

* Cleanup fragment

* Apply suggestions from code review

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

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

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

* Description update

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

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

Co-authored-by: Kyle Williams <kyle.williams@thetradedesk.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-01 22:59:27 +02:00
Silvie Chlupova
7c493eb4e5
Fix copr integration tests (#3237)
Fixes: #2084
2021-09-01 22:58:10 +02:00
Max Bidlingmaier
fce562ad6d
Enhancement to gitlab_group_members to accept user lists as input (#3047)
* - fix to issue 3041
- add func to work with user lists
- add func to set members to the ones give

* Added version_added to new parameter

* fixed elements in definition of gitlab_users nad wrong import in gitlab_users

* linter issues fixed

* added list elelements to argument_spec

* More whitspeaces for the linter

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

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

* adapted changelog

* removed bugfix (other PR), changes due to review

* changed input handling according to review

* Fixed test findings

* Added list of dict to allow for specifying user/access_level tuples

* corrected doc section

* fixed parameter definitions

* removed strange additional import

* Update changelogs/fragments/3041-gitlab_x_members_fix_and_enhancement.yml

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

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

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

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

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

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

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

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

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

* fixed required if

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

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

* Added suggestions from PR

* fixed identation problem

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

Co-authored-by: Zainab Alsaffar <za5775@rit.edu>

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

Co-authored-by: Zainab Alsaffar <za5775@rit.edu>

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

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

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

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

* Recommended changes from discussionst

* Fixed issues from automatic tests

* added missing metaclass due to test finding

* added integration tests

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* fixed optimization for only one user

* Reverted gitlab_project_members to original version - changes will be done in a separate branch

* added examples for new functionality

* - fixed changelog after reverting gitlab_project_memebers
- fully reverted gitlab_project_members

* Fixed error handling: when single users are not updateable in bulk mode the exception should not stop the code flow but document the problem in the result.

* Better error handling

* on error give username, not gitlab numeric userid

* Fixed broken check_mode

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

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

* Change from review

Co-authored-by: Max Bidlingmaier <Max-Florian.Bidlingmaier@sap.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Zainab Alsaffar <za5775@rit.edu>
2021-08-31 15:07:52 +02:00
Alexei Znamensky
1f5345881d
open_iscsi - minor refactoring (#3286)
* open_iscsi - minor refactoring

* added changelog fragment
2021-08-31 13:09:29 +02:00
Alexei Znamensky
edd7b84285
pamd - fixed issue+minor refactorings (#3285)
* pamd - fixed issue+minor refactorings

* added changelog fragment

* added unit test suggested in issue

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

* fixed per PR + additional adjustment

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-31 12:34:57 +02:00
Alexei Znamensky
b2bb7e3f9c
django_manage - added splitting the command parameter for running (#3283)
* added splitting the command parameter for running

* added changelog fragment

* refactored variable names for improved readability
2021-08-31 07:14:08 +02:00
froebela
baa721ac22
zfs.py: treated received properties as local and added diff mode support (#502)
* zfs.py: treated received properties as local and added diff mode support

If you use "zfs set" to explicitly set ZFS properties, they are marked as from source "local". If ZFS properties are implicitly set by using "zfs send" and "zfs receive", for example as part of a template based installation, they are marked as from source "received". But as there is no technical difference between both types of them, the “received” ZFS properties should also be considered “local”. Otherwise Ansible would detect changes, which aren’t actual changes. Therefore I changed line 202/207 to reflect this.

For us it’s quite important, that Ansible modules support the diff mode in order to qualify changes. Therefore I added some code lines to address this.

* added changelog fragment for PR #502

* fixed typos in changelog fragment for PR #502

* minor changes in changelog fragment for PR #502

* added link to pull request in changelog fragment for PR #502

* extended the diff data structure to always include the name of the zfs filesystem

* added code to also maintain the diff data structure after a change

* reverted back some code lines for better code readability

* added an extra dict in the diff data structure to hold the zfs properties
2021-08-31 07:11:58 +02:00
Sebastian Damm
d9dcdcbbe4
udm_dns_record: Fix handling of PTR records (#3244) (#3256)
* udm_dns_record: Fix handling of PTR records (#3244)

Before, it was not possible to manage PTR records in Univention DNS,
due to broken zone lookups and improper used parameters of the object.
This patch fixes the PTR handling, allowing both v4 and v6 entries.

* udm_dns_record: [doc] add changelog fragment

* udm_dns_record: [fix] validation errors

* udm_dns_record: import ipaddress module conditionally (#3244)

* udm_dns_record: fix sanity check error, improve doc (#3244)

* udm_dns_record: Improve changes to meet community standards (#3244)
2021-08-30 06:53:30 +02:00
Reto Kupferschmid
1ce79db763
add deprecation warning for python-dnsimple 1 (#3267)
* add deprecation warning for python-dnsimple 1

* add changelog fragment

* Update changelogs/fragments/3267-dnsimple1-deprecation.yml

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

* Update plugins/modules/net_tools/dnsimple.py

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

* fix typo

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

* Update plugins/modules/net_tools/dnsimple.py

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

* Update changelogs/fragments/3267-dnsimple1-deprecation.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-29 13:20:46 +02:00
Alexei Znamensky
df8fdcda79
mh CmdMixin - added ArgFormat.BOOLEAN_NOT and logic (#3290)
* mh CmdMixin - added ArgFormat.BOOLEAN_NOT and logic

* added changelog fragment
2021-08-29 13:03:15 +02:00
Alexei Znamensky
a91eb6ae4f
snap - improved error handling (#3211)
* snap - improved error handling

* added changelog fragment

* removed experiments left overs

* rolled back the smaller list of params for commands other than install
2021-08-28 21:54:39 +02:00
Alexei Znamensky
69641d36e1
openwrt_init - improvements (#3284)
* improvements on openwrt_init

* added changelog fragment
2021-08-28 21:50:09 +02:00
Atlas974
4e2d4e3c68
Fixed incorrect VMID: cloning to an existing VM (#3266)
* Fixed incorrect VMID: cloning to an existing VM

During a cloning operation, if the destination VM already exists the VMID returned is not correct.
The VMID returned should be that of the destination VM and not that of the source VM (consistent with line 1230).
A playbook that relies on the returned VMID, for example, to perform other operations on the destination VM, will not work properly if it is unexpectedly interrupted.

* Add files via upload

* moved 3266-vmid-existing-target-clone.yml to changelogs/fragments/
replaced line separator CRLF -> LF

* storing vmid list in variable to avoid multiple API calls
2021-08-27 18:48:32 +02:00
Kellin
e77adff0b7
Linode Inventory can use full IP data from APIv4 (#3203)
* Linode Inventory can use full IP data from APIv4

- The Linode dynamic inventory module does not currently distinguish
  between private and public IP addresses even though the Linode APIv4
  contains this information. This change keeps the current behavior as
  the default and adds an option to set `ip_style: api`. When set, this
  option allows administrators to differentiate between private, public,
  slaac, local_link, and pool network addresses providing a more nuanced
  and granular view of the remote host's network information.

Signed-off-by: Kellin <kellin@retromud.org>

* Review - amend changelog details

- Adds a link back to this pull request
- Uses markdown styles for easier to read publishing in the changelogs
- Amends the wording style to match the existing changelog styles

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

* Add scope to example invocation

- Adds the `community.general` scope to invocation example

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

* Convert lamda to list comprehension

- Change the ip type filter from a lambda to a list comprehension

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

* Add punctuation to description sentence

- Adds a period to the end of the description sentence

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-27 06:20:04 +02:00
Laurent Paumier
825e17c1cf
Fix keycloak_realm module (#3231)
* fix events_listeners element type
add events_enabled parameter

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

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

* add changelog

* Update changelogs/fragments/3231-fix-keycloak-realm-events.yml

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

* Update changelogs/fragments/3231-fix-keycloak-realm-events.yml

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

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-27 06:17:04 +02:00
Nicolas Karolak
cc458f7c37
parse scw-cli config file for oauth_token (#3250)
If `api_token` is not set and config file exists, it will try to fetch
the value from the activated profile and fallback on default.

This should not break existing workflows.
2021-08-27 06:08:54 +02:00
zerotens
b8a081b9b2
nmcli: Support gre tunnels (#3262)
* Add gre tunnel support

* Add gre tunnel support

* Fix Blank Lines

* Fix unit test
Add changelog fragment

* Update plugins/modules/net_tools/nmcli.py

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

* Update Docs

* Update plugins/modules/net_tools/nmcli.py

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

* Update Docs

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-26 08:16:36 +02:00
Ajpantuso
cbcb942b0e
tss_lookup_plugin - Refactor and decoupling (#3252)
* Initial commit

* Adding changelog fragment

* Applying initial review suggestions

* Increasing unit coverage

* Removed unneccessary constant

* Improving test readability

* Cleanup constants
2021-08-25 06:41:05 +02:00
Felix Fontein
f2fa56b485
Fix apache2_module a2enmod/a2dismod detection and error message if not found. (#3258) 2021-08-25 06:36:19 +02:00
zerotens
1ca9c35010
nmcli: allow IPv4/IPv6 configuration on ipip and sit devices (#3239)
* Allow IPv4/IPv6 configuration on mode "sit" tunnel devices

* Update Unit Test for Allow IPv4/IPv6 configuration on mode "sit" tunnel devices

* Add changelog for Allow IPv4/IPv6 configuration on mode "sit" tunnel devices

* Update changelogs/fragments/3239-nmcli-sit-ip-config-bugfix.yaml

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

* Added ip4/ip6 configuration arguments for ipip tunnels

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-23 06:24:05 +02:00
Matt 'Archer' Vaughn
23e7ef0255
Add option for retry_servfail (#3247)
* Add option for retry_servfail

cf. https://dnspython.readthedocs.io/en/latest/resolver-class.html#dns.resolver.Resolver.retry_servfail

Setting this option to `True` allows for the possibility of the lookup plugin to retry and thereby recover from potentially transient lookup failures, which would otherwise cause the task or play to bail with an unrecoverable exception.

* Create 3247-retry_servfail-for-dig

* documentation for `retry_servfail` option

* Rename 3247-retry_servfail-for-dig to 3247-retry_servfail-for-dig.yaml

* fix whitespace

* Update plugins/lookup/dig.py

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

* Update plugins/lookup/dig.py

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

* rm try/except block

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-21 21:57:28 +02:00
David Hummel
8a62b79ef2
nmcli: Disallow Wi-Fi options not supported by nmcli (#3141)
* nmcli: Disallow Wi-Fi options not supported by nmcli

By querying nmcli directly

* Added changelog fragment

* Added tests

* Simplify `get_available_options()`

* Update changelogs/fragments/3141-disallow-options-unsupported-by-nmcli.yml

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

* Remove redundant `802-11-wireless` settings from test show outputs

* Update `mocked_wireless_create(mocker)`

* Update plugins/modules/net_tools/nmcli.py

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

* Address comment re. creating function & use nmcli naming conventions

I.E. `setting`.`property` = `value`

```
nmcli> help set
set [<setting>.<prop> <value>]  :: set property value

This command sets property value.

Example: nmcli> set con.id My connection
```

* Added `ignore_unsupported_suboptions` option & improved `wifi(_sec)` doc

* Corrected pep8 issues

```
ERROR: Found 2 pep8 issue(s) which need to be resolved:
ERROR: plugins/modules/net_tools/nmcli.py:342:161: E501: line too long 
(236 > 160 characters)
ERROR: plugins/modules/net_tools/nmcli.py:359:161: E501: line too long 
(237 > 160 characters)
```

* Fixed remaining sanity check issues and added even more docs

* No need to split Note

* Update plugins/modules/net_tools/nmcli.py

3.5.0 has already been released.

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

* Followed uniformity guideline for format macros from Ansible's dev guide

* Addressed comment

https://github.com/ansible-collections/community.general/pull/3141#discussion_r689098383

* Documentation cleanup continuation

* Replace `NM_SETTING_*`s having a description with their numeric value

* Splitting up long paragraphs.

Also removed `wifi`.`seen-bssids` as it "`is only meant for reading`"

* Addressed remaining comments and clarified `wake-on-lan` note

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Finishing addressing documentation comments.

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update nmcli.py

* Added wifi-related `list` type options to `settings_type` method

* Moved `edit_commands` `execution` logic into its own method

* Move `unsupported_property` deletion into `main` function

* Missing `.items()`

* Resolved missing proper `nmcli conn edit` arguments

* Resolve pylint issue `dangerous-default-value`

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: David Hummel <dhummel@Fingerling>
2021-08-20 21:45:30 +02:00
Martin Vician
bcccf4e388
Add option for domain authorization (#3228)
Use DomainPasswordGrantAuthorizer if parameter `domain` is used.
2021-08-20 13:54:29 +02:00
Jacob
c7fccb2c01
redfish_info: Include Status property for GetChassisThermals (#3233)
* redfish_info: Include Status property for GetChassisThermals

Include Status property for Thermal objects when querying Thermal properties
via GetChassisThermals command.

FIXES #3232

* fixup for rename of fragments file

* Update changelogs/fragments/3233-include-thermal-sensor-status-via-redfish_info.yaml

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-19 21:13:10 +02:00
Ricky White
6ac410b3f6
tss: added fix for bug report in issue #3192 (#3199)
* Added fix for bug report in issue #3192

* Added changelog fragment

* Typo fix

* Added Importerror to exception - as req by linters

* Moved the conditional import statement to try/except block
2021-08-18 09:26:44 +02:00
Alexei Znamensky
41101e55a0
module_helper - implemented classmethod to start the module (#3206)
* module_helper - implemented classmethod to start the module plus minor change

* rolled back the __changed__() method

* added changelog fragment

* Update plugins/module_utils/mh/base.py

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* no capt Piccards allowed in the base class

* removed extra piccards

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-08-17 10:43:18 +02:00
Alexei Znamensky
8a4cdd2b8a
slack - minor refactoring and pythonifying (#3205)
* slack - minor refactoring and pythonifying

* added changelog fragment

* Update changelogs/fragments/3205-slack-minor-refactor.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-16 12:24:15 +02:00
Alexei Znamensky
16945d3847
vdo - refactor (#3191)
* refactor to vdo

* adjusted if condition

* added changelog fragment

* Update plugins/modules/system/vdo.py

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

* adjustements per the PR

* more occurrences of bool compared with yes or no

* Update changelogs/fragments/3191-vdo-refactor.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-16 12:23:06 +02:00
Daniel Ziegenberg
25267b8094
ini_file: add multiple options with same name to ini file (#3033)
* ini_file - prepare for fixing #273
 - restructure tests
 - fix error message call: fail_json() takes 1 positional argument but 2 were given

* ini_file - multiple values for one option (#273)
  - add module option 'exclusive' (boolean) for the abbility to add
    single option=value entries without overwriting existing options
    with the same name but different values
  - add abbility to define multiple options with the same name but
    different values

* ini_file - add more tests for ini_file

* ini_file - fix sanity tests

* apply suggested changes:

- rename 03-regressions.yml to 03-encoding.yml
- fix typos
- fix documentation

* apply suggested changes:

- test errors also for result is failed

* apply suggested changes:

- make state=absent also work with module option exclusive
- add more tests for state=absent and module option exclusive

* fix sanity test:

- 02-values.yml:251:9: hyphens: too many spaces after hyphen

* apply proposed changes

* apply proposed changes from review
- adjust version_added to 3.6.0
- small syntax change in changelog fragment
2021-08-15 12:59:50 +02:00
Felix Fontein
f7dba23e50
Remove deprecated netapp leftovers. (#3197) 2021-08-12 22:14:34 +02:00
Felix Fontein
e123623f5c Fix PR #. 2021-08-12 13:11:02 +02:00
Felix Fontein
1fec1d0c81
Fix new devel sanity errors. (#3194) 2021-08-12 12:07:50 +02:00
Ajpantuso
1e466df863
archive - idempotency enhancement for 4.0.0 (#3075)
* Initial Commit

* Comparing with tar file checksums rather than tar header checksums

* Added changelog fragment

* Revert "Comparing with tar file checksums rather than tar header checksums"

This reverts commit bed4b17107.

* Restricting idempotency tests by format

* Applying review suggestions
2021-08-12 08:18:38 +02:00
Sebastian
6033ce695b
zypper: support transactional-updates (#3164)
* zypper: support transactional-updates

- Check if transactional updates are in use by checking for the
  existence of /var/lib/misc/transactional-update.state
- Prefix zypper-commands with /sbin/transactional-update --continue --drop-if-no-change --quiet run
  if this is the case

fixes ansible-collections/community.general#3159

* re-add get_bin_path for executables

* fix typo
2021-08-12 08:17:03 +02:00
Dag Wieers
b5d6457611
Support older version of psutil (RHEL7 and RHEL6) (#2808)
* Support older version of psutil (RHEL7 and RHEL6)

The psutil python module is a true mess, they changed the API twice. The function arguments, as well as the objects that are returned.
The documentation does not make it clear which version supports what so the safest implementation is this waterfall approach.

A better approach would be to inspect the returned information, rather than trust a version, but that would not be any more efficient.
In the end it is better to have something that at least works out-of-the-box on all platforms than something that requires custom updates to system packages before it works as expected. Especially for something as basic as `pids`.

* A little bit more concise

* Apply suggestions from code review

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-10 07:49:18 +02:00
zorun
56b5be0630
openbsd_pkg: Fix regexp matching crash (#3161)
When a package name contains special characters (e.g. "g++"), they are
interpreted as part of the regexp.

This can lead to a crash with an error in the python re module, for
instance with "g++":

    sre_constants.error: multiple repeat

Fix this by escaping the package name.

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
2021-08-09 22:44:36 +02:00
David Hummel
7f96b7df60
nmcli: writing secrets to command line is a security hole (#3160)
* nmcli: use `stdin` for setting private `wifi_sec` options

I.E.:
* `802-11-wireless-security.leap-password`
* `802-11-wireless-security.psk`
* `802-11-wireless-security.wep-key0`
* `802-11-wireless-security.wep-key1`
* `802-11-wireless-security.wep-key2`
* `802-11-wireless-security.wep-key3`

* Changelog fragement formatting.

* Update changelogs/fragments/3160-pass-wifi-secrets-via-stdin-to-nmcli-module.yml

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

* Make `wifi_sec_secret_options()` into a constant

* Minor cleanup

`'set ' + key + ' ' + value`
=>
`'set %s %s' % (key, value)`

* Change `casing`

* Change `WIFI_SEC_SECRET_OPTIONS` from `list` to `tuple`

* Update `edit_connection()` to not reset `edit_commands`

It will just re`set` them if `edit_connection()` is called more than 
once.

* Do not call `edit_connection()` if `connection_update(*)` fails

* Fixed `pep8` issue `E713` in tests

`test for membership should be 'not in'`

* Simplify `create_connection()`/`modify_connection()` logic

* `WIFI_SEC_SECRET_OPTIONS`=>`SECRET_OPTIONS`, options are prefixed

* Moved `if key in self.SECRET_OPTIONS` into `if value is not None` check

We don't need to do anything is the value is None

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-08 18:35:52 +02:00
quidame
2831bc45f5
ini_file: fix empty-value vs. no-value inconsistency (#3074)
* fix empty-value vs. no-value inconsistency

* rename changelog fragment

* tests: omit value where there should be no value

* add integration tests
2021-08-08 18:34:34 +02:00
David Hummel
6bfa6e40f4
nmcli: Fix change detection for Wi-Fi security options (#3136)
* Fixed `wifi_sec` option changes are not detected

Also updated `docs` URL and formatting to match that of the `wifi`
option

* Removed extraneous `appends` to `cmd` in `connection_update`

These really should have only been added to `connection_options` whose 
return values get `extended` onto `cmd`
2021-08-07 15:20:44 +02:00
Bartosz
ff586f1105
pkgin: display stdout and stderr in case the error occurs (#3148)
* pkgin: display stdout and stderr in case the error occurs

* Update changelogs/fragments/pkgin-output-after-error.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-06 10:01:05 +02:00
rainerleber
e9494c12f2
Hana query userstore (#3125)
* add hdbuserstore ability

* add description

* fix

* add default

* add description

* add sample

* Apply suggestions from code review

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

* add fragment, fix required if

* remove whitespace

* add coding fragment

* Apply suggestions from code review

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

* added test for userstore

* Update plugins/modules/database/saphana/hana_query.py

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

Co-authored-by: Rainer Leber <rainer.leber@sva.de>
Co-authored-by: quidame <quidame@poivron.org>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-05 22:42:43 +02:00
Ricky White
a73720c103
Updated the tss lookup plugin to reflect breaking changes introduced in the underpinning SDK (#3139)
* Updated the plugin to reflect breaking changes introduced in the underlying SDK v1.0.0 update.

* Added Changelog fragment

* Updates based on feedback/review

* Added newline to pass CI

* Added whitepace for linter

* Update changelogs/fragments/3139-tss-lookup-plugin-update-to-make-compatible-with-sdk-v1.yml

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-05 19:28:32 +02:00
Reto Kupferschmid
3dba697e33
nmcli: manage dummy connections (#3132)
* manage dummy connections

* add issue reference in changelog fragment

* Update changelogs/fragments/3132-nmcli-dummy.yaml

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

* resolve test conflicts

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-05 14:25:42 +02:00
Scott Seekamp
75688cb632
redfish_command: allow setting the BootSourceOverrideMode property (#3135)
* For #3134

Expose BootOverrideMode parameter to redfish_command to allow setting by user during run.

* Fix trailing whitespace

* Add changelog fragment to contribution.

* Update changelogs/fragments/3135-add-redfish_command-bootoverridemode.yaml

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

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

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

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

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

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

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

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

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

* Update changelogs/fragments/3135-add-redfish_command-bootoverridemode.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-04 19:53:43 +02:00
Reto Kupferschmid
f2df1a7581
dnsimple update for python-dnsimple >=2.0.0 (#2946)
* update dnsimple module

* dnsimple: fixes for python-dnsimple >= 2.0.0

* Update plugins/modules/net_tools/dnsimple.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* rewrite module to support dnsimple-python v1 and v2

* add changelog fragment

* fix sanity checks

* python 2 fixes

* fix dnsimple requirement

* add sandbox module parameter

* Update changelogs/fragments/2946-python-dnsimple-v2-rewrite.yml

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

* Update plugins/modules/net_tools/dnsimple.py

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

* return only the first traceback

* Update plugins/modules/net_tools/dnsimple.py

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

* Update plugins/modules/net_tools/dnsimple.py

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

* use separate classes for python-dnsimple 1 and 2

* add basic tests

* fix checks

* skip tests for unsupported python versions

* Update plugins/modules/net_tools/dnsimple.py

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

* fix conditions

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-04 08:36:45 +02:00
David Hummel
857d2eee50
nmcli: Add support for additional Wi-Fi network options (#3081)
* nmcli: Add support for additional Wi-Fi network options

* Added `changelog fragment`

* Update changelogs/fragments/3081-add-wifi-option-to-nmcli-module.yml

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-04 08:16:11 +02:00
Yvan Watchman
9ccce82113
Feature: implement hpilo_info system power info (#3079)
* report power state of host

* Modify sample information

* add changelog fragment

* apply feedback from github community

* apply feedback

Co-authored-by: Yvan E. Watchman <git@yvanwatchman.eu>
2021-07-31 17:43:45 +12:00
Alexei Znamensky
d9533c44aa
apache2_module - multiple improvements (#3106)
* multiple improvements

* added changelog fragment

* comment and name in int test files

* added notes to the documentation

* removed the extraneous changelog frag

* Update plugins/modules/web_infrastructure/apache2_module.py

* adjusted doc text for sanity check

* Update plugins/modules/web_infrastructure/apache2_module.py

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

* removed extraneous dependency in integration test

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-30 18:07:38 +02:00
Alexei Znamensky
cde9564163
deploy_helper - changed in-code condition to required_if (#3104)
* changed in-code condition to required_if

* added changelog fragment
2021-07-29 07:49:52 +02:00
Alexei Znamensky
549dfaae64
gunicorn - minor refactoring (#3092)
* minor refactoring in gunicorn module

* added changelog fragment

* reworked the gunicorn bin path part of the code, per PR

* Update changelogs/fragments/3092-gunicorn-refactor.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-28 08:43:09 +02:00
Alexei Znamensky
0b70b3baff
django_manage - using list instead of string in run_command() (#3098)
* django_manage - using list instead of string in run_command()

* added changelog fragment
2021-07-28 08:22:18 +02:00
Alexei Znamensky
5be4adc434
ejabberd_user - refactoring and simplification (#3093)
* ejabberd_user - refactoring and simplification

* added changelog fragment

* Update changelogs/fragments/3093-ejabberd_user-refactor.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-28 07:49:37 +02:00
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
Bill Dodd
efd441407f
Add support for Redfish session create, delete, and authenticate (#2027)
* Add support for Redfish session create and delete

* add changelog fragment

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-19 13:14:33 -07:00
Ajpantuso
79fb3e9852
Adding purge parameter to proxmox for use with lxc delete requests (#2013)
* added purge as optional module parameter

* Adding changelog fragment

* Adding version to documentation for purge

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

* Updating changelog

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-19 19:18:05 +01:00
Bill Dodd
0b2ebabd29
Fix IndexError in SetManagerNic (#2040)
* fix IndexError in SetManagerNic

* add changelog fragment
2021-03-19 19:06:57 +01:00
abarbare
fe61be3e11
fix: scaleway inventory pagination (#2036)
* fix: scaleway inventory pagination

* add changelog

* Update changelogs/fragments/2036-scaleway-inventory.yml

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

Co-authored-by: Antoine Barbare <abarbare@online.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-18 23:06:56 +01:00
Alexei Znamensky
4fbef900e1
Improvements and fixes to ModuleHelper, with (some) tests. (#2024)
* Improvements and fixes to ModuleHelper, with (some) tests.

* added changelog fragment

* adjusted changelog frag - get_bin_path() handling is actually a bugfix
2021-03-17 13:39:49 +01:00
Ajpantuso
0f61ae4841
Adding tags as module parameter to proxmox_kvm (#2000)
* Adding tags as module parameter

* Added changelog fragment

* Correcting typo in changelog fragment

* Correcting punctuation in docs

* Including version to tags parameter description

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

* Correct tag validation and parsing logic condition

Original test was for key and not value

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

* Improving usability with default null behavior

* Removing default case and related unneccessary complexity

* Display regex in tags description as code

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-15 13:39:23 +01:00
dacodas
3162ed6795
allow passing the --allow-root flag to kibana_plugin module (#2014)
* kibana_plugin module parameter force is a boolean

* allow passing the --allow-root flag to kibana_plugin module

* add changelog fragment for kibana_plugin --allow-root

Co-authored-by: Amin Vakil <info@aminvakil.com>
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-03-15 13:35:34 +01:00
Alexei Znamensky
84b54ad6a2
rax - removed service parameter (#2020)
* removed service parameter

* added changelog fragment
2021-03-14 12:22:03 +01:00
Alexei Znamensky
f8859af377
Tidy up sanity checks ignore lines modules (batch 8) (#2006)
* fixed validation-modules for plugins/modules/cloud/smartos/smartos_image_info.py

* fixed validation-modules for plugins/modules/cloud/rackspace/rax_scaling_group.py

* fixed validation-modules for plugins/modules/cloud/rackspace/rax_cdb_user.py

* fixed validation-modules for plugins/modules/cloud/rackspace/rax.py

* Tidy up sanity checks ignore lines modules (batch 8)

* added changelog fragment

* rolled back removal of parameter from rax.py
2021-03-14 10:53:49 +01:00
Ajpantuso
4676ca584b
Remove password requirement when creating lxc containers (#1999)
* Removed requirement for password

* Updated documentation for password

* Adding changelog fragment

* Update changelogs/fragments/1999-proxmox-fix-issue-1955.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-12 19:17:41 +01:00
Felix Fontein
1ea080762b
Mark non-secret leaking module options with no_log=False (#2001)
* Mark non-secret leaking module options with no_log=False.

* Add changelog fragment.
2021-03-12 08:51:47 +01:00
Jeffrey van Pelt
178209be27
Excluded qemu templates in pools (#1991)
* Excluded qemu templates in pools

* Added changelog fragment

* Made check more robust
2021-03-12 08:00:03 +01:00
Ajpantuso
d0bb74a03b
Allow tags strings containing commas in proxmox inventory plug-in (#1949)
* Included explicit parsing for proxmox guest tags and updated corresponding unit test with tags key

* Including changelog fragment for PR 1949

* Removed ellipsis from test

Proxmox only permits periods when surrounded by alphanumeric characters

* Corrected punctuation for changelog entry

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

* Allowing tags string to contain commas

* Incorporated new parsed tags fact with bugfix

* Correcting whitespace issues

* Update changelogs/fragments/1949-proxmox-inventory-tags.yml

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

* Update plugins/inventory/proxmox.py

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

* Update changelogs/fragments/1949-proxmox-inventory-tags.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-11 22:08:11 +01:00
Alexei Znamensky
7452a53647
jenkins_job - added validate_certs parameter, setting the PYTHONHTTPSVERIFY env var (#1977)
* added validate_certs parameter, setting the PYTHONHTTPSVERIFY env var

* added changelog fragment

* Update plugins/modules/web_infrastructure/jenkins_job.py

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

* Update plugins/modules/web_infrastructure/jenkins_job.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-11 22:06:57 +01:00
Felix Fontein
36daa7c48e
Remove deprecated features scheduled for removal in 3.0.0 (#1926)
* Remove deprecated features.

* Remove ignore.txt entries.

* Update changelogs/fragments/remove-deprecated-features.yml

Co-authored-by: Joe Adams <adams10301@gmail.com>

Co-authored-by: Joe Adams <adams10301@gmail.com>
2021-03-09 21:23:20 +01:00
Alexei Znamensky
2906591c08
Tidy up sanity checks ignore lines modules (batch 7) (#1970)
* fixed validation-modules for plugins/modules/cloud/heroku/heroku_collaborator.py

* fixed validation-modules for plugins/modules/cloud/linode/linode_v4.py

* fixed validation-modules for plugins/modules/remote_management/manageiq/manageiq_provider.py

* fixed validation-modules for plugins/modules/remote_management/manageiq/manageiq_policies.py

* fixed validation-modules for plugins/modules/remote_management/manageiq/manageiq_alert_profiles.py

* fixed validation-modules for plugins/modules/remote_management/manageiq/manageiq_tags.py

* fixed validation-modules for plugins/modules/cloud/opennebula/one_host.py

* fixed validation-modules for plugins/modules/cloud/opennebula/one_image_info.py

* fixed validation-modules for plugins/modules/cloud/opennebula/one_vm.py

* fixed validation-modules for plugins/modules/cloud/scaleway/scaleway_lb.py

* fixed validation-modules for plugins/modules/cloud/scaleway/scaleway_compute.py

* fixed validation-modules for plugins/modules/remote_management/oneview/oneview_network_set_info.py

* fixed validation-modules for plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py

* fixed validation-modules for plugins/modules/remote_management/oneview/oneview_datacenter_info.py

* fixed validation-modules for plugins/modules/remote_management/oneview/oneview_enclosure_info.py

* Tidy up sanity checks ignore lines modules (batch 7)

* added changelog fragment

* Missed a couple of lines in ingnore-2.11.txt

* fixed validation-modules for plugins/modules/cloud/packet/packet_volume_attachment.py

* Adjusted ignore files and changelog for packet_volume_attachment.py

* Rolled back ignore line for linode module

* Update plugins/modules/cloud/opennebula/one_image_info.py

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

* fixes from the PR

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-08 08:35:09 +01:00
Alexei Znamensky
088743749b
ini_file - allows adding empty string as a value (#1972)
* Added integration test and fixed bug

* added changelog fragment

* Update changelogs/fragments/1972-ini_file-empty-str-value.yml

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

* 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-03-08 06:57:40 +01:00
phospi
a013e69d67
Extending manageiq modules with parameter resource_id (#719)
* Extending modules with resource_id

* Added documentation

* Fixed syntax
Changed resource_type back to required true
Added description identifier

* Added changelog fragment.

* fixed syntax

* Improved changelog fragment content.

* Updated description

* Changed if statement

* Changed changelog fragement filename

* version bump

* removed duplicate type

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-08 06:56:34 +01:00
Alexei Znamensky
7425e9840d
Deprecation of parameters triggering the parameter-invalid sanity-check (#1927)
* fixed validation-modules for plugins/modules/packaging/language/composer.py

* fixed validation-modules for plugins/modules/packaging/os/apt_rpm.py

* fixed validation-modules for plugins/modules/packaging/os/homebrew.py

* fixed validation-modules for plugins/modules/packaging/os/homebrew_cask.py

* fixed validation-modules for plugins/modules/packaging/os/opkg.py

* fixed validation-modules for plugins/modules/packaging/os/pacman.py

* fixed validation-modules for plugins/modules/packaging/os/slackpkg.py

* fixed validation-modules for plugins/modules/packaging/os/urpmi.py

* fixed validation-modules for plugins/modules/packaging/os/xbps.py

* fixed validation-modules for plugins/modules/source_control/github/github_deploy_key.py

* fixed validation-modules for plugins/modules/system/puppet.py

* added changelog fragment

* adjustments from PR + fixes in changelog frag

* fixed deprecation of param "show_diff" in module "puppet"

* Update changelogs/fragments/1927-removed-parameter-invalid.yml

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

* Update plugins/modules/system/puppet.py

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

* removed unnecessary ignore lines, adjustment in changelog frag

* no need to explicitly call deprecate() when param marked for removal

* Update changelogs/fragments/1927-removed-parameter-invalid.yml

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

* Adjustments in changelog fragment, per PR

* bumping deprecation to 7.0.0

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-05 08:17:36 +01:00
phospi
ac95ff5b45
Bugfix/manageiq inventory (#720)
* Extending modules with resource_id

* Added documentation

* Revert previous PR

* Added filter for active vm's

* Added changelog fragment

* Update changelogs/fragments/720-cloudforms_inventory.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-04 07:51:39 +01:00
Ox
dec345b818
Fix: nmcli - Ensure slave-type for bond-slave (#1882)
* Fix: nmcli - Ensure slave-type for bond-slave

Hello 🙂 

When using bond-slave type, by default command sent to nmcl is:

['/usr/bin/nmcli', 'con', 'add', 'type', 'bond-slave', 'con-name', 'enp129s0f0', 'connection.interface-name', 'enp129s0f0', 'connection.autoconnect', 'yes', 'connection.master', 'bond0']

Which is not enough, nmcli will complain that connection.slave-type is missing. This small fix solve this issue.

If this change is approved, I will add the changelog fragment.

* Fix: nmcli - Adding changelog fragment for 1882

* Update changelogs/fragments/1882-fix-nmcli-ensure-slave-type-for-bond-slave.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-04 07:49:38 +01:00
sam-lunt
ce5aea790d
zfs: avoid errors with creation-only properties (#1833)
* avoid errors with creation-only properties

* add changelog fragment

* Apply suggestion to changelog fragment

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-04 07:47:45 +01:00
atbore-phx
3f882ee6a2
consul_io inventory script: fixes awx and python 3 kv_group (#620)
* feat(env): extending configuration options by env variables

* feat(env): extending config option docs

* feat(consul_io): fix byte chain decoding for python3

* fix(pep8): E128

* changelog added

* Update changelogs/fragments/620-consul_io-env-variables-conf-based.yml

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

* Update changelogs/fragments/620-consul_io-env-variables-conf-based.yml

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

* Update changelogs/fragments/620-consul_io-env-variables-conf-based.yml

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

* fix(typo): adding dots

Co-authored-by: Davy Bondeau <davy.bondeau@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-04 07:45:05 +01:00
Ox
4f98136771
Feat: nmcli - Add method4 and method6 (#1894)
* Feat: nmcli - Add method4 and method6

Allows to manipulate ipv4.method and ipv6.method.

Is mandatory to manage Bond interfaces with no native vlans but only tagged vlans.

* Fix: nmcli - Add changelog fragment for 1894

* Fix: nmcli - Add choices for method4 and method6

* Update plugins/modules/net_tools/nmcli.py

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

* Update changelogs/fragments/1894-feat-nmcli-add-method4-and-method6.yml

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

* Update plugins/modules/net_tools/nmcli.py

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

* Fix: nmcli - Update documentation

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

* Fix: nmcli - Simplify code

* Update plugins/modules/net_tools/nmcli.py

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

* Fix: nmcli - Update ip6 documentation

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-02 12:46:21 +01:00
Alexei Znamensky
585dd0b6ed
Improved ModuleHelper.run_command() (#1867)
* Improved run_command signature and behaviour

- extra_params has been removed from the signature
- params now can be either str or dict (containing the param value)

* Reverted the removal of the method parameter, and added changelog fragment

* Update changelogs/fragments/1867-modhelper-cmdmixin-dict-params.yml

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

* Update plugins/module_utils/module_helper.py

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

* adjustement per PR

* Update plugins/module_utils/module_helper.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-28 15:06:36 +01:00
Felix Fontein
bec43041a9
grove: message -> message_content (#1929)
* grove: message -> message_content

* Remove no longer needed ignore.txt lines.
2021-02-27 21:23:14 +01:00
Felix Fontein
b4c136125e
Actually use option. (#1928) 2021-02-27 21:23:07 +01:00
Eric L
4a8d6cf7cc
Add version_sort filter to properly sort list of versions (#1916)
* Add version_sort filter to properly sort list of versions

* Fix all comments from Felix

- add changelog fragment
- fix test by removing runme.sh/yml and renaming to filter_version_sort
- use fully qualified name of filter in test case

* Remove wrong plugin.test changelog fragment

Ups...

* Properly name the file version_sort.py

* Update changelogs/fragments/1916-add-version-sort-filter.yml

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

Co-authored-by: Eric L <ewl+git@lavar.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-27 17:42:45 +01:00
Jeffrey van Pelt
20bd065e77
Proxmox inventory: Add some sanitization to url parameter (#1914)
* Added rstrip to the URL field to prevent issues when users add a trailing / in the config of this module

* Added changelog fragment

* Sorry Mr. Linter, I have removed the empty line :-)

* Fixed punctuation

* Fixed punctuation
2021-02-27 17:06:00 +01:00
William Leemans
ea65ce8e0d
bugfix: xfs_quota feedback on projects not initialized has changed (#1596)
* bugfix: xfs_quota feedback on projects not initialized has changed

* changelog fragment

* Update changelogs/fragments/1596-xfs_quota-feedback_on_projects_not_initialized_has_changed.yml

Thanks for this, felixfontein

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

* xfs_quota is not necessarily in PATH

* pep8 and formatting

* Test was wrong. It needs to be changed

* formatting

* pep8 and formatting

* xfs_quota is not necessarily in PATH

* pep8 and formatting

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-27 08:38:24 +01:00
Amin Vakil
811b609b05
yum_versionlock: do lock/unlock concurrently (#1912)
* Change all packages at once in yum_versionlock module

* Re-enable tests

* Convert package list to packages string

* Fix module

* Change variable name to make it appropriate

* Fix module check_mode

* Revert "Fix module" and apply felixfontein suggestion

This reverts commit 5936da3198.

* Rename package to packages

* Only change packages which are needed

* Ignore if list is empty

* Add changelog
2021-02-26 23:16:40 +01:00
Felix Fontein
5447910a0b
Improve meta/runtime.yml deprecation messages. (#1918) 2021-02-26 21:35:53 +01:00
Alexei Znamensky
76d9fe4ec6
Tidy up sanity checks (2021/Batch 3 - who's counting) (#1885)
* fixed validation-modules for plugins/modules/packaging/language/pip_package_info.py

* fixed validation-modules for plugins/modules/packaging/language/maven_artifact.py

* fixed validation-modules for plugins/modules/packaging/language/bundler.py

* fixed validation-modules for plugins/modules/notification/pushbullet.py

* fixed validation-modules for plugins/modules/monitoring/sensu/sensu_handler.py

* fixed validation-modules for plugins/modules/monitoring/sensu/sensu_check.py

* fixed validation-modules for plugins/modules/monitoring/sensu/sensu_client.py

* fixed validation-modules for plugins/modules/monitoring/icinga2_host.py

* fixed validation-modules for plugins/modules/monitoring/datadog/datadog_monitor.py

* fixed validation-modules for plugins/modules/monitoring/datadog/datadog_event.py

* fixed validation-modules for plugins/modules/clustering/znode.py

* fixed validation-modules for plugins/modules/clustering/etcd3.py

* fixed validation-modules for plugins/modules/clustering/consul/consul_session.py

* fixed validation-modules for plugins/modules/clustering/consul/consul_kv.py

* fixed validation-modules for plugins/modules/clustering/consul/consul.py

* fixed validation-modules for plugins/modules/cloud/profitbricks/profitbricks.py

* fixed validation-modules for plugins/modules/cloud/profitbricks/profitbricks_volume.py

* fixed validation-modules for plugins/modules/cloud/packet/packet_sshkey.py

* fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_server.py

* fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_private_network.py

* fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py

* fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_load_balancer.py

* fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_firewall_policy.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_app.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_db.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_domain.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_mailbox.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_site.py

* fixed validation-modules for plugins/modules/remote_management/lxca/lxca_cmms.py

* fixed validation-modules for plugins/modules/remote_management/lxca/lxca_nodes.py

* missed one "elements" in sensu_handler

* Tidy up batch of sanity checks ignore lines

* missed lines in ignore-2.9.txt

* fixed validation-modules for plugins/modules/clustering/consul/consul_acl.py

* Update ignore-2.9.txt

Removed consul_acl.py from ignore-2.9.txt

* Apply suggestions from code review

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Update plugins/modules/notification/pushbullet.py

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

* Update plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py

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

* added changelog fragment

* Update plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py

* Update changelogs/fragments/1885-sanity-check-fixes-batch3.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-02-26 11:37:23 +01:00
Nicolas Marcq
36dea9ab97
cobbler_sync cobbler_system fix TLS check when validate_certs (#1880)
Ref: https://www.python.org/dev/peps/pep-0476/
Issue #1878
add changelog fragment

Co-authored-by: Nicolas Marcq <nicolas.marcq@hpe.com>
2021-02-25 14:55:45 +01:00
Tristan Le Guern
bb7ce740fe
proxmox_kvm: trivial patch for github issue #1875 (#1895)
* proxmox_kvm: trivial patch for Github issue #1875

* proxmox_kvm: add a changelog fragment

* Update changelogs/fragments/1895-proxmox-kvm-fix-issue-1875.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-25 12:34:53 +01:00
Alexei Znamensky
434f383ae9
fixed Python 3 keys() usage (#1861)
* fixed python3 keys()

* added changelog fragment

* Update plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

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

* Update plugins/cache/redis.py

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

* rolledback redis.py per PR

* Update plugins/modules/monitoring/sensu/sensu_check.py

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

* removed unnecessary ignore lines

* adding memcached and one case in redis is indeed necessary

* Update changelogs/fragments/1861-python3-keys.yml

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

* Update changelogs/fragments/1861-python3-keys.yml

* Update changelogs/fragments/1861-python3-keys.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-23 23:19:27 +01:00
Ramon de la Fuente
abfbe2a48d
deploy_helper: fix a bug when not defining release on state=clean (#1859)
* Fix a bug when not defining release on state=clean

* Add changelog fragment
2021-02-22 09:12:21 +01:00
Felix Fontein
c0f3a63e18
Improve infoblox inventory script dependencies. (#1871) 2021-02-21 21:11:54 +01:00
Alexei Znamensky
fdb66d5567
Fixed imc_rest session logout (#1743)
* Fixed imc_rest session logout

* Update plugins/modules/remote_management/imc/imc_rest.py

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

* Update changelogs/fragments/1735-imc-sessions.yml

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

* Trying with try/finally

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-21 17:53:30 +01:00
Tristan Le Guern
5135587c16
proxmox_kvm: fix undefined local variable status (#1847)
* proxmox_kvm: undefined local variable status

* proxmox_kvm: Add a changelog fragment

* Update changelogs/fragments/1847-proxmox-kvm-fix-status.yml

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

* proxmox_kvm: fix the RETURN document

* proxmox_kvm: fix name variable when state=current

The variable name is not always defined as the module can be called with
just a vmid.

Before:

> "msg": "VM None with vmid = 118 is stopped"

After:

> "msg": "VM test-instance with vmid = 118 is stopped"

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-17 21:25:05 +01:00
Alexei Znamensky
e0dd4b240f
runit - deprecate param dist (#1838)
* Deprecate param dist

* added changelog fragment

* added changelog fragment

* Removed ignore lines for runit
2021-02-16 21:45:25 +01:00
Alexei Znamensky
3778eac1ba
Tidy up validations + bug fixes + deprecations (#1830)
* fixed validation-modules for plugins/modules/database/misc/elasticsearch_plugin.py

* fixed validation-modules for plugins/modules/database/misc/kibana_plugin.py

* fixed validation-modules for plugins/modules/database/misc/riak.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_info.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_role.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_schema.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_user.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_domain.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host_ports.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_pool.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_vol.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_vol_map.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host_ports.py

* fixed validation-modules for plugins/modules/system/runit.py

* fixed validation-modules for plugins/modules/source_control/bzr.py

* fixed validation-modules for plugins/modules/source_control/hg.py

* fixed validation-modules for plugins/modules/storage/emc/emc_vnx_sg_member.py

* fixed validation-modules for plugins/modules/identity/opendj/opendj_backendprop.py

* fixed validation-modules for plugins/modules/files/iso_extract.py

* fixed validation-modules for plugins/modules/monitoring/logstash_plugin.py

* fixed validation-modules for plugins/modules/database/aerospike/aerospike_migrations.py

* Tidy up a number of sanity checks for some modules

* added changelog fragment

* Some parameters in vertica_* had their aliases documented as the name, and sometimes vice-versa as well

* Adjustments per PR

* Rolled back sanity ignores for runit

* Update changelogs/fragments/1830-valmod_docmissingtype_batch1.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-16 09:27:24 +01:00
Alexei Znamensky
03b7b39424
Tidy up all pylint:blacklisted-name ignore lines (#1819)
* fixed validation-modules for plugins/callback/hipchat.py

* fixed validation-modules for plugins/connection/lxc.py

* fixed validation-modules for plugins/modules/cloud/lxc/lxc_container.py

* fixed validation-modules for plugins/modules/monitoring/statusio_maintenance.py

* fixed validation-modules for plugins/modules/system/alternatives.py

* fixed validation-modules for plugins/modules/system/beadm.py

* fixed validation-modules for plugins/modules/system/cronvar.py

* fixed validation-modules for plugins/modules/system/dconf.py

* fixed validation-modules for plugins/modules/system/interfaces_file.py

* fixed validation-modules for plugins/modules/system/java_cert.py

* fixed validation-modules for plugins/modules/system/lvg.py

* fixed validation-modules for plugins/modules/system/lvol.py

* fixed validation-modules for plugins/modules/system/parted.py

* fixed validation-modules for plugins/modules/system/timezone.py

* fixed validation-modules for plugins/modules/web_infrastructure/rundeck_acl_policy.py

* Tidy up all pylint:blacklisted-name sanity checks ignore lines

* Missed one in statusio_maintenace.py

* fixed validation-modules for plugins/modules/system/filesystem.py

* Missed one in gconftool2.py

* Missed one in alternatives.py

* Using dummies now

* fixed indentation

* Made all the changes about replacing _ with dummy

* Rollback bug fixed

* Rollback bug fixed, part II

* added changelog fragment

* Improved changelog frag message per PR
2021-02-16 08:03:51 +01:00
Frank Dornheim
6dd4cd0eb7
Previously LXD profiles were overwritten, now these are merged. (#1813)
* added ``merge_profile`` parameter to merge configurations from the play to an existing profile

* add fragment

* cosmetic changes

Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
2021-02-16 07:15:50 +01:00
Craig Roberts
03fd6bd008
dnsimple: Add support for CAA records (#1814) 2021-02-16 07:15:19 +01:00
Alexei Znamensky
f33323ca89
Tidy up validate-modules:parameter-list-no-elements (batch 1) (#1795)
* fixed validation-modules for plugins/modules/storage/netapp/na_ontap_gather_facts.py

* fixed validation-modules for plugins/modules/source_control/gitlab/gitlab_runner.py

* fixed validation-modules for plugins/modules/packaging/os/redhat_subscription.py

* fixed validation-modules for plugins/modules/notification/twilio.py

* fixed validation-modules for plugins/modules/notification/slack.py

* fixed validation-modules for plugins/modules/notification/sendgrid.py

* fixed validation-modules for plugins/modules/notification/rocketchat.py

* fixed validation-modules for plugins/modules/notification/office_365_connector_card.py

* fixed validation-modules for plugins/modules/notification/nexmo.py

* fixed validation-modules for plugins/modules/notification/mail.py

* fixed validation-modules for plugins/modules/net_tools/omapi_host.py

* fixed validation-modules for plugins/modules/net_tools/nsupdate.py

* fixed validation-modules for plugins/modules/net_tools/dnsimple.py

* fixed validation-modules for plugins/modules/monitoring/pagerduty.py

* fixed validation-modules for plugins/modules/monitoring/librato_annotation.py

* fixed validation-modules for plugins/modules/identity/onepassword_info.py

* fixed validation-modules for plugins/modules/identity/keycloak/keycloak_client.py

* fixed validation-modules for plugins/modules/files/xml.py

* fixed validation-modules for plugins/modules/cloud/softlayer/sl_vm.py

* fixed validation-modules for plugins/modules/cloud/smartos/vmadm.py

* fixed validation-modules for plugins/modules/cloud/pubnub/pubnub_blocks.py

* fixed validation-modules for plugins/modules/cloud/packet/packet_device.py

* fixed validation-modules for plugins/modules/cloud/lxd/lxd_container.py

* fixed validation-modules for plugins/module_utils/oracle/oci_utils.py

* fixed validation-modules for plugins/doc_fragments/oracle_creatable_resource.py

* Tidy up validate-modules:parameter-list-no-elements for some modules

* fixed validation-modules for plugins/modules/monitoring/statusio_maintenance.py

* Fixed pending issues from CI validation

* Fixed xml module elements for add_children & set_children

* added changelog fragment

* typo

* fix wording in changelog frag
2021-02-16 07:11:37 +01:00
almdudler777
5aac81bdd1
proxmox_kvm: 500 error args parameter (#1783)
* don't add args if set to 'no_defaults'

* never add force even if false, will require archive parameter other which is not implemented

* remove trailing whitespace

* add changelog fragment

* Update changelogs/fragments/1783-proxmox-kvm-fix-args-500-error.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-15 22:40:51 +01:00
shieni
8fae693d9c
ease limitation for nios_host_record DNS Bypass (#1788)
* ease limitation for nios_host_record DNS Bypass, the bypass should be allowed when configure_dns is disabled and view is set other than default

* add changelog fragment

Co-authored-by: Nils <ext-nils.haglund@elisa.fi>
2021-02-15 08:29:04 +01:00
Jeffrey van Pelt
1cce279424
Added VMID to all returns (#1715)
* Added VMID to all returns

Also added in the docs promised return of MAC and devices when state ==
current.

Fixes: #1641

* Revert devices and mac as get_vminfo works differently then I expected

* Added status output to a few more calls

* Update RETURNS docs

* Remove vmid where it is not available

* Added changelog fragment

* Update changelogs/fragments/1715-proxmox_kvm-add-vmid-to-returns.yml

You're right, this message is way better then mine.. :-)

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-15 07:27:43 +00:00
Víctor Suárez Fernández
d09a558fda
Fix undeclared result for nomad_job_info module (#1721)
* Fix unassigned variable

* Create 1721-fix-nomad_job_info-no-jobs-failure.yml

* refactor usage of variables in nomad_job_info

* Update changelogs/fragments/1721-fix-nomad_job_info-no-jobs-failure.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-15 07:27:33 +00:00
Alexei Znamensky
bd372939bc
Tidy up validation for storage/zfs modules (#1766)
* fixed validation-modules for plugins/modules/storage/zfs/zfs.py

* fixed validation-modules for plugins/modules/storage/zfs/zfs_delegate_admin.py

* fixed validation-modules for plugins/modules/storage/zfs/zfs_facts.py

* fixed validation-modules for plugins/modules/storage/zfs/zpool_facts.py

* Tidy up validate-modules ignores for storage/zfs modules

* removed ignore lines in 2.11 files as well

* added changelog fragment per PR

* Update changelogs/fragments/1766-zfs-fixed-sanity.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-15 07:16:08 +01:00
Alexei Znamensky
41bc7816f3
Implemented fix pointed in issue (#1760) 2021-02-14 15:08:32 +01:00
Alexei Znamensky
865acdd4cf
Tidy up validate-modules ignores for cloud/centurylink modules (#1771)
* fixed validation-modules for plugins/modules/cloud/centurylink/clc_alert_policy.py

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_blueprint_package.py

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_firewall_policy.py

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_loadbalancer.py

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_modify_server.py

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_publicip.py

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_server_snapshot.py

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_server.py

* Tidy up validate-modules ignores for cloud/centurylink modules

* added changelog fragment per PR
2021-02-13 12:14:06 +01:00
Felix Fontein
367c3c43ff
Make selective callback work with ansible-core 2.11. (#1807) 2021-02-13 11:09:40 +01:00
Alexei Znamensky
0a5f79724c
Improved parameter handling on proxmox modules (#1765)
* Improved parameter handling on proxmox modules

* removed unused imports

* rollback change in plugins/modules/cloud/misc/proxmox_user_info.py

* added changelog fragment

* Update changelogs/fragments/1765-proxmox-params.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-12 13:01:52 +01:00
Felix Fontein
f12df1d21b
Change type str -> path in argspec. (#1741) 2021-02-12 07:58:30 +01:00
Alexei Znamensky
ba4a98b1be
Removed parameter-list-no-elements validation errors from redfish modules (#1761)
* Removed parameter-list-no-elements validation errors from redfish modules

* added changelog fragment per PR

* Update changelogs/fragments/1761-redfish-tidy-up-validation.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-12 06:47:23 +01:00
Alexei Znamensky
436bbb0077
Prevented the expansion of parameters in run_command() (#1794) 2021-02-12 06:13:05 +01:00
Felix Fontein
9a6031ab4e
Fix typo in aerospike_migration module. (#1740) 2021-02-11 07:04:45 +01:00
topperharly
562ff7efb7
only set param features when variable is not empty (#1763)
* only set param features when variable is not empty

* Apply suggestions from code review

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

Co-authored-by: Topper Harly <topperharly@gmx.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-10 22:07:27 +01:00
lukurde
93e0aa7557
redfish module_utils: case insesitive search for situations where the hostname/FQDN on iLO is in caps (#1744)
* case insesitive search for situations where the hostname/FQDN on iLO is in caps

* handle explicit and implicit nic_addr variable, added changelog fragment

* changelog linter fix

* changelog typo fix

Co-authored-by: Łukasz Kurdziel <Lukasz.Kurdziel@GAINCapital.com>
2021-02-10 19:47:09 +01:00
Anatoly Pugachev
9aef0ed17e
timezone: add gentoo and alpine linux support (#1722)
* add alpine linux as NosystemdTimezone

* syntax error fix and more self variables, so it works now...

* use timezone name instead of timezone path for setup-timezone command

* alpine linux zoneinfo links to /etc/zoneinfo instead of /usr/share/zoneinfo, so correct re.search() pattern

* add changelog fragment

* add gentoo linux support

* Update 1722_timezone.yml

* refactor code
2021-02-10 19:44:09 +01:00
Alexei Znamensky
af64c9a432
xfconf: feature flag to disable facts and deprecation warning (#1747)
* Added feature flag to disable facts and its associated deprecatoin warning

* added changelog fragment

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

* Update plugins/modules/system/xfconf.py

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

* Fixed deprecation message

* Fixed changelog frag

* Update changelogs/fragments/1475-xfconf-facts.yml

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-10 19:42:40 +01:00
quidame
d1e54d2fd1
document what filesystem types are supported by 'resizefs' option (#1753)
* document what filesystem types are supported by 'resizefs' option

* add changelog fragment

* remove info about lvol documentation changes in changelog fragment
2021-02-10 03:50:43 -08:00
morco
c03ae754d2
Various fixes for updating existing gitlab users (#1724)
* fixes various issues related to updating an ...

... existing gitlab user, in detail:

  - fixes updating admin status not working
  - fixes user passwords not updated
  - fixes confirmation skipping param ignored for user updates
  - added tests for code changes

* fixing sanity issues

* fixing sanity issues 02

* fixing sanity issues 03

* fixing sanity issues 04

* fixing unit test failures

* fixing unit test failures 02

* add changelog fragment

* fixing unit test failures 03

* forgot to add changelog fragment

* fix changelog sanity issues

* fix changelog sanity issues 02

* incorporate review suggestions

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
2021-02-09 10:29:13 +01:00
Felix Fontein
29bd5a9486
Fix a bunch of potential security issues (secret leaking) (#1736)
* Fix a bunch of potential security issues (secret leaking).

* oneandone_server was already ok.

* Add more parameters for pagerduty_alert.

* Add more no_log=True.
2021-02-08 16:33:18 +01:00
morco
dd0b54b9b5
Feature/gitlab deploykey updkey (#1661)
* feat(gitlab-deploy-key): automatically update ...

... the public key

* add integrity test

* fix sanity issues

* added changelog fragment

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
2021-02-05 07:30:05 +01:00
Rick Sherman
f509f2c896
datadog_monitor: Add missing monitor types query alert, trace-analytics alert, rum alert (#1723)
* Add missing Datadog monitor types
This commit adds the following monitor types: query alert, trace-analytics alert, rum alert

* changelog PR1723 datadog_monitor types

* datadog_monitor 1723 Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-05 07:22:49 +01:00
Anatoly Pugachev
43da5b88db
parted: fix regex for version match and partition size output (#1695)
* Fix 2 regex in parted related to parted version string and to parsing partition size output.

* Added changelog fragment.

* Updated changelog as per recommendation.

* Fix the regex matching the parted version. The space character at the end of the string may or may not be always present

* provided sample version output and corrected regex to match

* add/correct changelog fragment

* split parted_version function to allow creating a test unit

* test unit for parted version info

* ansible-test sanity fixes

* review fix

* Update changelogs/fragments/1695-parted-updatedregex.yaml

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

* comment fixes

* better function name

* Update plugins/modules/system/parted.py

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

* comment fixes

Co-authored-by: Claude Robitaille <claude@cbcr.me>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-05 07:21:57 +01:00
David Moreau Simard
ae8edc02e1
Add no_log to some module arguments (#1725)
* Add no_log to some module arguments

This will prevent potentially sensitive information from being printed to
the console.

See: CVE-2021-20191

* Update changelogs/fragments/CVE-2021-20191_no_log.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-04 21:02:21 +01:00
quidame
aa95d8a5b7
module filesystem: partially fix idempotency issue #1457 (resizefs) (#1478)
* Use 'xfs_info' to query fs size, that doesn't always require the device be
  mounted. Although still query mountpoint first for backward compatibility.
* Do not fail whith fstype=xfs and resizefs=yes if filesystem already fills
  its underlying device.
* Include xfs in the tasks that test idempotency of resizefs option
* Add changelogs/fragments/1478-filesystem-fix-1457-resizefs-idempotency.yml
2021-02-03 07:54:04 +01:00
Stefan Walluhn
b40a5ef09a
sensu-silence: fix json parsing of sensu API response (#1703)
* sensu-silence: fix json parsing of sensu API response

* use ansible helper function to decode bytestream

* add changelog fragment

* Update changelogs, link to PR

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-02 17:45:14 +01:00
Rajeev Arakkal
8afdd23be4
Migrating DellEMC collections from community.general collections (#1699)
* migration modification for dellemc collections

* removing dellemc collections

* Update changelogs/fragments/948-dellemc-migration-removal.yml

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

* Update 948-dellemc-migration-removal.yml

* Update 948-dellemc-migration-removal.yml

* Update runtime.yml

* Update meta/runtime.yml

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

* Update runtime.yml

* deleted symlink entries

* Update 948-dellemc-migration-removal.yml

* Update changelogs/fragments/948-dellemc-migration-removal.yml

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

* Update changelogs/fragments/948-dellemc-migration-removal.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-01 18:06:58 +01:00
Abhijeet Kasurde
d0f097c871
homebrew_tap: Add support for brew search path (#1708)
* homebrew_tap: Add support for brew search path

User can specify search path for brew executable.

Fixes: #1702

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

* Change version

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-01 08:42:32 +01:00
Bill Dodd
00f5f7dfe7
Add Name and/or Id properties to resource inventory output (#1691)
* add Name and/or Id properties to resource inventory output

* add changelog fragment
2021-01-29 07:17:57 +01:00
Felix Fontein
b6774971a6 Clear changelog for 3.0.0. 2021-01-28 13:40:56 +01:00
Felix Fontein
83afe0f868 Next expected release is 2.1.0. Next changelog ancestor is 2.0.0. 2021-01-28 13:40:13 +01:00
Nicolas Karolak
db656705b0
update scaleway zones (#1690) 2021-01-28 12:51:07 +01:00
Florian Bergmann
f955a85848
Add yaml support to passwordstore. (#1681)
Co-authored-by: Florian Bergmann <Florian.Bergmann@datev.de>
2021-01-28 09:24:28 +01:00
Felix Fontein
711405507d Reset changelog. 2021-01-27 13:01:36 +01:00
Wim Van Leuven
7a01c5809c
Feature/ldap gssapi sasl authentication (#1595)
* add sasl_class as parameter

* type str not string

* recreate .gitignore with vscode support

* document sasl_class parameter

* revert .gitignore changes (separate PR)

* docs - add version and end lines with .

* add changelog entry

* add sasl_class choices to docs as well

* changelog should link to issue

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

Co-authored-by: Wim Van Leuven <wim.vanleuven@ucb.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-27 08:15:38 +01:00
flammike
cd022c3e2a
ldap_search: switch off client-chasing referrals (#1618)
* switch off client-chasing referrals

* Add changelog fragment

* Add comment to module

* Sanity check

* Update changelogs/fragments/1618-ldap_search-switch-off-cheasing-referrals.yaml

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

* Add module ref_chasing param to ldap module_utils

* test acces token gitlab

* test acces token gitlab: revert

* Complete referrals_chasing parameter documentation

* Fix parameter value check

* Fix issue #963

* fix sanity check

* Update plugins/doc_fragments/ldap.py

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

* Update changelogs/fragments/1618-ldap_search-switch-off-cheasing-referrals.yaml

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

* Update plugins/doc_fragments/ldap.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Mickael Foucher <mikael.foucher@groupama.com>
2021-01-27 07:56:07 +01:00
Anatoly Pugachev
2a53edd9bc
Add default brew search path for non-Intel / Apple silicon hardware (#1679)
* Add default brew search path for non-Intel / Apple silicon hardware

* add changelog fragment

* Update 1679-homebrew_search_path.yml

fix for double-ticks in yaml/rst format

* missing dots and brackets
2021-01-26 06:56:24 +01:00
LOMS
85fc920a0c
Some improvements to community.general.telegram (#1642)
* Added some flexibility to cover latest and future possible changes in Telegram API.

* Added changelog fragment for changes in community.general.telegram

* Apply suggestions from code review

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Nikolay Lomov <nlomov@rbc.ru>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-25 15:43:47 +03:00
Orosz Dávid
ebaa17f59f
dnsmadeeasy: Fix HTTP 400 errors when creating a TXT record (#1654)
* dnsmadeeasy: Fix HTTP 400 errors when creating a TXT record

* When creating a record the module fails on monitor API call
* TXT records are surrounded by quotes in the API response

Fixes: #1237

* dnsmadeeasy: Add changelog fragment

* dnsmadeeasy: Fix pylint error

* Update changelogs/fragments/1654-dnsmadeeasy-http-400-fixes.yaml

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

* Update plugins/modules/net_tools/dnsmadeeasy.py

The dictionary might be empty

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-25 13:00:13 +01:00
Paul Haerle
73b3ec09e5
fix passwordstore.py to be compatible with gopass. (#1589)
* fix passwordstore.py to be compatible with gopass.

...even when used with create=true.

The same output snippet matches for both, `pass` and `gopass`, but while `pass` returns `1` on a non-existant password, `gopass` returns `10`, or `11`, depending on whether a similar named password was stored.

So I'd propose to change `e.returncode == 1` to `e.returncode != 0` to cover both cases here.

What do you think?

* Update passwordstore.py, fix typo

* Add changelog fragment.

* Update changelogs/fragments/1589-passwordstore-fix-passwordstore.py-to-be-compatible-with-gopass.yaml

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

* Update changelogs/fragments/1589-passwordstore-fix-passwordstore.py-to-be-compatible-with-gopass.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-25 12:29:46 +01:00
Marcus Watkins
11cb136971
Allow gitlab_runner to function for non-admin users (#1491)
* Allow gitlab_runner to function for non-admin users

* Fix errant whitespace

* Allow later python-gitlab versions

* gitlab_runner: Switch to feature instead of bugfix, add examples

* Fix version_added in gitlab_runner

* Cleanup documentation for gitlab_runner fix

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

Co-authored-by: Brendan Batliner <brendan.batliner@gmail.com>

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

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

* Revert docs change

* Clarify docs

* Clarify docs

Co-authored-by: Brendan Batliner <brendan.batliner@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-24 21:02:44 +01:00
Yevhen Khmelenko
298e0f60be
Update ansible-logstash-callback (#641)
* Update version of callback/logstash.py

* ansible-logstash-callback rollback version_added location

* Update plugins/callback/logstash.py

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

* Update plugins/callback/logstash.py

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

* Update changelogs/fragments/641-update-ansible-logstash-callback.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-24 21:00:55 +01:00
José Pedro Oliveira
1dd5e71cff
lldp - use get_bin_path to locate the lldpctl executable (#1643)
* lldp - use get_bin_path to locate the lldpctl executable

 * This prevents failed executions

   FAILED! => {"changed": false, "cmd": "lldpctl -f keyvalue",
               "msg": "[Errno 2] No such file or directory", "rc": 2}

   on hosts (servers and switches) with lldpd installed and running.

* Update changelogs/fragments/lldp-use-get_bin_path-to-locate-the-lldpctl-executable.yaml

Specify pull request id and minor formatting tweaks

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

* Update changelogs/fragments/lldp-use-get_bin_path-to-locate-the-lldpctl-executable.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-23 11:45:28 +01:00
Saqib Rokadia
dd0d460132
Fixing return code not showing the command that fails in terraform. (#1632)
* Fixing return code not showing the command that fails in terraform.

* Update changelogs/fragments/1632-using_check_rc_in_terraform.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-23 11:44:51 +01:00
Abhijeet Kasurde
1479544029
dconf: Code refactor (#1585)
* Updated documentation
* Use ``module.get_bin_path`` API to check existence of
  ``dbus-send``, ``dconf``, and ``dbus-run-session``
* Return ``out`` and ``err`` in ``fail_json`` which helps debugging

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-21 14:11:40 +01:00
John Cardenas
f1a31611b7
Add Environment Passthrough to Proxmox Inventory Module (#1645)
* Add env passthrough for Proxmox secrets

* Improve descriptions for env passthrough.

* Implement requested documentation changes

* Add changelog fragment

* Update changelogs/fragments/1645-proxmox-env-passthrough.yml

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

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-20 22:45:04 +01:00
Roberto Aguilar
5b1bede4cb
onepassword: find the password field out of the fields list (#1610)
* Find the password field out of the fields list

With the command line utility `op` version 1.8, the password field exists, while the fields list is empty.  This will look for the desired field without it being listed in the fields list.

* Add changelog fragment

* Update changelogs/fragments/1610-bugfix-onepassword-lookup-plugin.yaml

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

* Update plugins/lookup/onepassword.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-20 22:37:28 +01:00
Pablo Castorino
52bb601f31
Add environment scope on gitlab project variables (#1197)
* add environment scope on gitlab project variables

* fix sanity code

* apply again test

* environment_scope not defined by default. compatible with old versions of lib.

* environment_scope must be optional

* add changelog

* Update changelogs/fragments/1197_gitlab_project_variable.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-18 07:54:43 +01:00
cdbunch72
3b9c6d496b
Add tags filter to linode inventory plugin (#1551)
* Add tags filter to linode inventory plugin

* add tags to return tuple on line 66 in test_linode.py

* Add period in changelog fragment.
use if any() rather than for ... if list completion

* Clarify the description of the ``tags`` option

* Updated description to remove syntax error of line break.
2021-01-17 12:29:20 +01:00
TheDavidFactor
b31583b441
added jobs parameter to make module (#1550)
* added jobs parameter to make module to allow use of the -j or --jobs argument for make/gmake

* updated documentation

* added changelog fragment

* Apply suggestions from code review

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

Co-authored-by: David Ruggles <david@safedatausa.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-16 22:12:45 +01:00
Alexei Znamensky
3e9a6acff7
Modhelper improvements (#1480)
* Improvements in module_helper

- added `ModuleHelperException` to handle problems specific to ModuleHelper
- updated `module_fails_on_exception` for `ModuleHelperException`
- `StateMixin`: composed names of state methods are now calculated instead of fixed.
- `CmdMixin`: added `run_command_fixed_options` to pass some parameters on every call

* Improvements in module_helper

- Named deprecations: ability to declare a `dict` of deprecations indexed by names, allowing module maintainer to trigger them by those names, and also allowing the module user to acknowledge them in a similar way.
  - Adding `ack_named_deprecations` to module's `argument_spec` when they exist.
  - Providing doc fragment for `ack_named_deprecations`.
- Added method `__quit_module__` providing a hook for code that needs to be run when quitting the module.
- Created convenience classes combining `ModuleHelper`, `StateMixin`, `CmdMixin`.

* fixed validation

* fixed validation

* changelog fragment

* Apply suggestions from code review

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

* Improvement on Named Deprecations

Per the comments in PR, we want to expose a call to a ``deprecate`` method on the module code, so that pylint can properly perform its static analysis on deprecations.

This prompted a revamp of the named deprecation feature.

* Use .get() instead of [] for the param to ack named deprecations.

* Changes from suggestions in the PR

* removed named deprecations

* Update changelogs/fragments/1480-module-helper-improvements.yml

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

* Update plugins/module_utils/module_helper.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-15 21:29:23 +01:00
Abhijeet Kasurde
1d0c5e2ba4
bitbucket_pipeline_variable: Hide secured values in console log (#1635)
**SECURITY** - CVE-2021-20180

Hide user sensitive information which is marked as ``secured``
while logging in console.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-14 14:27:15 +00:00
Abhijeet Kasurde
a9c64655de
npm - handle json decode exception (#1625)
* Provide a user friendly message by handling json decode
  exception rather than providing a stacktrace

Fixes: #1614

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-14 14:18:41 +01:00
christophemorio
9f4fd4c899
init_reconfigure fails on module cloud/misc/terraform.py (#1620)
* fix reconfigure option

If `init_reconfigure` is true, the init fails because it is run as:
`terraform init -input=false - r e c o n f i g u r e`

* changelog fragment

* typo

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-13 07:49:00 +01:00
Abhijeet Kasurde
df1fa397db
homebrew_tap: Return error message to user (#1603)
* When module fails return meaningful error message to user
  returned by homebrew-tap command.
* Doc update

Fixes: #1411

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-12 12:46:19 +01:00
Abhijeet Kasurde
3560aeb12f
snmp_facts: Hide user sensitive information in console (#1621)
**SECURITY** - CVE-2021-20178

Hide user sensitive information like `privkey` and `authkey`
while logging in console.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-12 11:06:58 +01:00
Ishwar Kanse
1de0e9eaba
Added shard_group_duration to influxdb_retention_policy module (#1590)
* Added shard_group_duration to influxdb_retention_policy module

* Use shard_group_duration as optional

* Add change log and handle invalid shard group value error

* Add change log and handle invalid shard group value error

* Added doc examples for shard_group_duration parameter

* Add documentation for the shard group duraiton parameter value

* Fixed description
2021-01-12 07:16:45 +01:00
Alexei Znamensky
6c7f8f97ad
Tidy up validate-modules ignores for modules: net_tools/nios (#1598)
* Added ``normalize_ib_spec()``

* Added suboptions

- ``http_pool_connections``
- ``http_pool_maxsize``
- ``silent_ssl_warnings``

* fixed validation-modules for plugins/modules/net_tools/nios/nios_a_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_aaaa_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_cname_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_dns_view.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_fixed_address.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_host_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_member.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_mx_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_naptr_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_network.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_network_view.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_ptr_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_srv_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_txt_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_zone.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_nsgroup.py

* Added function to normalize the ``ib_spec`` for ansible usage.

* Tidy up validate-modules ignores for net_tools/nios modules

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

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

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

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

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

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

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

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

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

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

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

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

* fixed missing defaults, per PR tests

* added changelog fragment

* Update changelogs/fragments/nios-fix-ib_spec.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-11 22:14:46 +01:00
Dani Hodovic
740883e7fd
cloudflare_dns: read API token from environment (#1238)
* cloudflare_dns: read API token from environment

* Update plugins/modules/net_tools/cloudflare_dns.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Update plugins/modules/net_tools/cloudflare_dns.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-11 13:08:20 +01:00
Felix Fontein
3f3ed407a3
Remove kubevirt leftovers. (#1593) 2021-01-05 18:40:15 -05:00
David Moreau Simard
e53f153e30
Remove kubevirt and set up redirects to community.kubevirt (#1317)
* Remove kubevirt and set up redirects to community.kubevirt

This also removes the dependency on community.kubernetes which fixes
https://github.com/ansible-collections/community.general/issues/354.

* Update changelogs/fragments/1317-kubevirt-migration-removal.yml

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

* Update changelogs/fragments/1317-kubevirt-migration-removal.yml

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

* Add missed redirects

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-05 21:35:22 +01:00
Felix Fontein
ddaad1e650
Remove hashi_vault plugin, add redirect. (#1566) 2021-01-04 10:55:14 +01:00
Alexei Znamensky
0bd4b3cbc9
changed make parameter from --question to -q (#1574)
* changed make parameter from --question to -q

* changelog fragment

* Update changelogs/fragments/1574-make-question.yaml

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 13:35:46 +01:00
Eike Waldt
491b622041
fix passwordstore.py to be compatible with gopass versions (#1493)
* Be compatible to latest gopass versions.
`gopass show` is deprecated.

* add changelog fragment

* Update changelogs/fragments/1493-fix_passwordstore.py_to_be_compatible_with_gopass_versions.yml

Co-authored-by: Eike Waldt <git@yog.wtf>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 11:48:35 +01:00
Alexei Znamensky
325a19d88a
pamd - fixed bug (#1538)
* Fixed bug

- The module was searching back (and forward, in the ``after`` state) for lines that were not comments, assuming it would be a valid rule or an include.

* remove the line, make yamllint happy

* Update changelogs/fragments/1394-pamd-removing-comments.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 11:38:04 +01:00
Graham Herceg
bed1dc479f
monit: add support for all monit services when checking process state (#1532)
* add support for all monit service types

* ignore case when performing check

* add changelog

* Escape special characters before matching

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

* escape each element individually

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 11:37:56 +01:00
momcilo78
fd741ed663
Remove bridge-slave from list of IP based connections (#1517)
* Removed the bridge-slave from list of ip based connections since nmcli does not accept IP options for bridge-slave connections.

* Update changelogs/fragments/1517-bridge-slave-from-list-of-ip-based-connections.yml

Thanks for the tip.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 11:37:48 +01:00
Johannes Petz
df9f0741b5
Legacy Python certificate validation fixed (#470)
* Legacy Python certificate validation fixed

* added changelog fragment

* removed blank line for sanity checks

* Update changelogs/fragments/470-spacewalk-legacy-python-certificate-validation.yaml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Update changelogs/fragments/470-spacewalk-legacy-python-certificate-validation.yaml

Co-authored-by: jpe <petz.johannes@afb.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-03 11:15:51 +01:00
♫ Christian Krause ♫
777d36b9fb
pam_limits: adds both check and diff modes (#830)
* pam_limits: adds check mode

fixes #827

* pam_limits: adds diff mode

fixes #828
2021-01-03 11:11:06 +01:00
Abhijeet Kasurde
ce83bde742
syslogger - update syslog.openlog API call for older Python (#1572)
* syslogger - update syslog.openlog API call for older Python

Fixes: #953

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

* Update changelogs/fragments/953_syslogger.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-02 20:40:27 +01:00
Abhijeet Kasurde
1c53894920
pam_limits: add support nice and priority limits (#654) 2021-01-01 16:15:02 +05:30
Jianhao Tan
ed813176ce
updated deprecated homebrew cask commands (#1481)
* updated deprecated homebrew cask commands

* added methods for brew version deprecation check

* added comments and changelog fragment

* added unit test for version comparison

* switch to use disutils LooseVersion for version comparison

* updated changelog message and minor refactor for building brew command based on version

* added caching logic for retrieval of brew version and updated PR changelog yaml

* Update changelogs/fragments/1481-deprecated-brew-cask-command.yaml

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

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

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

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

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

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

* switch to use subprocess.check_output instead of subprocess.run

* replace subprocess with run_command

* removed unused subprocess import

* removed error handling logic to depend on check_rc=True instead

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-31 19:13:21 +01:00
Felix Fontein
9f71073d37
Remove ansible.netcommon dependency. (#1561) 2020-12-30 10:37:23 +01:00
Abhijeet Kasurde
6c88b69d6f
launchd: Handle deprecated APIs in plistlib (#1554)
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-30 11:25:32 +05:30
David Moreau Simard
f78e08bc37
Remove google plugins and set up redirects to collections (#1319)
* Remove Google cloud plugins migrated to community.google

* Remove another symlink

* Fix typo for community.general version

* Update changelogs/fragments/1319-google-migration-removal.yml

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

* Update changelogs/fragments/1319-google-migration-removal.yml

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

* Add fragment for inventory script

* fix yaml formatting

* adjust past relnotes in accordance with removal of google plugins

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-29 09:46:57 +01:00
Abhijeet Kasurde
818cafc580
sendgrid: Update docs (#1557)
* Updated docs
* Warn user about required Sendgrid Python library version i.e <=1.6.22

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-29 09:39:28 +01:00
enothen
eb2cb56a55
Added code to support command groups inside sudo rules (#1556)
* Added code to support command groups inside sudo rules

* Added command groups to documentation of ipa_sudorule.py

* Update changelogs/fragments/1555-ipa-sudorule-add-commandgroup.yml

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

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

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

Co-authored-by: Eric Nothen <eric.nothen@payback.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-29 09:36:45 +01:00
Alexei Znamensky
2b824f2d7b
ini_file: fixed case of empty section + parameter validation (#1533)
* Fixed case of empty section + parameter validation

* Adjusted code for integration test, and added test case for empty section

* Update changelogs/fragments/479-ini_file-empty-section.yaml

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

* Update changelogs/fragments/479-ini_file-empty-section.yaml

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

* Using "is changed" in integration tests, per PR review

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-28 10:47:01 +01:00
James Harr
39bf187a25
Proxmox - add features flag (#1413)
* Add 'features' option to proxmox LXC

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

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

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

* Apply suggestions from code review

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

* Update proxmox.py

Working fix

* Update changelogs/fragments/1413-proxmox-features.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-12-27 14:07:10 +01:00
Alexei Znamensky
5016f402a5
jira - some improvements to the module (#1536)
* Some improvements to the module

- Fixed examples documentation ().
- Module no longer incorrectly reports change for information gathering operations ().
- Replaced custom parameter validation with ``required_if`` ().
- Added the traceback output to ``fail_json()`` calls deriving from exceptions ().

* added PR URL to changelof frag

* Update changelogs/fragments/jira_improvements.yaml

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

* mentioned issue required for transition in chnagelog

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-27 13:56:48 +01:00
cdbunch72
58a9287689
Add support for keyed_groups, groups, and compose options to linode i… (#1453)
* Add support for keyed_groups, groups, and compose options to linode inventory
plugin

* Changed instance,label to instance.label
various lint fixes around spacing

* Change self._strict to a local variable as it's no longer needed in other
methods

* Modified DESCRIPTION to add a version_added property to each of the new options.

* Add Changelog fragment

* Minor changes to the changelog fragment

* Replace 'the standard' with 'support for'

* Update description to note that the inventory groups are created by default
from the group attribute not tags and that the group attribute has been
depricated by Linode.

* Remove trailing space in description

* Add period to changelog fragment

Co-authored-by: Clinton Bunch <cdbunch@zeus.int.zentaur.org>
2020-12-27 13:53:41 +01:00
Abhijeet Kasurde
da2a629919
gitlab_project: Add a parameter to specify Git LFS (#1540)
* Update docs
* Update example
* Refactor code
* Add a parameter ``lfs_enabled`` to specify Git Large file systems

Fixes: #1506

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-27 10:55:06 +01:00
neatherweb
c63f3f9956
nios_member: fix nios api member_normalize error with python 3 (#1527)
* nios_member: fix nios api member_normalize error with python 3

Force a copy of the key to allow change during iteration.

* Update - add changelog fragment

* Update - add changelog fragment

* Update changelogs/fragments/1527-fix-nios-api-member-normalize.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-22 23:57:50 +01:00
Alexei Znamensky
6c3a5cf9b1
Added file feature (#1525)
* Added file feature

* Update plugins/modules/source_control/git_config.py

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

* Update plugins/modules/source_control/git_config.py

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

* Update changelogs/fragments/1021-git_config-custom-file.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-22 16:17:24 +01:00
Alexei Znamensky
1faf8ef08b
Ensured `changed returns False`. (#1530)
* Ensured ``changed`` returns ``False``.

- Added small improvement on the ``_load_scope()`` method.

* yamllint caught it

* Rephrased changelog fragment
2020-12-22 15:56:46 +01:00
Felix Fontein
0a7ed3b019
YAML callback: do not remove non-ASCII Unicode from multi-line string output (#1522)
* Do not remove non-ASCII Unicode from multi-line string output.

* Added basic tests.

* Add Unicode test.

* Simplify tests, avoid later Jinja features.

* Refactor.

* Make use diy tests use callback test framework as well.

* Remove color codes.

* Work around stable-2.9 bug.

* Simplify again.
2020-12-22 09:24:20 +01:00
Alexei Znamensky
5ee5c004b4
Some adjustments/improvements (#1516)
* Some adjustments/improvements

- Added doc details for parameters ``description`` and ``objectClass``
- Added type details to argument_spec of parameters ``description`` and ``objectClass``.
- Removed unused import
- Simplified logic of ``LdapEntry._load_attrs()``
- Replaced parameter validation test with ``required_if``.

* Added changelog frag
2020-12-21 13:56:10 +01:00
Alexei Znamensky
e9dafb3467
Raises error for non-existent repo path (#1512)
* Raises error for non-existent repo path, requires Ansible 2.10.4 or higher.

* Changes from suggestions in the PR

* Suggestion from PR

* Update changelogs/fragments/630-git_config-handling-invalid-dir.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-21 11:08:48 +00:00
Zac Medico
47b940fc63
saltstack: fix put_file to preserve checksum (#1472)
* saltstack: fix put_file to preserve checksum

Use hashutil.base64_decodefile to ensure that the file checksum
is preserved, since file.write only supports text files.

Signed-off-by: Zac Medico <zmedico@gmail.com>

* Update changelogs/fragments/1472-saltstack-fix-put_file-to-preserve-checksum.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-19 18:11:41 +01:00
Abhijeet Kasurde
eb79c14e9c
jira: Provide useful error message to user (#1509)
* Code refactor
* Handle exception
* Provide useful error message to user when exception is raised

Fixes: #1504

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-19 17:43:41 +01:00
Abhijeet Kasurde
4c14df6d88
bitbucket_pipeline_variable: Change pagination logic (#1498)
Bitbucket's pagination for pipeline variables is flawed.
Refactor bitbucket_pipeline_variable code to correct this logic.

Fixes: #1425

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-17 07:57:07 +01:00
Felix Fontein
d495d3969b Fix changelog fragment. 2020-12-16 21:39:55 +01:00
Dag Wieers
c3ef9bf668
cobbler: Add Python 3 support (#645) 2020-12-16 18:07:31 +05:30
Pablo Escobar Lopez
496be77a2b
fix so module nios_host_record can remove aliases (#1470)
* fix for https://github.com/ansible-collections/community.general/issues/1335

* added changelog fragment

* Update changelogs/fragments/nios_host_record-fix-aliases-removal.yml

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

* extend changelog to specify CNAMES

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-14 22:31:05 +01:00
Abhijeet Kasurde
f37eb12580
keycloak: Provide meaningful error message to user (#1487)
When user provides auth URL value which does not startswith
http or https protocol schema, provide a meaningful error message
stating so.

Fixes: #331

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-14 22:29:33 +01:00
Bill Dodd
51dfc1f288
Fix property name typo in get_memory_inventory() (#1484)
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-14 09:45:45 +05:30
Matthew Campbell
8e53b3df6f
xfconf: add return values and expand test coverage (#1419)
* xfconf: add return values and expand test coverage

* fix pep8

* fix pylint

* fix returns yaml docs

* Add changelog fragemnt

* revert docts for `returned`

* Update changelogs/fragments/1419-xfconf-return-values.yaml

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

* Update plugins/modules/system/xfconf.py

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

* update return values to raw for scalar/lists

* another doc tweak: None -> none

* Break newline for pep8

* Fix merge mistake

* Back to list of strings

* fix yaml syntax

* Fall back to old way, deprecate returns, add ingores for errors

* add a note about dprecating facts

* Add depracation messages and fix docstring error

* remove deprecation of return values.

* Update plugins/modules/system/xfconf.py

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

* drop the deprecation message too

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-12 09:07:30 +01:00
jblashka
91272d027b
Add millisecond data to splunk callback timestamp (#1462)
* Add millisecond data to timestamp

* Add flag to control splunk milliseconds

* Update changelogs/fragments/1462-splunk-millisecond.yaml

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

* Apply suggestions from code review

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

* Apply more suggestions from review

* Whitespace

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-12 09:00:15 +01:00
Kazufumi NOTO
1110e93c5d
Bugfix: Fix parsing array values from osx_defaults (#358)
* Bugfix: Fix parsing array values in osx_defaults

Unquote values and unescape double quotes when reading array values from defaults.

* Fix fragments: fix_parsing_array_values_in_osx_defaults

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

* add test code for Bugfix: Fix parsing array values from osx_defaults

* handle spaces after the comma

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-09 08:29:58 +03:00
Dr. Nick
68dec29df3
rhn_register: added force option to allow forced registering (#1454) (#1455)
* rhn_register: added force option to allow forced registering (#1454)

* rhn_register: added disable=bad-option-value to pylint disables for backwards compat

* rhn_register: including version_added for force parameter

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

* [1455] added changelog fragment

* removed unnecessary pylint disables

* Updated changelogs/fragments/1455-rhn-register-force.yml to have issue # instead of PR #

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-12-08 13:12:04 +01:00
Felix Fontein
57a373f4f2
Deprecate gluster_* modules (#1439)
* Deprecate gluster_* modules.

* Update 2.9 ignore.txt entries for deprecation syntax.
2020-12-07 10:07:56 +00:00
Bruno Travouillon
8cedec381f
nmcli: add connection.zone parameter (#1426) 2020-12-05 16:18:29 +01:00
Vladimir Botka
0f88c71f59
Added filter plugin lists_mergeby. Fix #249 (#604) 2020-12-04 09:32:42 -05:00
Jean-Pierre Matsumoto
b80854ff50
Fix #1435: mas : Fix "invalid literal" when no app (#1436)
* Fix #1435: mas : Fix "invalid literal" when no app

* Add changelog fragment

* Update changelogs/fragments/1436-mas-fix-no-app-installed.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-04 09:17:42 +01:00
Abhijeet Kasurde
5319437bc2
json_query: Handle AnsibleUnicode, AnsibleUnsafeText (#1434)
jmespath library does not undestand custom string types
such as AnsibleUnicode, and AnsibleUnsafeText.
So user need to use ``to_json | from_json`` filter while using
functions like ``starts_with`` and ``contains`` etc.
This hack will allow user to get rid of this filter.

Fixes: #320

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-04 07:24:42 +01:00
Tristan Le Guern
d981f388fb
Proxmox doc fragments (#1404)
* proxmox{,_kvm,_template}: import auth doc fragment

* proxmox{,_kvm}: new common doc_fragment

Share the parameters `pool`, `vmid` and `node`.

* proxmox_template: sync node description

* changelog_framgent
2020-12-02 16:08:07 +01:00
Martin
70ba401602
[icinga2_host.py] Actually return codes instead of data (#335)
* [icinga2_host.py] Actually return codes instead of data

Currently the module tries to return the `data`, which can result in a blank message instead of the code being shown.

```
 "msg": "bad return code creating host: "
```

* add changelog fragment

* Update changelogs/fragments/335-icinga2_host-return-error-code.yaml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* return code and data on fail

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

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Deric Crago <deric.crago@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-02 09:38:56 +03:00
Jeff Geerling
1d8530aff1
Remove and redirect oc module. (#866)
* Remove and redirect oc module.

* Add changelog fragment for move of oc connection plugin to OKD collection.

* Update BOTMETA as well.

* Newer changelog fragment format.

* Update changelogs/fragments/oc-migration-removal.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-01 22:20:02 +01:00
Amin Vakil
dc60e71fd5
Add no-optional flag to npm (#1428)
* Add no-optional flag to npm

* Add changelog

* Oops

* Add no_optional to Npm class
2020-12-01 21:13:15 +00:00
Alexei Znamensky
ae0d3cb090
Tidy up validate-modules:no-default-for-required-parameter and other cases (#1423)
* Fixed validate-modules:mutually_exclusive-unknown for plugins/modules/packaging/os/redhat_subscription.py

* fixed validation-modules for plugins/modules/cloud/lxd/lxd_container.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py

* fixed validation-modules for plugins/modules/cloud/opennebula/one_host.py

* fixed validation-modules for plugins/modules/cloud/opennebula/one_image_info.py

* fixed validation-modules for plugins/modules/cloud/opennebula/one_image.py

* fixed validation-modules for plugins/modules/cloud/opennebula/one_service.py

* fixed validation-modules for plugins/modules/cloud/opennebula/one_vm.py

* fixed validation-modules for plugins/modules/net_tools/cloudflare_dns.py

* fixed validation-modules for plugins/modules/net_tools/ip_netns.py

* fixed validation-modules for plugins/modules/net_tools/ipinfoio_facts.py

* fixed validation-modules for plugins/modules/net_tools/netcup_dns.py

* fixed validation-modules for plugins/modules/remote_management/wakeonlan.py

* added types to plugins/modules/remote_management/stacki/stacki_host.py but still cannot remove ignore line

* added a couple of FIXME comments

* fixed validation-modules for plugins/modules/remote_management/manageiq/manageiq_provider.py

* fixed validation-modules for plugins/modules/notification/rocketchat.py

* fixed validation-modules for plugins/modules/monitoring/bigpanda.py

* fixed validation-modules for plugins/modules/identity/keycloak/keycloak_client.py

* fixed validation-modules for plugins/modules/identity/keycloak/keycloak_clienttemplate.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_user.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_group.py

* fixed validation-modules for plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

* fixed validation-modules for plugins/modules/cloud/smartos/imgadm.py

* fixed validation-modules for plugins/modules/cloud/profitbricks/profitbricks_nic.py

* fixed validation-modules for plugins/modules/cloud/ovirt/ovirt_external_provider_facts.py

* Tidy up validate-modules ignores no-default-for-required-parameter + couple of other cases

* Added changelog frag

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_alert_policy.py

* fixed validation-modules for plugins/modules/cloud/centurylink/clc_firewall_policy.py

* fixed validation-modules for plugins/modules/cloud/lxd/lxd_profile.py

* Typos and small fixes

* fixed validation-modules for plugins/modules/net_tools/ldap/ldap_passwd.py

* Typos and small fixes, part 2

* Fixes from PR comments

* Update plugins/modules/cloud/profitbricks/profitbricks_nic.py

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

* Rolled back the mutually-exclusive-unknown in redhat_subscription

* Update changelogs/fragments/1423-valmod_multiple_cases.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-01 21:28:40 +01:00
Ox
b8794c35e8
Feat: nmcli - Add infiniband and routes support (#1260)
* Feat: nmcli - Add infiniband basic support

Add infiniband basic support, using same pattern than ethernet.

* Fix: nmcli - Correct line length

Auto tests report line 1002 is too long. Correcting.

* Update plugins/modules/net_tools/nmcli.py

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

* Fix: nmcli - Add routes support

Adding ipv4.routes support
Adding ipv4.never-default support

* Fix: nmcli - Add 1260 changelog fragment

* Update plugins/modules/net_tools/nmcli.py

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

* Update changelogs/fragments/1260-nmcli-ib-routes.yaml

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

* Fix: nmcli - Fix routes4 and never-default

Ensure ipv4.routes and ipv4.nerver-default are properly implemented.

* Fix: nmcli - Fix routes4 documentation

Bad format, was str, should be list with elements str

* Fix: nmcli - Add missing version_added

* Fix: nmcli - Fix pylint errors

* Feat: nmcli - Use regex for ipv4.routes

* Fix: nmcli - Filter None routes4

* Feat: nmcli - Add route_metric4 and set mutual_exclu

* Fix: nmcli - Fix E231

* Fox: nmcli - Remove ethernet MTU change for Infiniband

* Fix: nmcli - Update changelog fragment

* Fix: nmcli - Update test ipv6

* Debug: nmcli - Check test output

* Fix: nmcli - Set never_default4 to no by default

* Fix: nmcli - Fix bridge slave test

* Fix: nmcli - Add regex for metrics

* Fix: nmcli - Update release version

* Fix: nmcli - E501

* Fix: nmcli - E502 E128

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-01 20:39:56 +01:00
Alexei Znamensky
b69ea1dfd9
Tidy up validate-modules:doc-required-mismatch (#1415)
* Tidy up validate-modules ignores doc-required-mismatch

* Tidy up validate-modules ignores doc-required-mismatch - update on 2.11

* Fixed chengelog frag

* rolledback removal of parameter from cloud/smartos/vmadm.py

* removed changelog frag for the rollback

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

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

* Revert "removed changelog frag for the rollback"

This reverts commit 56a02ead3b.

* suggestion from PR

* yet another PR suggestion

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-28 14:06:28 +01:00
Alexei Znamensky
47c456f740
Tidy up validate-modules:doc-elements-mismatch (#1399)
* fixed validation-modules for plugins/modules/cloud/xenserver/xenserver_guest.py

* fixed validation-modules for plugins/modules/identity/ipa/ipa_hbacrule.py

* fixed validation-modules for plugins/modules/identity/keycloak/keycloak_client.py

* fixed validation-modules for plugins/modules/identity/keycloak/keycloak_clienttemplate.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_fixed_address.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_host_record.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_member.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_network.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_nsgroup.py

* fixed validation-modules for plugins/modules/remote_management/redfish/redfish_config.py

* fixed validation-modules for plugins/modules/source_control/github/github_webhook.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py

* Tidy up validate-modules ignores doc-elements-mismatch

* Added changelog frag for utm_proxy_exception

* Update changelogs/fragments/1399-fixed-wrong-elements-type.yaml

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

* Fixed couple of missing docs

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-27 08:01:02 +01:00
Felix Fontein
1db167b12a
Bump version to 2.0.0 (#1369)
* Bump version to 2.0.0.

* Remove deprecated 2.0.0 features.

* Test for failure.

* Fix cache plugin unit tests.

* Accept direct import only for Ansible 2.9.
2020-11-26 14:26:36 +01:00
peter
382be570ec
Apache2 module: Add another shib module identifier (#1383)
* Add another shib module identifier to apache2 module (#1379)

* Update changelogs/fragments/1383-apache2-module-amend-shib-workaround.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-26 07:26:40 +01:00
elreydetoda
cc7d0f7670
adding fix for packet_net.py (#891)
* adding fix for packet_net.py

* adding changelog fragment

* squashing to fix cascading notifications

Apply suggestions from code review

thanks felixfontein for working with me!

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

adding suggestions from code review (accessing dict in a better way)

modified packet_net fragment to accurate description

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-26 07:08:15 +01:00
Dan Jackson
d669e2b60d
Fix macports package present/active detection (#1308)
* Fix typo in redhat_subscription testcase

* Fix macports state=present matching against the wrong package name

Previous implementation returned true if the desired package name occurred anywhere in
the list of all installed packages. For example as a substring of another package name,
or even as a substring of a variant name for a different package.

Instead:

- request macports only list installed packages matching the desired package name, instead of all installed packages.
  - Note `port` exits with 0 regardless of whether any packages match the requested name.
- pass `-q` flag: "Do not print the header line. This is useful when parsing the output of port installed in scripts for further processing."
- eliminate `use_unsafe_shell=True` by searching stdout contents natively in python
instead of using `grep`. This has the added benefit of eliminating any potential
misinterpretation of characters in the package name as regex special characters.

If there are zero matching installed packages, `out` is empty.
If there are one or more matches (due to multiple installed versions), the output format
is: ec8a2bc682/src/port/port.tcl (L3320-L3323)

Notably, two leading spaces, the package name, a space, and then other information.
According to blame via github, those lines haven't changed in 11 years.

* Update macports state=active to eliminate use_unsafe_shell

Similar to previous commit (for macports state=present):

- pass `-q` flag: "Do not print the header line. This is useful when parsing the output of port installed in scripts for further processing."
- search stdout contents natively in python instead of using `grep`.
- added parentheses to search string to eliminate false positives if the package name
or variants contain the word `active`. Still could fail if they contain `(active)`, but
that's less likely

If there are zero matching installed packages, `out` is empty.
If there are one or more matches (due to multiple installed versions), the output format
is: ec8a2bc682/src/port/port.tcl (L3320-L3323)

For "state=active", we're looking for a line that contains `(active)` in the output.

* Basic test case of query_port for present and active

* Attempt to fix lint errors in test

* Different mock module creation, changed test cases indentation/spacing

- picked the wrong mock code to cargo-cult. Thanks to felixfontein for this suggestion
- 4 space indentation on continuation line. I thought I had that originally, but it looks like my editor sabotaged me with mixed tabs/spaces
- Remove leading newline on multi-line test cases. I don't think it would make a difference, but I'd read up on how the python syntax works and want to more accurately represent macports output.

fingers crossed this addresses the known build errors

* Add changelog fragment

* Update tests/unit/plugins/modules/packaging/os/test_macports.py

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

* Update changelogs/fragments/1307-macports-fix-status-check.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-26 06:59:32 +01:00
Felix Fontein
dbae7da6bc
Improve docker, hetzner and postgresql migration (#1382)
* Improve fragment formatting.

* Remove docker fragments.

* Remove postgresql fragments.
2020-11-25 08:04:50 +01:00
Albert Vaca Cintora
e73451f09e
Datadog: Mark notification_message as no_log (#1338)
* Datadog: Mark notification_message as no_log

This message field is often used to page people or teams inside
an organization when a monitor goes off, by using `@` mentions.
If Ansible is configured to use Datadog's callback plugin [1], an
unwanted interaction would happen: 
When a monitor fails to create, the callback sends an error event
to Datadog which contains all the task's loggable fields in it.
If the message field contains `@` mentions, this event would page
the people on them.

[1] https://github.com/DataDog/ansible-datadog-callback

* Add changelog fragment

* Update changelogs/fragments/1338-datadog-mark-notification_message-no_log.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-25 07:25:00 +01:00
morph027
1f7649fcd7
Add Cloud Init variables for Proxmox_KVM module (#797)
* Add Cloud Init variables for Proxmox_KVM module

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

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

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

* apply yaml syntax to all examples

* remove trailing whitespaces

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-11-24 20:32:25 +01:00
Tristan Le Guern
51a08ea398
proxmox: create a common base (#1331)
* proxmox: create a common base

Add a doc_fragment to share the documentation regarding authentication
parameters (api_host, api_user, api_password, api_token_id,
api_token_secret as well as the lone validate_certs).

Add a module_utils to hold common code such as the argument spec (again
related to authentication paramters), a helper function to convert from
Proxmox boolean representation to python and the base class
ProxmoxAnsible.
For now it only handles the connection to Proxmox VE API but more can be
added in the future.

To check if everything is well in place add three new modules:
proxmox_{domain,group,user}_info.

And finaly tests these new modules.

* Apply suggestions from code review

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

* Add tests/integration/targets/proxmox/aliases

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-24 17:30:39 +01:00
Andrew Klychkov
72b59c764e
Remove postgresql content for 2.0.0 (#1355)
* Remove postgresql content

* add suggested

* Update meta/runtime.yml

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

* Remove symlinks

* Remove a consequence of rebasing

* Remove ssl task from setup_postgresql_db

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-24 09:01:50 +01:00