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

325 commits

Author SHA1 Message Date
Felix Fontein
4b9696023a
Backport of https://github.com/ansible-collections/community.docker/pull/73 to stable-1. (#1678) 2021-01-25 18:03:12 +01:00
Felix Fontein
8a95fe8b00
Backport of https://github.com/ansible-collections/community.docker/pull/66 to stable-1. (#1677) 2021-01-25 17:02:54 +00:00
patchback[bot]
cc3fefd325
Add CI tests for java_cert and java_keystore (#1666) (#1672)
* 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>
(cherry picked from commit b3d3b108bf)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-24 17:46:20 +01:00
patchback[bot]
4c9c8e0514
npm - handle json decode exception (#1625) (#1636)
* 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>
(cherry picked from commit a9c64655de)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-14 14:40:33 +01:00
patchback[bot]
a1429d0266
Skip monit tests on RHEL. (#1615) (#1617)
(cherry picked from commit 637571993a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-12 07:09:04 +01:00
Felix Fontein
3077ac770f
chroot: re-enable connection chroot tests (#1591) (#1602)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e7b16a96b9)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-07 12:20:28 +01:00
patchback[bot]
7813cd751a
hg: Re-enable tests (#1599) (#1600)
* Update license boilerplate
* Change mercurial repository links

Fixes: #840

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 126c397d6c)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-07 07:44:20 +01:00
patchback[bot]
d0731b111c
Re-enable nomad tests (#1582) (#1586)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit d12951b9c7)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-04 09:18:37 +01:00
patchback[bot]
4f7d44aa10
monit: add support for all monit services when checking process state (#1532) (#1578)
* 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>
(cherry picked from commit bed1dc479f)

Co-authored-by: Graham Herceg <g.a.herceg@gmail.com>
2021-01-03 11:47:54 +00:00
Felix Fontein
ecbdaca971
Backport of 5eef093e99 (#1548) 2020-12-27 15:50:21 +01:00
Felix Fontein
fa05ca3f63
Backport of 117f132213 (#1542) 2020-12-26 18:30:07 +00:00
patchback[bot]
5fa1fc65ca
YAML callback: do not remove non-ASCII Unicode from multi-line string output (#1522) (#1529)
* 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.

(cherry picked from commit 0a7ed3b019)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-22 09:59:57 +00:00
John R Barker
c4256d8674
[stable-1] AZP Bootstrap (#1505)
* AZP Bootstrap

(cherry picked from commit 33126b7267)

* AZP: Correct Cloud jobs

(cherry picked from commit 2fea31b292377e17ba5447dcb79c4b753a6fad58)

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

(cherry picked from commit dd55c3c3bb)

* Run tests on all groups.

* Reduce 2.9 coverage to decrease large number of jobs.

* Try to fix test.

* Revert "Try to fix test."

This reverts commit 23f51451c6.

* Other target selection for 2.9.

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-18 16:07:09 +00:00
Felix Fontein
a16164cb72
Prepare docker tests for AZP. (#1482)
Backport of important parts of https://github.com/ansible-collections/community.docker/pull/48 to stable-1.
2020-12-15 20:04:09 +00:00
Felix Fontein
6d4760eb20
Fix docker CI. (#1494)
Backport of ansible-collections/community.docker#50 to stable-1.
2020-12-15 20:20:43 +01:00
patchback[bot]
c167ac10e0
xfconf: add return values and expand test coverage (#1419) (#1479)
* 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>
(cherry picked from commit 8e53b3df6f)

Co-authored-by: Matthew Campbell <calvinmc@gmail.com>
2020-12-12 15:29:20 +01:00
Felix Fontein
154d8a313c
[stable-1] Fix docker_image tests (#1476)
* Backport of https://github.com/ansible-collections/community.docker/pull/47 to stable-1.

* Also fix old-options.
2020-12-12 08:33:09 +01:00
patchback[bot]
d2b1df49c1
Bugfix: Fix parsing array values from osx_defaults (#358) (#1467)
* 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>
(cherry picked from commit 1110e93c5d)

Co-authored-by: Kazufumi NOTO <noto.kazufumi@gmail.com>
2020-12-09 08:12:28 +01:00
patchback[bot]
fb3085e78d
Add ignore-2.10.txt entry analogous to ignore-2.11.txt entry. (#1465) (#1466)
(cherry picked from commit e1bf23d27d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-08 22:33:17 +01:00
patchback[bot]
ad163ed3af
Fix new sanity errors. (#1451) (#1452)
(cherry picked from commit 4566812591)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-06 10:37:17 +01:00
patchback[bot]
15257e9a64
zypper_repository: fix broken tests (#1449) (#1450)
* Change broken repository

* Re-enable integration tests

* Fix integration test

(cherry picked from commit 65d4fe2f4f)

Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-12-05 16:27:16 +01:00
patchback[bot]
7e89bc6f61
Temporarily disable zypper_repository tests. (#1445) (#1447)
(cherry picked from commit e1ca4ce1e8)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-04 08:12:29 +00:00
Felix Fontein
6470d3defe
Tidy up validate-modules:no-default-for-required-parameter and other cases (#1423) (#1429)
* 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>
(cherry picked from commit ae0d3cb090)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-12-01 21:13:54 +00:00
Felix Fontein
1dfe7963cf
Tidy up validate-modules:doc-required-mismatch (#1415) (#1417)
* 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>
(cherry picked from commit b69ea1dfd9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-28 15:41:36 +01:00
Felix Fontein
a46fb7bcae
Tidy up validate-modules:doc-choices-do-not-match-spec II: The Rebase (#1409) (#1416)
* fixed validation-modules for plugins/modules/cloud/lxc/lxc_container.py

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

* fixed validation-modules for plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_dns_record.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_dns_zone.py

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

* fixed validation-modules for plugins/modules/cloud/univention/udm_user.py

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

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

* fixed validation-modules for plugins/modules/remote_management/hpilo/hpilo_boot.py

* fixed validation-modules for plugins/modules/remote_management/ipmi/ipmi_boot.py

* fixed validation-modules for plugins/modules/remote_management/ipmi/ipmi_power.py

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

* fixed validation-modules for plugins/modules/remote_management/stacki/stacki_host.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_share.py

* Removed validate-modules:doc-choices-do-not-match-spec from ignore files

* fixed alias samba_inherit_permissions in udm_share.py

* Rolled back a couple of lines

* Removed duplicate key in docs

* Rolled back a couple of troublesome lines

* Removed no-longer necessary ignore lines

* Removed no-longer necessary ignore lines on 2.11 as well

* Removed no-longer necessary ignore lines on 2.9 this time

(cherry picked from commit cff8463882)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-28 12:38:48 +01:00
patchback[bot]
70a8ca6ac3
Tidy up validate-modules:doc-elements-mismatch (#1399) (#1407)
* 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>
(cherry picked from commit 47c456f740)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-27 08:25:08 +01:00
patchback[bot]
4953fda9a0
a new module pagerduty_user (#1025) (#1401)
* 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>
(cherry picked from commit 63fbcdb4b1)

Co-authored-by: Zainab Alsaffar <za5775@rit.edu>
2020-11-26 13:54:17 +01:00
Felix Fontein
e03431d9f6
[stable-1] Fix docker tests (#1398)
* Adjust version_added, re-place tests. (#34)

* Template docker test containers.

* Forgot to adjust test.
2020-11-26 13:21:12 +01:00
patchback[bot]
ab94b0ace0
Tidy up validate-modules nonexistent-parameter-documented (#1389) (#1400)
* fixed validation-modules for plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_share.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_host_record.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 nonexistent-parameter-documented

* Adjustments per the PR

* Removed no longer needed ignore line for udm_share.py

(cherry picked from commit 7f890c4645)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-26 13:21:01 +01:00
patchback[bot]
9e780b9d5e
Fix macports package present/active detection (#1308) (#1395)
* 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>
(cherry picked from commit d669e2b60d)

Co-authored-by: Dan Jackson <dan@djackson.org>
2020-11-26 07:15:27 +01:00
patchback[bot]
28c455d234
Tidy up validate-modules ignores for modules: cloud/profitbricks (#1387) (#1390)
* fixed validation-modules for plugins/modules/cloud/profitbricks/profitbricks_datacenter.py

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

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

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

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

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

* CI errors for 2.9

(cherry picked from commit a99d011867)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-25 12:08:48 +00:00
patchback[bot]
d5c24e67e8
proxmox: create a common base (#1331) (#1378)
* 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>
(cherry picked from commit 51a08ea398)

Co-authored-by: Tristan Le Guern <tleguern@bouledef.eu>
2020-11-24 17:56:50 +01:00
patchback[bot]
02f0abfb36
archive: Fix paramater types (#1039) (#1377)
* archive: Fix ignored sanity test parameter-list-no-elements

* Fix wrong argument type

* Add changelog

* Add integration test for a list of files

(cherry picked from commit 31443e57b1)

Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-11-24 08:33:19 +01:00
patchback[bot]
659ef811a3
Add filter dict_kv (#1264) (#1374)
- 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"
        }
    ]
}
```

(cherry picked from commit 44fd157a2b)

Co-authored-by: Stanislav German-Evtushenko <ginermail@gmail.com>
2020-11-24 06:23:37 +01:00
Felix Fontein
e29d585412
Tidy up validate-modules ignores for modules: cloud/centurylink (rebased) (#1365) (#1373)
* fixed validation-modules for plugins/modules/cloud/centurylink/clc_aa_policy.py

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/centurylink/clc_blueprint_package.py

fixed validation-modules for plugins/modules/cloud/centurylink/clc_group.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.py

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

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

* Update plugins/modules/cloud/centurylink/clc_firewall_policy.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5a567b80c6)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-24 06:07:36 +01:00
patchback[bot]
703bb465c7
Tidy up validate-modules ignores for monitoring modules (#1350) (#1372)
* fixed validation-modules for plugins/modules/monitoring/bigpanda.py

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* fixed validation-modules for plugins/modules/monitoring/datadog/datadog_monitor.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/sensu/sensu_handler.py

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

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

* fixed trailing space

* Enabling validation-modules for monitoring modules

* Added line for 2.9

* Update plugins/modules/monitoring/icinga2_host.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>

* Suggestion from PR

* oops, missed the 2.11 ignore file

* Update plugins/modules/monitoring/icinga2_host.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ce5fc7764a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-24 05:33:32 +01:00
patchback[bot]
1d290c129f
Tidy up validate-modules ignores for modules: cloud/oneandone (#1357) (#1371)
* fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_firewall_policy.py

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

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

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

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

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

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

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 88c6e6ac61)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-23 22:21:47 +01:00
patchback[bot]
d1a7423196
Tidy up validate-modules ignores for some cloud/ modules (#1354) (#1356)
* fixed validation-modules for plugins/modules/cloud/atomic/atomic_container.py

* fixed validation-modules for plugins/modules/cloud/oracle/oci_vcn.py

* fixed validation-modules for plugins/modules/cloud/heroku/heroku_collaborator.py

* fixed validation-modules for plugins/modules/cloud/docker/docker_stack.py

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

* fixed validation-modules for plugins/modules/cloud/huawei/hwc_ecs_instance.py

* fixed validation-modules for plugins/modules/cloud/huawei/hwc_vpc_port.py

* fixed validation-modules for plugins/modules/cloud/huawei/hwc_vpc_subnet.py

* fixed validation-modules for plugins/modules/cloud/ovh/ovh_ip_failover.py

* fixed validation-modules for plugins/modules/cloud/ovh/ovh_ip_loadbalancing_backend.py

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

* fixed validation-modules for plugins/modules/cloud/misc/proxmox_kvm.py

* fixed validation-modules for plugins/modules/cloud/misc/proxmox_template.py

* fixed validation-modules for plugins/modules/cloud/misc/terraform.py

* fixed validation-modules for plugins/modules/cloud/memset/memset_dns_reload.py

* fixed validation-modules for plugins/modules/cloud/memset/memset_memstore_info.py

* fixed validation-modules for plugins/modules/cloud/memset/memset_server_info.py

* fixed validation-modules for plugins/modules/cloud/memset/memset_zone_domain.py

* fixed validation-modules for plugins/modules/cloud/memset/memset_zone.py

* fixed validation-modules for plugins/modules/cloud/memset/memset_zone_record.py

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

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

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

* fixed validation-modules for plugins/modules/cloud/dimensiondata/dimensiondata_network.py

* fixed validation-modules for plugins/modules/cloud/dimensiondata/dimensiondata_vlan.py

* fixed validation-modules for plugins/modules/cloud/xenserver/xenserver_guest_info.py

* fixed validation-modules for plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py

* Tidy up validate-modules ignores for varied cloud modules

- loking at the count of ignore lines, worked from the lower numbers up

* rolled back line for docker_container, removed two extraneous for xenserver

* rolled back lins for linode in 2.9

(cherry picked from commit 3d1f9ed657)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-23 10:01:35 +01:00
patchback[bot]
bcf0060f10
Tidy up validate-modules ignores for modules: web_infrastructure/sophos_utm (#1351) (#1352)
* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_dns_host.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py

* fixed validation-modules for plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py

* Enabling validation-modules for web_infrastructure/sophos_utm modules

* Rolled back utm_network_interface_address.py for 2.9 sake

(cherry picked from commit 4c88a8edc0)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-22 12:34:29 +01:00
patchback[bot]
07e35f7505
feat(pkgin): add support for installation of full versioned package names (#1256) (#1349)
* * pkgin query_package(..) understands now also package name with version (my-package-1.2nb123456). * pkgin query_package(..) will distinct between not-installed and not-found packages. * pkgin install_package(..) fails with proper error if a non-existing package is attempted to be installed.

* fixup ansibot comments

* add changelog fragment

* add example

* use more pythonic condition

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

* remove extra dot between description and link to PR

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

* fix file extension of changelog fragment

* add pkgin unit tests for query_package function

* fix pep8 issues

* use enum Flag instead mix of strings, bools and None as return value

* use IntEnum instead Flag to support Python versions >= 2.6

* fix pep8 and pylint errors

* use regular class instead enum to avoid issues with older Python releases

* fix comment

* remove the combined package state since without an IntFlag or Flag the usage of it would require to use logical operators

Co-authored-by: Erik van Nooijen <eric.vannooijen@tomtom.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit ece0202507)

Co-authored-by: Martin Migasiewicz <616250+martinm82@users.noreply.github.com>
2020-11-21 21:41:09 +01:00
patchback[bot]
9279e4532d
Add ability to resize existing partition (#773) (#1348)
* Add ability to resize existing partition

* Add 'resize' flag to support backwards compatability, and allow partition reduction

* Add changelog fragment for #773

* Update changelogs/fragments/773-resize-partition.yml

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

* Update plugins/modules/system/parted.py

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

* Update resize flag with PR review comments

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

* Update plugins/modules/system/parted.py

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

* Update default on resize flag in parted.py

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit 8f99f9cb1c)

Co-authored-by: jake2184 <jake2184@users.noreply.github.com>
2020-11-21 21:38:39 +01:00
patchback[bot]
7713202d9b
Adding module_utils/module_helper.py + big revamp in xfconf.py to use it (#1322) (#1336)
* Big revamp in xfconf.py

- added plugin/module_utils/module_helper.py
  - scaffold class for writing modules, beyond standard AnsibleModule
  - automatic capture of exceptions
  - easier dependency testing
  - StateMixin to easily handle different behaviours for 'state' param
  - CmdMixin to easily run external commands
- adapted test_xfconf.py
  - the args for run_command are now lists instead of a string
  - value and previous_value were not being tested before (because xfconf wasn't filling results - see below)
  - added more tests: setting value to previous_value, getting non-existent property
- rewritten xfconf module, keeping the same results
  - original module posted results as ansible_facts, this version still does it for compatibility, but also adds to the module result

* Added suggestions from the PR

* Added russoz as maintainer for the module_utils/module_helper.py file

* Formatting using printf-style requires special treatment

Strings not containing substitution tokens must work as well.

* Tidied up variables in module definition

* Tests with ArgFormat and DependencyCtxMgr

* pytest parameters must be in the same order, it seems

* improved testing for the DependencyCtxMgr

* fixed test for older pythons

* Moved changed property to improve readability

* Added testcase for state: absent and adjusted xfconf after it

* Fixed param name environ_update in run_command()

* added changelog fragment

* fixed tests after run_command param change

(cherry picked from commit e3fcc7de2a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-20 12:43:23 +01:00
patchback[bot]
2fe6a34e3f
Fix hashi_vault lookup approle authentication (#1138) (#1315)
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>
(cherry picked from commit 6cec8759d0)

Co-authored-by: Jonathan Piron <jonathan@piron.at>
2020-11-16 16:40:54 +00:00
patchback[bot]
ca97eb6f93
Xfconf tests (#1305) (#1313)
* Adjusted case in class names - transparent to users

* Adjustments to module code:

- No need to try/except everything, in fact it complicated debugging
- Replaced second call to xfconf.get() with xfconf.previous_value

* the actual test

* removed extraneous empty lines

* added changelog fragment

* rolled back removing the try/except around the main execution

* Update changelogs/fragments/1305-added-xfconf-tests.yaml

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

* Update plugins/modules/system/xfconf.py

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

* Removed extraneous import

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f4c63ede7f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-16 12:49:38 +01:00
patchback[bot]
b529955c07
Add support for HashiCorp Vault JWT auth (#1213) (#1309)
* 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>
(cherry picked from commit 64c6f20b55)

Co-authored-by: Erik Godding Boye <egboye@gmail.com>
2020-11-16 08:23:44 +01:00
patchback[bot]
d5d24302b6
Add hetzner_failover_ip* tests (#1301) (#1310)
* Add tests for hetzner_failover_ip_info.

* Add basic tests for hetzner_failover_ip.

(cherry picked from commit 41550b5205)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-16 08:17:55 +01:00
patchback[bot]
51a3594494
Add docker build output to task result (#805) (#1306)
The build output is only added during failures, but its useful to
have this available during normal task execution as well.

(cherry picked from commit 33b8d1c57e)

Co-authored-by: Raghu Siddarth Udiyar <raghusiddarth@gmail.com>
2020-11-15 17:08:43 +01:00
patchback[bot]
490495937b
Fix iso_extract tests for OpenSuSE (#1296) (#1298)
(cherry picked from commit 07fa7ea409)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-13 21:20:20 +00:00
patchback[bot]
8cd126be26
Try to fix zypper tests. (#1294) (#1295)
(cherry picked from commit 37c1453601)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-13 20:18:03 +01:00
patchback[bot]
d2e259da4a
Tidy up validate-modules ignores for packaging modules (#1289) (#1291)
* fixed validation-modules for plugins/modules/packaging/language/bower.py

(cherry picked from commit deddce02fa)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-13 14:04:53 +01:00