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

165 commits

Author SHA1 Message Date
Giovanni Sciortino
7bdd78b053
rshm_repository: reduce execution time when changed == False (#458)
Co-authored-by: Giovanni Sciortino <gsciorti@redhat.com>
2020-06-11 11:00:48 +03:00
majekw
519162443f
slackpkg: fix name matching in package installation (#450) (#454)
* slackpkg: fix name matching in package installation (#450)

* Escape re parameters and optimize matching as suggested in code review.

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

* Update changelogs/fragments/450-slackpkg-package-matching.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-06-11 10:48:10 +03:00
quidame
8635cd84d4
New module: dpkg_divert (#417)
* feature: module dpkg_divert + tests

* try to skip non-deb linux distrib

* use collection namespace in EXAMPLES

* skip unsupported OS/distrib in tasks instead

* tests: remove unskipped distribs

* apply changes suggested by Andersson007

* Remove ANSIBLE_METADATA (no more needed).
* Normalize docstrings (capitalize descriptions, fix styling, use yes/no
  booleans).

* fix descriptions

* update DOCUMENTATION

* Drop field 'version_added' (no more needed).
* Add a note about check_mode support.

* use list comprehension

* support diff mode

* Move 'before'/'after' dicts into 'diff' dictionary.
* Set 'diversion' as the actual state (or the state that would be
  reached, when in check mode).
* Always return 'diversion' on handled exits (exit_json & fail_json).

* enable 'diff' mode in tests, add missing 'become'
2020-06-10 21:01:16 +03:00
Andrew Klychkov
e47da0f512
mysql_db: add check_implicit_admin parameter (#486)
* mysql_db: add check_implicit_admin parameter

* add CI tests

* add changelog fragment

* fix
2020-06-10 12:46:44 +03:00
networkers.pl
ab26dc8fa1
cisco_spark -> cisco_webex rename and message option fix (#457)
* This is a modified copy of the cisco_spark.py file. The name change is associated with the change of the product name from Cisco Spark to Cisco Webex Teams. In addition, the current version (cisco_spark) does not work due to a name collision with MESSAGE. I had to modify the name from "message" to "webexmsg" in many places in cisco_webex. It works fine in this version.

    The original author has been preserved and copied from cisco_spark to cisco_webex.
    @drew-russell

    The current version of cisco_spark module does not work due to a name collision with MESSAGE. I had to modify the name from "message" to "webexmsg" in many places in cisco_webex.py file. It works fine in this version.

    The name change is associated with the change of the product name from Cisco Spark to Cisco Webex Teams.

* cisco_spark rm

* suggested change

* aliases added to in def main funcitons

* sanity check corrections

* addess aliases type to msg_type

* felixfontein requested changes on this pull request.

* Return value change from msg to message.

* plugins/modules/notification/cisco_webex.py validate-modules:invalid-argument-name
added to tests/sanity/ignore-2.10.txt
2020-06-09 09:38:06 +03:00
Petr Klejch
423a7f122a
Add 'init' option for docker_swarm_service. (#476)
* Add 'init' option for docker_swarm_service.

* Add changelog fragment.

* CR fixes.
2020-06-09 08:23:32 +02:00
Andrew Klychkov
8d6d292358
mysql_db: add restrict_config_file parameter (#468)
* mysql_db: add restrict_config_file parameter

* add CI tests

* add changelog fragment
2020-06-09 09:10:06 +03:00
Mike Hume
1a13287788
Add sops lookup plugin (#374)
* add sops lookup plugin

* fix pylint

* fix undefined encrypted_file variable

* decode sops output as text by default

* add variable to control decrypted content print in logs

* use Sops class decryption method

* lookup should return text, use appropriate ansible facility

* use ansible.module_utils._text.to_native

As required by Ansible documentation on [raising errors][raising-errors]
from plugins, use to_native to wrap errors to ensure string compatibility
between Python versions.

[raising-errors]: https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#id3

* use with_items instead of with_file in sops lookup documentation

[with_file][with-file], per Ansible documentation, returns the content of
the file. As sops is not able to decrypt a string by itself but requires
the file is passed as argument, passing the content breaks the lookup
plugin as reported by [here][bug-report].

[with_items][with-items] should be used instead.

[with-file]: https://docs.ansible.com/ansible/2.4/playbooks_loops.html#looping-over-files
[with-items]: https://docs.ansible.com/ansible/2.4/playbooks_loops.html#standard-loops
[bug-report]: https://github.com/ansible/ansible/pull/59639#issuecomment-540803722

* uniform sops exception handling between plugins

* Apply suggestions from code review

Co-Authored-By: Felix Fontein <felix@fontein.de>

* remove sops lookup plugin print option

Is no longer possible to print the decrypted secrets directly from this
plugin, but `debug` module can be used instead.

* add github handle to author

* add setup_sops integration target

* extract sops module

* add lookup_sops integration tests

* use sops module

* Update plugins/module_utils/sops.py

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

* Update plugins/module_utils/sops.py

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

* Update plugins/lookup/sops.py

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

* Update plugins/module_utils/sops.py

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

* Update plugins/module_utils/sops.py

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

* Update test/integration/targets/lookup_sops/tasks/ubuntu.yml

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

* Update plugins/module_utils/sops.py

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

* Update test/integration/targets/lookup_sops/files/simple.sops.yaml

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

* Adding aliases file

* Emtpy spaces

* Update plugins/lookup/sops.py

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

* Update plugins/lookup/sops.py

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

* Update plugins/lookup/sops.py

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

* Update test/integration/targets/lookup_sops/tasks/ubuntu.yml

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

* Update plugins/lookup/sops.py

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

* Update test/integration/targets/lookup_sops/tasks/ubuntu.yml

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

* Update test/integration/targets/lookup_sops/tasks/ubuntu.yml

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

* gpg -> gnupg2

* with_items -> loop

* Move error logic to module_utils.

* Make Sops.decrypt() also handle errors and decode output.

* Improve error handling.

* Improve example formatting.

* Reorganize tests.

* Add test.

* Remove version_added.

Co-authored-by: Edoardo Tenani <edoardo.tenani@protonmail.com>
Co-authored-by: Edoardo Tenani <edoardo.tenani@gmail.com>
Co-authored-by: Edoardo T <endorama@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-06-06 21:36:28 +02:00
Martin Budsjö
77c29a1542
Added 'extra_install_args' module option to allow extra upgrade/install specific zypper arguments (#382)
* Added 'extra_install_args' option to allow extra upgrade/install

Example zypper args for this is

* --allow-vendor-change
* --replacefiles and
* --force-resolution

* Fix comment issue..

* Change extra_install_args option to a list.

Improved doc.

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

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

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

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

* Switch from using extra_install_args to individual module options.

* Fix syntax errors and limit 'allow-vendor-change' to 'dist-upgrade'

* Removed un-needed import

* Added changelog fragment

* Added tests for zypper replacefiles and allow_vendor_change options

* Removed dist-upgrade as it changes the test environment.

And it is hard to undo.

* Added proper test of replacefiles zypper option

Buiding two rpm packages containing same file path but with different content.
Making sure we fail to install them without the replacefiles options and that we succeed
using it.

* Make sure to create directory before writing files

* Fix indentation of ignore_errors

* Correct genereated rpm file name

* Improved duplicate file assertions

* Ensure no previous netcat package still exists.

* Corrected naming of example task.

* Fix variable name typo.

* Fix proper duplicate_content access

* Make sure to clean up duplicate rpms after tests.

* Removed debug

* Removed version_added of option allow_vendor_change and replacefiles

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-06-05 08:01:21 +02:00
Andrew Klychkov
a0c5580fc3
mysql_db: remove version_added for the option (#455) 2020-06-03 20:02:44 +03:00
Mohammad Yosefpor
116978abca
terraform module: Added backend_config_file and multiple variables_file (#394)
* added backend_config_file, multiple variables_file

* typo

* sanity check

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

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

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

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

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

specify type

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

* change log, fixes

* polural form of option names

* typo

* another typo

* Update changelogs/fragments/394-terraform-add-config_file.yml

Added PR URL.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-06-03 15:23:00 +03:00
Diane Wang
13c0639d9d
files: add a new module iso_create (#397)
* add a new module iso_create

* add elements in argument spec

* remove changelog for new module

* change the path of test file

* comment out pip check task in test case

* comment out install pip in test case

* move pip install task and add skip python2.6
2020-06-03 10:00:07 +03:00
Olof Johansson
1a0a185ac3
scaleway: Fix case mismatch causing key lookup failure (#445)
The common http api client class used by the scaleway modules only
enables automatic jsonification of the request body if the
"Content-Type" header is application/json. The client only included
"Content-type" in its default set of headers (notice the case
variation).

This caused a KeyError on send() if the caller relied on the default
content-type value.
2020-06-02 14:09:58 +01:00
Andrew Klychkov
c2bf9ea9fb
Mysql db unsafe passwd (#428)
* mysql_db: add new parameter unsafe_login_password

* add CI tests

* add changelog fragment
2020-06-02 09:17:54 +03:00
Brian Scholer
f81e562301
redis cache - add support for TLS/encryption in transit (#410)
* Add encryption in transit support for redis cache

* Fix missed connection/uri switch

* Add changelog

* Update changelogs/fragments/410-redis_cache-add_tls_support.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-05-30 12:26:37 +02:00
cassio-santos
9de5c0c53c
LVG: add new parameter pvresize (#422)
* enabling resize in pv.

* change pvresize default behavior to false

* includes changelog on pvresize

* punctuation fix

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

* fixes typo and changes pvresize_cmd location

* Update changelogs/fragments/442-add-new-parameter-pvresize.yaml

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

* Update plugins/modules/system/lvg.py

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

* rebase and add EXAMPLE for pvresize

* fix wrongly submited merge conflict

* Update plugins/modules/system/lvg.py

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

* adding tests

* add test for check_mode

* fix identation

* Update tests/integration/targets/lvg/tasks/test_pvresize.yml

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

* Update tests/integration/targets/lvg/tasks/test_pvresize.yml

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

* fix identation

Co-authored-by: CASSIO ALVES <cassioalves@bocombbm.com.br>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: cassio alves <cassio@localhost.localdomain>
2020-05-29 22:16:23 +03:00
Andrew Kiselev
317532f8bd
packet_device - add tags parameter (#418) 2020-05-29 16:51:07 +03:00
lospatchos
7c6d22efba
Update sesu.py: use defined prompt (#227)
* Update sesu.py: use defined prompt

* add changelog

Co-authored-by: Alexandros Zachos <alexandros.zachos@cz.ibm.com>
2020-05-28 23:09:11 +01:00
Charles C
694546d784
datadog_monitor: kwargs for _update_monitor used message vs notification_message (#389)
* kwargs for _update_monitor wasn't corrected to new notification_message param

* forgot to bump a changelog fragment

* Update changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-05-28 23:04:19 +01:00
Jairo Llopis
07a141fc85
Do not say you delete what you don't (#426)
I hope these docs are lying, and this fix makes them say the truth.
2020-05-28 20:51:14 +02:00
ximon18
3ff7a0baf2
Add validity check for [Driver][IPAddress] else use docker-machine ip command. (#412)
* Add validity check for [Driver][IPAddress] else use docker-machine ip command.

* Note why we fallback to the `docker-machine ip <machine name>` command.

* Add changelog fragment.

* Corrected module name in changelog fragment.

Co-authored-by: Ben Roose <ben.roose@wichita.edu>
2020-05-25 23:04:09 +02:00
Robert Osowiecki
b00ee3b807
parted: fix return value documentation (#406)
* parted: fix return value documentation (#362)

* changelog entry not necessary for documentation fixes, removed
2020-05-25 12:35:46 +02:00
Alvaro A
ece18b756b
gitlab_project_variable: added support for variable_type (#181)
* gitlab_project_variable: added support for variable_type

* gitlab_project_variable: Added integration tests for variable_type file.

* Changed test case variable name, ansible was masking the output.
2020-05-25 03:18:19 -07:00
Fernando Giorgetti
1774352313
java_keystore - Added support for private key pass phrase (#276) (#276)
* This fixes (#275)
* Migrated PR from https://github.com/ansible/ansible/pull/47768
* Applied requested changes
* Fixed issue with load_file_common_arguments
* Using args list when calling run_commands
* Keytool now reads passwords from stdin
* Fixed PEP8 indentation issues
2020-05-25 11:09:18 +03:00
Jose Angel Munoz
d1798d3056
Bug/syslog json exception (#408)
* Adds fix setting options

* Adds changelog
2020-05-25 07:47:01 +02:00
Robert Osowiecki
eb941c30b4
parted: consider current partition state even in check_mode (#247)
* parted: consider current partition state even in check_mode

* Update changelogs/fragments/183-parted_check_mode.yml

Co-Authored-By: Andrew Klychkov <aaklychkov@mail.ru>

* Test check_mode considers get_device_info

* fixed pep8 E302: expected 2 blank lines

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-05-23 10:15:20 +03:00
Jeffrey Cutter
4e7732586f
Fix NetworkManager-libnm typo in nmcli.py documentation. (#403) 2020-05-22 22:14:04 +02:00
Felix Fontein
7bb36d62d0
intersight_info has been moved to cisco.intersight. (#395) 2020-05-21 22:12:25 +02:00
Toshio Kuratomi
651065bc03 Fix the docs for dig and nios.
The return docs for both of these didn't follow what the docs build
would understand.  Changed them so that they are properly formatted.
2020-05-20 13:16:51 -07:00
Andrew Klychkov
bf5856b10c
postgresql_db: add an example (#387) 2020-05-20 21:07:21 +03:00
René Moser
7b2ad8a80c
time_filter: improve hints in error message (#368) 2020-05-20 09:22:56 +02:00
Toshio Kuratomi
1a87822704 Fix the environment variable
This was using k8S_AUTH_CONTEXT with a lowercase k.  That doesn't match
with any of the other K8s stuff so users would probably be confused why
their envvar wasn't working.
2020-05-19 22:37:17 -07:00
Felix Fontein
72fe304b8f
gcp_storage_file: error gracefully when google.cloud is not there (#372)
* Error gracefully when google.cloud is not there.

* Add changelog fragment.
2020-05-19 23:06:40 +02:00
Felix Fontein
c5b2954c30
Clean up google modules (#351)
* Clean up google modules.

* Forgot links, and to update ignore-2.10.txt.

* Fully remove _facts modules.

* Forgot to remove ignore.txt entries.
2020-05-19 20:40:43 +02:00
Felix Fontein
0399127d11
Time filter improvements (#359)
* Adjust target directory so that ansible-test knows what to run when filters change.

* Divide by multiple instead of multiplying with product of 1/factor to improve numerical robustness.

* Allow to say what a year or month is (in days).

* Add changelog fragment announcing the time filters.

* Make sure unknown keyword args result in errors.

* Fix formatting screw-up.
2020-05-19 11:18:49 +02:00
Felix Fontein
a0a534508a
Un-remove wrongly removed ovirt modules and adjust deprecation to Ansible 2.14 (#353)
* Un-remove wrongly removed ovirt modules and adjust deprecation to Ansible 2.14 (regular 4 version deprecation cycle).

* Update sanity-2.10.txt

* Vendor dependencies from ovirt.ovirt as deprecated, and remove dependency on ovirt.ovirt.

* Use ovirt_facts doc_fragment, and don't add _ovirt_info doc_fragment.
2020-05-18 20:43:50 +01:00
LucasBoisserie
aadc6cd66d
Deprecated Helm module (#115)
Helm module is deprecated in favor of a new helm module from community.kubernetes.
2020-05-18 14:15:40 +05:30
René Moser
945296f314
filter: add new time convert filter (#347)
* filter: add new time convert filters

The plugin include:
- to_seconds
- to_minutes
- to_hours

* refactor and extend

* more UX improvements

* Apply suggestions from code review

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

* even more UX improvments

* fix indentation

* fix for py3

* enable aix in ci

* simplify

* add to_months, use 360d as year.

* rearrange tests

* year back to 365 days

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-05-18 09:54:23 +02:00
Markus
cd5e3e2d85
add description and hookscript parameters to proxmox LXC container (#245)
* add description and hookscript parameters to proxmox LXC container

* fix pep8 E128

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

Co-Authored-By: Andrew Klychkov <aaklychkov@mail.ru>

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

Co-Authored-By: Andrew Klychkov <aaklychkov@mail.ru>

* add example for proxmox hookscript and description

* add changelogs fragment for PR #245

* set hookscript type

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-05-18 08:17:11 +03:00
Patrick Humpal
196d3205ca
Use api v4 for airbrake deploy notices (#124)
* Use api v4 for airbrake deploy notices

* fix invalid deprecated version

changes 2.14 to 2.12

* revert

* ignore it
2020-05-17 09:42:08 +02:00
Andrew Klychkov
a7c830f49d
Fix examples formatting (#345) 2020-05-16 15:07:51 +02:00
Felix Fontein
772bfe9936
Fix linting errors. (#343) 2020-05-15 13:35:41 +02:00
Andrew Klychkov
327832dcbb
Fix Ansible documentation in part of example formatting. Part 2 (#333)
* Fix Ansible documentation in part of example formatting

* fix

* Revert osx_defaults.py
2020-05-15 13:27:06 +03:00
Andrew Klychkov
328319b926
Fix Ansible documentation in part of example formatting. Part 1 (#332)
* Fix Ansible documentation in part of example formatting

* Fix
2020-05-15 13:13:45 +03:00
Andrew Klychkov
983d937b7b
Fix Ansible documentation in part of example formatting (#334) 2020-05-15 13:12:41 +03:00
Abhijeet Kasurde
58ed77e851
syslogger: new parameter 'ident' (#340)
Added new parameter ident to specify the name of the application
which is sending the message to Syslog using syslogger module.
2020-05-15 14:35:32 +05:30
Andrew Klychkov
5d226f86b6
Remove ANSIBLE_METADATA (#339)
* Remove ANSIBLE_METADATA

* remove from other modules

* remove from plugins and scripts
2020-05-14 14:03:42 +01:00
Kenyon Ralph
4dad1ee6fe
linode inventory plugin: fix parsing of access_token (#318)
Read config before trying to use the config.

Original issue: https://github.com/ansible/ansible/issues/66874
2020-05-13 12:37:23 +01:00
Jürgen Hötzel
43c805f7db
Improve package state detection speed (#326)
Don't query for full details of a package. It is sufficient to output
the name and version. This also simplifies parsing the output.
2020-05-13 08:46:05 +02:00
Pavlo Bashynskyi
80d41583d1
Add info command to redis module (#286)
* Add info command to redis module

* Fix sanity test

* Create a separate redis_info module

* Type of arguments in documentation was determined

* Add redis_info test

* Fix sanity test

* Add integration test

* Add integration platforms (centos7/8,fedora30/31,opensuse15+py2,ubuntu1604/1804)

* Add centos6 support

* Fix suggestions

* Add contact email
2020-05-12 20:18:24 +03:00