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

210 commits

Author SHA1 Message Date
Sergey Mikhaltsov
389b004879
added gitlab_project_members (#1829)
* added gitlab_project_members

* fix code style

* added some arg to doc

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

* integration test for gitlab_project_members module

Co-authored-by: Sergey Mikhaltsov <s.mikhaltsov@leadgid.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-21 17:56:53 +01:00
Felix Fontein
57f56b02d8
Disable flatpack_remote test due to expired key. (#1862) 2021-02-20 10:20:23 +01:00
Tristan Le Guern
682674dd5f
proxmox_kvm: add integration tests (#1849) 2021-02-18 11:54:30 +01:00
Alexei Znamensky
e247300523
Adjusted django_manage integration test files to reduce ignore lines in sanity tests (#1805) 2021-02-13 12:09:54 +01:00
Alexei Znamensky
436bbb0077
Prevented the expansion of parameters in run_command() (#1794) 2021-02-12 06:13:05 +01:00
Felix Fontein
e9551df5ed
Update CI (#1782)
* Update targets for CI for devel branch; move some targets to stable-2.10.

* Skipping test on RHEL 8.3 (it is already skipped on RHEL 8.2).

* Linting.

* Shut 2.9/2.10 pylint complaints up.
2021-02-11 10:24:58 +01: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
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
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
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
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
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
Felix Fontein
637571993a
Skip monit tests on RHEL. (#1615) 2021-01-11 21:59:41 +01: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
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
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
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
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
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
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
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
Vladimir Botka
0f88c71f59
Added filter plugin lists_mergeby. Fix #249 (#604) 2020-12-04 09:32:42 -05:00
Felix Fontein
e1ca4ce1e8
Temporarily disable zypper_repository tests. (#1445) 2020-12-04 08:34:02 +01:00
Amin Vakil
47371041c7
yum_versionlock: new module (#1405)
* new module: yum_versionlock

* Removed redundant logic
* Added check_mode support
* Updated examples
* Updated documentation

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Erik-jan Riemers <riemers@binkey.nl>

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

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

* Fix version_added

* Add module symlink

* Fix symlink

* Improve documentation formatting by Anderssoon007

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

* Improve documentation formatting by Anderssoon007

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

* Improve documentation

* Add notes section

* check_mode is supported

* Initial integration test

* Change pkg to name

* Do the tests only when there is something to update

* Ignore CentOS 6

* Fix

* Do not update obsolete packages

* yum -q versionlock list does not show anything in CentOS 8

* Various suggestions by Andersson007

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

* Apply suggestions from felixfontein review

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

* returned always

* Apply felixfontein suggestion

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

* Fix RETUNRED values returned

* Change default from present to locked

* Remove locked, unlocked states

* change locked/unlocked to present/absent in integration tests

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

* Fix module short_description formatting

* Add myself as co-author

Co-authored-by: Erik-jan Riemers <riemers@binkey.nl>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-03 20:00:49 +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
Zainab Alsaffar
63fbcdb4b1
a new module pagerduty_user (#1025)
* a new module pagerduty_user

* fixed issues related to sanity

* fixed issues related to sanity

* modified the module

* shippable

* typo

* shippable

* removed e

* shippable

* shippable

* shippable

* updated test files

* Update plugins/modules/monitoring/pagerduty_user.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>
2020-11-26 13:22:35 +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
Amin Vakil
31443e57b1
archive: Fix paramater types (#1039)
* archive: Fix ignored sanity test parameter-list-no-elements

* Fix wrong argument type

* Add changelog

* Add integration test for a list of files
2020-11-24 08:11:36 +01:00
Stanislav German-Evtushenko
44fd157a2b
Add filter dict_kv (#1264)
- Add filter `dict_kv` which returns a single key-value pair dictionary created from two arguments

Example 1

```
- hosts: localhost
  gather_facts: false
  vars:
    myvar: myvalue
  tasks:
  - debug:
      msg: "{{ myvar | dict_kv('thatsmyvar') }}"

OUTPUT:
ok: [localhost] => {
    "msg": {
        "thatsmyvar": "myvalue"
    }
}
```

Example 2

```
- hosts: localhost
  gather_facts: false
  vars:
    common_config:
      type: host
      database: all
    myservers:
    - server1
    - server2
  tasks:
  - debug:
      msg: "{{ myservers | map('dict_kv', 'server') | map('combine', common_config) }}"

OUTPUT:
ok: [localhost] => {
    "msg": [
        {
            "database": "all",
            "server": "server1",
            "type": "host"
        },
        {
            "database": "all",
            "server": "server2",
            "type": "host"
        }
    ]
}
```
2020-11-24 05:41:18 +01:00
Felix Fontein
f896c2986c
Removal of docker content for 2.0.0 (#1304)
* Remove docker content.

* Clean up BOTMETA.

* Add redirects, tombstone docker_image_facts and docker_service.

* Add changelog.

* Remove docker action group.

* Rewrite fragment.

* Ansible 2.11 is now called Ansible 3.0.0.
2020-11-23 13:03:19 +01:00
Amin Vakil
9ccc0464ff
archive: remove path folder itself when remove paramater is true (#1083)
* Remove paths folders themselves

* Add changelog

* Add remove integration test

* Check excluded file
2020-11-19 20:51:16 +01:00
Jonathan Piron
6cec8759d0
Fix hashi_vault lookup approle authentication (#1138)
As per the plugin documentation and the Hashicorp Vault documentation (https://www.vaultproject.io/docs/auth/approle#secretid)
secret_id is not mandatory.
Moreover, using this lookup plugin without a secret_id used to work in
Ansible 2.9.

Co-authored-by: Jonathan Piron <jonathanpiron@gmail.com>
2020-11-16 16:42:42 +01:00
Erik Godding Boye
64c6f20b55
Add support for HashiCorp Vault JWT auth (#1213)
* Add support for Hashicorp Vault JWT auth

* Add support for HashiCorp Vault JWT auth (continued)

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

Co-authored-by: Mike Brancato <mike@mikebrancato.com>
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2020-11-16 07:48:58 +01:00
Raghu Siddarth Udiyar
33b8d1c57e
Add docker build output to task result (#805)
The build output is only added during failures, but its useful to
have this available during normal task execution as well.
2020-11-15 16:51:02 +01:00
Felix Fontein
07fa7ea409
Fix iso_extract tests for OpenSuSE (#1296) 2020-11-13 21:59:32 +01:00
Felix Fontein
37c1453601
Try to fix zypper tests. (#1294) 2020-11-13 20:03:16 +01:00