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

345 commits

Author SHA1 Message Date
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
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
Alexei Znamensky
ae0d3cb090
Tidy up validate-modules:no-default-for-required-parameter and other cases (#1423)
* Fixed validate-modules:mutually_exclusive-unknown for plugins/modules/packaging/os/redhat_subscription.py

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

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

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

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

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

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

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

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

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

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

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

* fixed validation-modules for plugins/modules/remote_management/wakeonlan.py

* added types to plugins/modules/remote_management/stacki/stacki_host.py but still cannot remove ignore line

* added a couple of FIXME comments

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

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

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

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

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

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

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

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

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

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

* fixed validation-modules for plugins/modules/cloud/ovirt/ovirt_external_provider_facts.py

* Tidy up validate-modules ignores no-default-for-required-parameter + couple of other cases

* Added changelog frag

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

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

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

* Typos and small fixes

* fixed validation-modules for plugins/modules/net_tools/ldap/ldap_passwd.py

* Typos and small fixes, part 2

* Fixes from PR comments

* Update plugins/modules/cloud/profitbricks/profitbricks_nic.py

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

* Rolled back the mutually-exclusive-unknown in redhat_subscription

* Update changelogs/fragments/1423-valmod_multiple_cases.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-01 21:28:40 +01:00
Ox
b8794c35e8
Feat: nmcli - Add infiniband and routes support (#1260)
* Feat: nmcli - Add infiniband basic support

Add infiniband basic support, using same pattern than ethernet.

* Fix: nmcli - Correct line length

Auto tests report line 1002 is too long. Correcting.

* Update plugins/modules/net_tools/nmcli.py

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

* Fix: nmcli - Add routes support

Adding ipv4.routes support
Adding ipv4.never-default support

* Fix: nmcli - Add 1260 changelog fragment

* Update plugins/modules/net_tools/nmcli.py

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

* Update changelogs/fragments/1260-nmcli-ib-routes.yaml

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

* Fix: nmcli - Fix routes4 and never-default

Ensure ipv4.routes and ipv4.nerver-default are properly implemented.

* Fix: nmcli - Fix routes4 documentation

Bad format, was str, should be list with elements str

* Fix: nmcli - Add missing version_added

* Fix: nmcli - Fix pylint errors

* Feat: nmcli - Use regex for ipv4.routes

* Fix: nmcli - Filter None routes4

* Feat: nmcli - Add route_metric4 and set mutual_exclu

* Fix: nmcli - Fix E231

* Fox: nmcli - Remove ethernet MTU change for Infiniband

* Fix: nmcli - Update changelog fragment

* Fix: nmcli - Update test ipv6

* Debug: nmcli - Check test output

* Fix: nmcli - Set never_default4 to no by default

* Fix: nmcli - Fix bridge slave test

* Fix: nmcli - Add regex for metrics

* Fix: nmcli - Update release version

* Fix: nmcli - E501

* Fix: nmcli - E502 E128

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-01 20:39:56 +01:00
Alexei Znamensky
b69ea1dfd9
Tidy up validate-modules:doc-required-mismatch (#1415)
* Tidy up validate-modules ignores doc-required-mismatch

* Tidy up validate-modules ignores doc-required-mismatch - update on 2.11

* Fixed chengelog frag

* rolledback removal of parameter from cloud/smartos/vmadm.py

* removed changelog frag for the rollback

* Update plugins/modules/cloud/smartos/vmadm.py

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

* Revert "removed changelog frag for the rollback"

This reverts commit 56a02ead3b.

* suggestion from PR

* yet another PR suggestion

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-28 14:06:28 +01:00
Alexei Znamensky
cff8463882
Tidy up validate-modules:doc-choices-do-not-match-spec II: The Rebase (#1409)
* 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
2020-11-27 21:16:47 +01:00
Alexei Znamensky
47c456f740
Tidy up validate-modules:doc-elements-mismatch (#1399)
* fixed validation-modules for plugins/modules/cloud/xenserver/xenserver_guest.py

* fixed validation-modules for plugins/modules/identity/ipa/ipa_hbacrule.py

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

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

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

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

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

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

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

* fixed validation-modules for plugins/modules/remote_management/redfish/redfish_config.py

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

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

* Tidy up validate-modules ignores doc-elements-mismatch

* Added changelog frag for utm_proxy_exception

* Update changelogs/fragments/1399-fixed-wrong-elements-type.yaml

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

* Fixed couple of missing docs

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-27 08:01:02 +01:00
Felix Fontein
1db167b12a
Bump version to 2.0.0 (#1369)
* Bump version to 2.0.0.

* Remove deprecated 2.0.0 features.

* Test for failure.

* Fix cache plugin unit tests.

* Accept direct import only for Ansible 2.9.
2020-11-26 14:26:36 +01:00
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
Alexei Znamensky
7f890c4645
Tidy up validate-modules nonexistent-parameter-documented (#1389)
* 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
2020-11-26 12:27:37 +01:00
Dan Jackson
d669e2b60d
Fix macports package present/active detection (#1308)
* Fix typo in redhat_subscription testcase

* Fix macports state=present matching against the wrong package name

Previous implementation returned true if the desired package name occurred anywhere in
the list of all installed packages. For example as a substring of another package name,
or even as a substring of a variant name for a different package.

Instead:

- request macports only list installed packages matching the desired package name, instead of all installed packages.
  - Note `port` exits with 0 regardless of whether any packages match the requested name.
- pass `-q` flag: "Do not print the header line. This is useful when parsing the output of port installed in scripts for further processing."
- eliminate `use_unsafe_shell=True` by searching stdout contents natively in python
instead of using `grep`. This has the added benefit of eliminating any potential
misinterpretation of characters in the package name as regex special characters.

If there are zero matching installed packages, `out` is empty.
If there are one or more matches (due to multiple installed versions), the output format
is: ec8a2bc682/src/port/port.tcl (L3320-L3323)

Notably, two leading spaces, the package name, a space, and then other information.
According to blame via github, those lines haven't changed in 11 years.

* Update macports state=active to eliminate use_unsafe_shell

Similar to previous commit (for macports state=present):

- pass `-q` flag: "Do not print the header line. This is useful when parsing the output of port installed in scripts for further processing."
- search stdout contents natively in python instead of using `grep`.
- added parentheses to search string to eliminate false positives if the package name
or variants contain the word `active`. Still could fail if they contain `(active)`, but
that's less likely

If there are zero matching installed packages, `out` is empty.
If there are one or more matches (due to multiple installed versions), the output format
is: ec8a2bc682/src/port/port.tcl (L3320-L3323)

For "state=active", we're looking for a line that contains `(active)` in the output.

* Basic test case of query_port for present and active

* Attempt to fix lint errors in test

* Different mock module creation, changed test cases indentation/spacing

- picked the wrong mock code to cargo-cult. Thanks to felixfontein for this suggestion
- 4 space indentation on continuation line. I thought I had that originally, but it looks like my editor sabotaged me with mixed tabs/spaces
- Remove leading newline on multi-line test cases. I don't think it would make a difference, but I'd read up on how the python syntax works and want to more accurately represent macports output.

fingers crossed this addresses the known build errors

* Add changelog fragment

* Update tests/unit/plugins/modules/packaging/os/test_macports.py

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

* Update changelogs/fragments/1307-macports-fix-status-check.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-26 06:59:32 +01:00
Alexei Znamensky
a99d011867
Tidy up validate-modules ignores for modules: cloud/profitbricks (#1387)
* 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
2020-11-25 12:03:12 +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
Felix Fontein
c52839c601
Remove deprecated google modules (#1370)
* Remove deprecated google modules.

* Remove ignore.txt entries.
2020-11-24 06:34:48 +01:00
Felix Fontein
eab9a43d2e
Remove hetzner content. (#1368) 2020-11-24 06:34:23 +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
Alexei Znamensky
ce5fc7764a
Tidy up validate-modules ignores for monitoring modules (#1350)
* 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>
2020-11-23 22:07:03 +01:00