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

365 commits

Author SHA1 Message Date
Felix Fontein
909ac92fe2
Fix CI (#1752)
* Limit cryptography to < 3.4 for Python < 3.6.

* Work around old pip versions.

* Use constraints file when installing stormssh.

* Work around old pip in RHEL8.2, CentOS 8, Ubuntu 18.04, and OpenSuSE 15
2021-02-09 07:47:08 +01:00
Felix Fontein
701a89eb1c
Make sure mercurial is also installed on OpenSuSE. (#1734) 2021-02-05 08:08:06 +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
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
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
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
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
Abhijeet Kasurde
5a52b573fe
ssh_config: new module (#1640)
* [WIP] ssh_config: new module

Fixes: #1562

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

* Update tests/integration/targets/ssh_config/aliases

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

* Update plugins/modules/system/ssh_config.py

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

* Update plugins/modules/system/ssh_config.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-28 07:26:48 +01:00
Silvie Chlupova
f3e640d5a0
New module: Add copr module (#1592)
* New module: Add copr module

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-27 19:30:03 +01:00
Felix Fontein
bb323ab12f
Remove community.kubernetes testing dependency. (#1682) 2021-01-27 07:17:00 +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
Felix Fontein
b3d3b108bf
Add CI tests for java_cert and java_keystore (#1666)
* Try to run java_cert tests in CI.

* Forgot to add meta/

* Exclude CentOS 6.

* Add basic java_keystore tests.

* Forgot that.

* Without a CN, keytool always claims 'keystore password was incorrect' (sigh).

* Improve/fix tests.
Apparently the module cannot handle changed passwords.

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

Co-authored-by: Tadej Borovšak <70951+tadeboro@users.noreply.github.com>

* More simpliications.

* Fix typo.

Co-authored-by: Tadej Borovšak <70951+tadeboro@users.noreply.github.com>
2021-01-24 16:51:02 +01:00
Felix Fontein
4223f48d38
Add Ubuntu 20.04 to CI (#1658)
* Add Ubuntu 20.04 to CI.

* Skip mqtt test on Ubuntu 20.04.

* Use explicit disable instead of aliases.

* Add Ubuntu 20.04 specific config for setup_postgresql_db.

* Fix postgres version.
2021-01-22 20:43:39 +00:00
Felix Fontein
c1eb0a232c
Bump CI to FreeBSD 11.4, 12.2. (#1657)
* Bump CI to FreeBSD 11.4, 12.2.

* Make FreeBSD Python package selection more future-proof.
2021-01-22 15:52:40 +01:00
Alexei Znamensky
b9408dc8ef
Django integration tests (#1607)
* added integration test for module django_manage

* Initial attempt at integration tests for django_manage

* added ignore lines for django python code

* added more ignore lines for django python code

* removed a couple of extraneous files and ignore lines

* also removed urls.py, as it is not required for testing

* added test group to aliases file

* Adding a few lines attempting to remove py2 from the equation.

* restricted integration tests platforms

* restricted integration tests platforms (moving to aliases)

* foce using a virtualenv for the test, to avoid differences in different OSes

* Adding urls.py back to the test project

* Adding ignore lines for urls.py

* Updated aliases for the testing
2021-01-20 23:13:37 +01:00
Felix Fontein
74174f11ff
Add macOS 11.1 tests (#1619)
* Add macOS 11.1 tests.

* Hopefully fix virtualenv.sh problems.
2021-01-18 10:52:56 +00: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
David Lundgren
aa33ac349c
New sysrc module for managing rc files on FreeBSD (#1460)
* New sysrc module for managing rc files on FreeBSD

* Updated sysrc module, docs and tests per reviews

* Refactored the check_mode to be in the methods and not main

Also updated tests

* Fixed a duplicate "name" key in the sysrc test

* Remove debugging output

* Add changelog fragment

* Remove changelog fragment

* Make sure tests actually run in CI.

* Update failing test due to bad path to jail

* Create and remove testjail for tests

* Fix and cleanup tests

* Set the correct path to the testjail

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-16 14:14:23 +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
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
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
Felix Fontein
637571993a
Skip monit tests on RHEL. (#1615) 2021-01-11 21:59:41 +01:00
Abhijeet Kasurde
e16029db64
rpm_ostree_pkg: new module (#357)
* rpm_ostree_pkg: new module

Added functionality to manage overlay packages using
rpm-ostree command.

Signed-off-by: Dusty Mabe <dusty@dustymabe.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-11 09:47:22 +03:00
Abhijeet Kasurde
126c397d6c
hg: Re-enable tests (#1599)
* Update license boilerplate
* Change mercurial repository links

Fixes: #840

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-07 07:23:40 +01:00
adralioh
74fcb0335e
Add ipa_pwpolicy module (#1147)
* Add ipa_pwpolicy module

Used for modifying FreeIPA password policies

Functions similarly to the existing IPA modules

* Add sample return value to ipa_pwpolicy module

* Add unit tests for the ipa_pwpolicy module

Also moves the `exit_json` call in the main module outside of the try
clause because it was stopping the tests from working

* Update version added for the ipa_pwpolicy module

* Add check_mode note for the ipa_pwpolicy module

* Add missing period in ipa_pwpolicy module doc

* Fix tense of the ipa_pwpolicy module description

* Reword ipa_pwpolicy documentation

Improve the wording of the ipa_pwpolicy documentation to make it more
clear

* Rename ipa_pwpolicy options to use shorter names
2021-01-06 19:17:07 +03:00
Abhijeet Kasurde
e7b16a96b9
chroot: re-enable connection chroot tests (#1591)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-06 08:07:46 +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
Abhijeet Kasurde
d12951b9c7
Re-enable nomad tests (#1582)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-04 13:22:17 +05:30
Abhijeet Kasurde
785951484b
pam_limits: adds check mode and diff mode (#1575)
* Add integration tests

fixes #827
fixes #828

Signed-off-by: Christian Krause <christian.krause@idiv.de>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Christian Krause <christian.krause@idiv.de>
2021-01-03 13:32:54 +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
Felix Fontein
9f71073d37
Remove ansible.netcommon dependency. (#1561) 2020-12-30 10:37:23 +01:00
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
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
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
Jeffrey van Pelt
0d1417dcfa
New module: proxmox_snap (#1135)
* Fresh branch to try this again

* Fix typo

* Fix sanity error

* Redid some tests, not sure if this works...

* Re-fixed documentation

* Fixed linter

* Update layout

* Processed feedback

* Processed feedback

* Added check_mode

* Run test with check mode

* Fix layout

* Fix more layout

* Fixed last sanity errors (for now)

* Check mode is not a module arg..

* Fix sanity-error

* Reworked check_mode and adapted tests

* Added extra test to also run through remove logic, added message for check_mode to show output is different, grabbed magicmock from different library to fix py2 errors

* Remove unused function

* Processed feedback

* Processed feedback

* Processed feedback
2020-12-21 14:37:30 +01:00
Felix Fontein
dd55c3c3bb
Fix AZP CI (#1508)
* Fix 2.9/2.10 cloud

* Fix splunk callback tests.

* ansible_virtualization_type on AZP can be one of container/containerd instead of docker for dockerized tests.

* Disable nomad tests.

* Work around AZP bugs.
2020-12-18 11:48:28 +01:00
John Barker
33126b7267 AZP Bootstrap 2020-12-17 18:13:12 +00:00
Hippolyte HENRY
19a5975181
Add downtime module (#1437)
* Add downtime module

* review + tests

* importorskip + review

* py36

* make py3.6+ dep explicit
2020-12-15 19:50:42 +01:00
Vladimir Botka
1f8173b797
Added integration tests for target filter_list (#1477)
* Added integration tests for target filter_list

* Added false negative tests to lists_mergeby

* Fixed tests lists_mergeby
2020-12-12 17:21:29 +01:00
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
Felix Fontein
e1bf23d27d
Add ignore-2.10.txt entry analogous to ignore-2.11.txt entry. (#1465) 2020-12-08 13:37:19 +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
Felix Fontein
4566812591
Fix new sanity errors. (#1451) 2020-12-05 22:10:39 +01:00
Bruno Travouillon
8cedec381f
nmcli: add connection.zone parameter (#1426) 2020-12-05 16:18:29 +01:00
Amin Vakil
65d4fe2f4f
zypper_repository: fix broken tests (#1449)
* Change broken repository

* Re-enable integration tests

* Fix integration test
2020-12-05 16:02:01 +01:00