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

502 commits

Author SHA1 Message Date
Alexei Znamensky
0bd4b3cbc9
changed make parameter from --question to -q (#1574)
* changed make parameter from --question to -q

* changelog fragment

* Update changelogs/fragments/1574-make-question.yaml

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 13:35:46 +01:00
Eike Waldt
491b622041
fix passwordstore.py to be compatible with gopass versions (#1493)
* Be compatible to latest gopass versions.
`gopass show` is deprecated.

* add changelog fragment

* Update changelogs/fragments/1493-fix_passwordstore.py_to_be_compatible_with_gopass_versions.yml

Co-authored-by: Eike Waldt <git@yog.wtf>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 11:48:35 +01:00
Alexei Znamensky
325a19d88a
pamd - fixed bug (#1538)
* Fixed bug

- The module was searching back (and forward, in the ``after`` state) for lines that were not comments, assuming it would be a valid rule or an include.

* remove the line, make yamllint happy

* Update changelogs/fragments/1394-pamd-removing-comments.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 11:38:04 +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
momcilo78
fd741ed663
Remove bridge-slave from list of IP based connections (#1517)
* Removed the bridge-slave from list of ip based connections since nmcli does not accept IP options for bridge-slave connections.

* Update changelogs/fragments/1517-bridge-slave-from-list-of-ip-based-connections.yml

Thanks for the tip.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-03 11:37:48 +01:00
Johannes Petz
df9f0741b5
Legacy Python certificate validation fixed (#470)
* Legacy Python certificate validation fixed

* added changelog fragment

* removed blank line for sanity checks

* Update changelogs/fragments/470-spacewalk-legacy-python-certificate-validation.yaml

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

* Update changelogs/fragments/470-spacewalk-legacy-python-certificate-validation.yaml

Co-authored-by: jpe <petz.johannes@afb.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-03 11:15:51 +01:00
♫ Christian Krause ♫
777d36b9fb
pam_limits: adds both check and diff modes (#830)
* pam_limits: adds check mode

fixes #827

* pam_limits: adds diff mode

fixes #828
2021-01-03 11:11:06 +01:00
Abhijeet Kasurde
ce83bde742
syslogger - update syslog.openlog API call for older Python (#1572)
* syslogger - update syslog.openlog API call for older Python

Fixes: #953

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

* Update changelogs/fragments/953_syslogger.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-02 20:40:27 +01:00
Abhijeet Kasurde
1c53894920
pam_limits: add support nice and priority limits (#654) 2021-01-01 16:15:02 +05:30
Jianhao Tan
ed813176ce
updated deprecated homebrew cask commands (#1481)
* updated deprecated homebrew cask commands

* added methods for brew version deprecation check

* added comments and changelog fragment

* added unit test for version comparison

* switch to use disutils LooseVersion for version comparison

* updated changelog message and minor refactor for building brew command based on version

* added caching logic for retrieval of brew version and updated PR changelog yaml

* Update changelogs/fragments/1481-deprecated-brew-cask-command.yaml

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

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

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

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

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

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

* switch to use subprocess.check_output instead of subprocess.run

* replace subprocess with run_command

* removed unused subprocess import

* removed error handling logic to depend on check_rc=True instead

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-31 19:13:21 +01:00
Felix Fontein
9f71073d37
Remove ansible.netcommon dependency. (#1561) 2020-12-30 10:37:23 +01:00
Abhijeet Kasurde
6c88b69d6f
launchd: Handle deprecated APIs in plistlib (#1554)
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-30 11:25:32 +05:30
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
Abhijeet Kasurde
818cafc580
sendgrid: Update docs (#1557)
* Updated docs
* Warn user about required Sendgrid Python library version i.e <=1.6.22

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-29 09:39:28 +01:00
enothen
eb2cb56a55
Added code to support command groups inside sudo rules (#1556)
* Added code to support command groups inside sudo rules

* Added command groups to documentation of ipa_sudorule.py

* Update changelogs/fragments/1555-ipa-sudorule-add-commandgroup.yml

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

* Update plugins/modules/identity/ipa/ipa_sudorule.py

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

Co-authored-by: Eric Nothen <eric.nothen@payback.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-29 09:36:45 +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
James Harr
39bf187a25
Proxmox - add features flag (#1413)
* Add 'features' option to proxmox LXC

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

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

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

* Apply suggestions from code review

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update proxmox.py

Working fix

* Update changelogs/fragments/1413-proxmox-features.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-12-27 14:07:10 +01:00
Alexei Znamensky
5016f402a5
jira - some improvements to the module (#1536)
* Some improvements to the module

- Fixed examples documentation ().
- Module no longer incorrectly reports change for information gathering operations ().
- Replaced custom parameter validation with ``required_if`` ().
- Added the traceback output to ``fail_json()`` calls deriving from exceptions ().

* added PR URL to changelof frag

* Update changelogs/fragments/jira_improvements.yaml

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

* mentioned issue required for transition in chnagelog

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-27 13:56:48 +01:00
cdbunch72
58a9287689
Add support for keyed_groups, groups, and compose options to linode i… (#1453)
* Add support for keyed_groups, groups, and compose options to linode inventory
plugin

* Changed instance,label to instance.label
various lint fixes around spacing

* Change self._strict to a local variable as it's no longer needed in other
methods

* Modified DESCRIPTION to add a version_added property to each of the new options.

* Add Changelog fragment

* Minor changes to the changelog fragment

* Replace 'the standard' with 'support for'

* Update description to note that the inventory groups are created by default
from the group attribute not tags and that the group attribute has been
depricated by Linode.

* Remove trailing space in description

* Add period to changelog fragment

Co-authored-by: Clinton Bunch <cdbunch@zeus.int.zentaur.org>
2020-12-27 13:53:41 +01:00
Abhijeet Kasurde
da2a629919
gitlab_project: Add a parameter to specify Git LFS (#1540)
* Update docs
* Update example
* Refactor code
* Add a parameter ``lfs_enabled`` to specify Git Large file systems

Fixes: #1506

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-27 10:55:06 +01:00
neatherweb
c63f3f9956
nios_member: fix nios api member_normalize error with python 3 (#1527)
* nios_member: fix nios api member_normalize error with python 3

Force a copy of the key to allow change during iteration.

* Update - add changelog fragment

* Update - add changelog fragment

* Update changelogs/fragments/1527-fix-nios-api-member-normalize.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-22 23:57:50 +01:00
Alexei Znamensky
6c3a5cf9b1
Added file feature (#1525)
* Added file feature

* Update plugins/modules/source_control/git_config.py

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

* Update plugins/modules/source_control/git_config.py

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

* Update changelogs/fragments/1021-git_config-custom-file.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-22 16:17:24 +01:00
Alexei Znamensky
1faf8ef08b
Ensured `changed returns False`. (#1530)
* Ensured ``changed`` returns ``False``.

- Added small improvement on the ``_load_scope()`` method.

* yamllint caught it

* Rephrased changelog fragment
2020-12-22 15:56:46 +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
Alexei Znamensky
5ee5c004b4
Some adjustments/improvements (#1516)
* Some adjustments/improvements

- Added doc details for parameters ``description`` and ``objectClass``
- Added type details to argument_spec of parameters ``description`` and ``objectClass``.
- Removed unused import
- Simplified logic of ``LdapEntry._load_attrs()``
- Replaced parameter validation test with ``required_if``.

* Added changelog frag
2020-12-21 13:56:10 +01:00
Alexei Znamensky
e9dafb3467
Raises error for non-existent repo path (#1512)
* Raises error for non-existent repo path, requires Ansible 2.10.4 or higher.

* Changes from suggestions in the PR

* Suggestion from PR

* Update changelogs/fragments/630-git_config-handling-invalid-dir.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-21 11:08:48 +00:00
Zac Medico
47b940fc63
saltstack: fix put_file to preserve checksum (#1472)
* saltstack: fix put_file to preserve checksum

Use hashutil.base64_decodefile to ensure that the file checksum
is preserved, since file.write only supports text files.

Signed-off-by: Zac Medico <zmedico@gmail.com>

* Update changelogs/fragments/1472-saltstack-fix-put_file-to-preserve-checksum.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-19 18:11:41 +01:00
Abhijeet Kasurde
eb79c14e9c
jira: Provide useful error message to user (#1509)
* Code refactor
* Handle exception
* Provide useful error message to user when exception is raised

Fixes: #1504

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-19 17:43:41 +01:00
Abhijeet Kasurde
4c14df6d88
bitbucket_pipeline_variable: Change pagination logic (#1498)
Bitbucket's pagination for pipeline variables is flawed.
Refactor bitbucket_pipeline_variable code to correct this logic.

Fixes: #1425

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-17 07:57:07 +01:00
Felix Fontein
d495d3969b Fix changelog fragment. 2020-12-16 21:39:55 +01:00
Dag Wieers
c3ef9bf668
cobbler: Add Python 3 support (#645) 2020-12-16 18:07:31 +05:30
Pablo Escobar Lopez
496be77a2b
fix so module nios_host_record can remove aliases (#1470)
* fix for https://github.com/ansible-collections/community.general/issues/1335

* added changelog fragment

* Update changelogs/fragments/nios_host_record-fix-aliases-removal.yml

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

* extend changelog to specify CNAMES

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-14 22:31:05 +01:00
Abhijeet Kasurde
f37eb12580
keycloak: Provide meaningful error message to user (#1487)
When user provides auth URL value which does not startswith
http or https protocol schema, provide a meaningful error message
stating so.

Fixes: #331

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-14 22:29:33 +01:00
Bill Dodd
51dfc1f288
Fix property name typo in get_memory_inventory() (#1484)
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-14 09:45:45 +05:30
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
Dr. Nick
68dec29df3
rhn_register: added force option to allow forced registering (#1454) (#1455)
* rhn_register: added force option to allow forced registering (#1454)

* rhn_register: added disable=bad-option-value to pylint disables for backwards compat

* rhn_register: including version_added for force parameter

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

* [1455] added changelog fragment

* removed unnecessary pylint disables

* Updated changelogs/fragments/1455-rhn-register-force.yml to have issue # instead of PR #

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-12-08 13:12:04 +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
Bruno Travouillon
8cedec381f
nmcli: add connection.zone parameter (#1426) 2020-12-05 16:18:29 +01:00
Vladimir Botka
0f88c71f59
Added filter plugin lists_mergeby. Fix #249 (#604) 2020-12-04 09:32:42 -05:00
Jean-Pierre Matsumoto
b80854ff50
Fix #1435: mas : Fix "invalid literal" when no app (#1436)
* Fix #1435: mas : Fix "invalid literal" when no app

* Add changelog fragment

* Update changelogs/fragments/1436-mas-fix-no-app-installed.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-04 09:17:42 +01:00
Abhijeet Kasurde
5319437bc2
json_query: Handle AnsibleUnicode, AnsibleUnsafeText (#1434)
jmespath library does not undestand custom string types
such as AnsibleUnicode, and AnsibleUnsafeText.
So user need to use ``to_json | from_json`` filter while using
functions like ``starts_with`` and ``contains`` etc.
This hack will allow user to get rid of this filter.

Fixes: #320

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-04 07:24:42 +01:00
Tristan Le Guern
d981f388fb
Proxmox doc fragments (#1404)
* proxmox{,_kvm,_template}: import auth doc fragment

* proxmox{,_kvm}: new common doc_fragment

Share the parameters `pool`, `vmid` and `node`.

* proxmox_template: sync node description

* changelog_framgent
2020-12-02 16:08:07 +01:00
Martin
70ba401602
[icinga2_host.py] Actually return codes instead of data (#335)
* [icinga2_host.py] Actually return codes instead of data

Currently the module tries to return the `data`, which can result in a blank message instead of the code being shown.

```
 "msg": "bad return code creating host: "
```

* add changelog fragment

* Update changelogs/fragments/335-icinga2_host-return-error-code.yaml

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

* return code and data on fail

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

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Deric Crago <deric.crago@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-02 09:38:56 +03:00
Jeff Geerling
1d8530aff1
Remove and redirect oc module. (#866)
* Remove and redirect oc module.

* Add changelog fragment for move of oc connection plugin to OKD collection.

* Update BOTMETA as well.

* Newer changelog fragment format.

* Update changelogs/fragments/oc-migration-removal.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-01 22:20:02 +01:00
Amin Vakil
dc60e71fd5
Add no-optional flag to npm (#1428)
* Add no-optional flag to npm

* Add changelog

* Oops

* Add no_optional to Npm class
2020-12-01 21:13:15 +00: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
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
peter
382be570ec
Apache2 module: Add another shib module identifier (#1383)
* Add another shib module identifier to apache2 module (#1379)

* Update changelogs/fragments/1383-apache2-module-amend-shib-workaround.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-26 07:26:40 +01:00
elreydetoda
cc7d0f7670
adding fix for packet_net.py (#891)
* adding fix for packet_net.py

* adding changelog fragment

* squashing to fix cascading notifications

Apply suggestions from code review

thanks felixfontein for working with me!

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

adding suggestions from code review (accessing dict in a better way)

modified packet_net fragment to accurate description

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-26 07:08:15 +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
Felix Fontein
dbae7da6bc
Improve docker, hetzner and postgresql migration (#1382)
* Improve fragment formatting.

* Remove docker fragments.

* Remove postgresql fragments.
2020-11-25 08:04:50 +01:00
Albert Vaca Cintora
e73451f09e
Datadog: Mark notification_message as no_log (#1338)
* Datadog: Mark notification_message as no_log

This message field is often used to page people or teams inside
an organization when a monitor goes off, by using `@` mentions.
If Ansible is configured to use Datadog's callback plugin [1], an
unwanted interaction would happen: 
When a monitor fails to create, the callback sends an error event
to Datadog which contains all the task's loggable fields in it.
If the message field contains `@` mentions, this event would page
the people on them.

[1] https://github.com/DataDog/ansible-datadog-callback

* Add changelog fragment

* Update changelogs/fragments/1338-datadog-mark-notification_message-no_log.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-25 07:25:00 +01:00
morph027
1f7649fcd7
Add Cloud Init variables for Proxmox_KVM module (#797)
* Add Cloud Init variables for Proxmox_KVM module

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>

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

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

* apply yaml syntax to all examples

* remove trailing whitespaces

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-11-24 20:32:25 +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
bratw0rst
28ac4b79e2
Added umask option to passwordstore lookup plugin. (#1156)
* Added umask option to passwordstore lookup plugin.

* Added umask documentation and changelog fragment.

* Added default values to paramvals within the run method.

* removed blank lines (PEP8)

* Update changelogs/fragments/lookup-passwordstore-umask.yml

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

* Update plugins/lookup/passwordstore.py

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

* Update changelogs/fragments/lookup-passwordstore-umask.yml

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

* passwordstore lookup plugin: changelog fragment update

* passing environment variables to subprocess.Popen()

* Update plugins/lookup/passwordstore.py

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

* rm trailing whitespace

* Don't force default umask in the plugin, pass will take care of this.

* remove default from the documentation string

* remove trailing whitespaces

* prevent KeyErrors when checking if key exits in paramvals.

* Update plugins/lookup/passwordstore.py

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

* Fix for TypeError

* revert back to old directory test

Co-authored-by: bratw0rst <c.chmiel@speakup.nl>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-24 08:05:59 +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
Larry
00c2ec062d
Added Arguments for Facter module (#768)
* Added arguments and Documentation

* fixing sanity checks

* Added documentation

* attempting doc fix

* removed elements from doc

* updated elements

* Update plugins/modules/system/facter.py

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

* Update plugins/modules/system/facter.py

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

* Create 768-factor.yml

added change log

* Rename 768-factor.yml to 768-facter.yml

* Update changelogs/fragments/768-facter.yml

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

* Updated Doc, simplified arg add

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-23 18:59:09 +01:00
Felix Fontein
3d66ed3ae3
Remove deprecated modules and plugins. (#1347)
* Remove deprecated modules and plugins.

* Clean up BOTMETA.

* Re-add _netapp doc fragment and module utils. This is needed by the remaining na_ontap_gather_facts module scheduled for removal in 3.0.0.
2020-11-23 14:10:18 +01:00
Felix Fontein
5fc17ff022
Remove deprecated redirects. (#1346) 2020-11-23 13:42:46 +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
Alexey Masolov
5c768dc6f1
[2.10] Fix omapi_host on python3 (#788) 2020-11-22 12:21:18 +01:00
Martin Migasiewicz
ece0202507
feat(pkgin): add support for installation of full versioned package names (#1256)
* * 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>
2020-11-21 21:20:27 +01:00
jake2184
8f99f9cb1c
Add ability to resize existing partition (#773)
* 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>
2020-11-21 21:18:42 +01:00
Mark Chappell
0a28a0c8b0
ipa: Update non-secret fields matching '*pass*' with no_log=False (#1339)
* ipa: Update non-secret fields matching '*pass*' with no_log=False

* Add changelog fragment

* Update changelogs/fragments/1339-ip-no_log-nonsecret.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-21 17:25:49 +01:00
Amin Vakil
6c94ab7c6b
Change bugfixes to breaking_changes in 1083 changelog (#1341) 2020-11-20 20:43:07 +01:00
Alexei Znamensky
e3fcc7de2a
Adding module_utils/module_helper.py + big revamp in xfconf.py to use it (#1322)
* 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
2020-11-20 11:27:53 +01:00
TGuimbert
2be2d30f3b
Add --non-interactive argurment to Flatpak (#1246)
* Add noninteractive argument

* Correct pep8 errors

* Add changelog fragment

* Update changelogs/fragments/1246-flatpak-use-non-interactive-argument.yaml

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

Co-authored-by: Thibault GUIMBERT <tguimbert@leni.fr>
Co-authored-by: Thibault Guimbert <tguimbert@localhost.localdomain>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-19 21:10:54 +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
Vinícius Zavam
d95910963b
[pkgng] present the 'ignore_osver' option to pkg (#1243)
* [pkgng] introduce IGNORE_OSVERSION to pkgng

* [pkgng] add small description about IGNORE_OSVERSION
  - source: https://www.freebsd.org/cgi/man.cgi?query=pkg.conf&sektion=5

* [pkgng] initialize default value of 'ignoreosver' as False

* [pkgng] replace double quotes by single ones, when setting 'ignoreosver'

* [pkgng] do not make 'ignoreosver' a required option for this module

* [pkgng] mode the point we set IGNORE_OSVER into install_packages()

* [pkgng] restrict the use of 'ignoreosver' to pkg versions >= 1.11
  - https://github.com/freebsd/pkg/blob/release-1.11/NEWS#L51

* [pkgng] value of 'ignoreosver' passed to install_packages

  - install_packages() contains a taks to update local pkgs cache;
  - should that update be triggered, AND 'ignoreosver' is set to True,
    we must change existing "batch_var" and add the IGNORE_OSVERSION=yes
    to the environment;
  - there pkg running on STABLE or CURRENT FreeBSD machines will have a
    chance to proceed with the "update" action

* [pkgng] create option description for "ignoreosver" and its defaults

* [pkgng] make sure we do use IGNORE_OSVERSION when action is "update"

* [pkgng] add more information on how 'ignoreosver' works

Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>

* [pkgng] create changelog fragment for PR #1243

Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>

* [pkgng] add information about when we start to offer 'ignoreosver'

Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>

* [pkgng] rename 'ignoreosver' -> 'ignore_osver'

Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>

* [pkgng] remove unnecessary backslashes for install_packages() call

Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>

* [pkgng] fix changelog fragment's formating

Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>
2020-11-17 07:17:16 +01:00
John Weber
9787e8a6bf
maven_artifact: Adjust path for time stamped SNAPSHOT versions (#713)
* Adjust path for time stamped SNAPSHOT versions

Test the version string for the timestamp SNAPSHOT pattern. If it matches, substitute the SNAPSHOT version in the artifact path rather than the timestamped version string.

* Add changelog fragment for PR 713

* Update changelogs/fragments/713-maven-timestamp-snapshot.yml

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

* C
Fix problems reported by shippable
Fix problems reported by pull request checks

* Resolve additional shipping errors

Co-authored-by: jweber <jweber@seastreet.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-16 21:41:55 +01:00
Tristan Le Guern
5cc900cfdb
proxmox*: add support for API tokens (#1206)
Provides an alternative authentication method to the password.
The token validity is only tested during the first request after the
instantiation of `ProxmoxAPI`, thus the presence of a call to
`proxmox.version.get()` in `proxmox_template`.

Example:

    - name: Ensure test-vm is created
      proxmox_kvm:
        api_host: prx-test
        api_user: tleguern@pve
        api_token_id: api-pve-test
        api_token_secret: fad3db3d-b335-ee15-9fb0-ea1bf70128db
        node: prx-test-01
        name: test-vm
	...
2020-11-16 21:24:11 +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
Alexei Znamensky
f4c63ede7f
Xfconf tests (#1305)
* 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>
2020-11-16 11:27:00 +00: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
thetuxkeeper
726aa5ecf7
proxmox_kvm: pool parameter not supported by qemu/<vmid>/config API endpoint (#1258)
* proxmox_kvm: pool parameter not supported by API on update

* added changelog fragment

* format fix and pull request link added

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-14 11:52:01 +01:00
Felix Fontein
0109310aa2 Fix gcp_storage_file lookup plugin (#1284). 2020-11-13 16:01:10 -05:00
Felix Fontein
75fd32ca55 Fix the linode inventory plugin, and the redis and memcached cache plugins (#1281, #1282, #1283). 2020-11-13 16:01:10 -05:00
rmcintosh
637eaa15de
Add support for StackScripts to Linode v4 module (#1270)
* Add support for StackScripts to Linode v4 module

* Apply suggestions from code review

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

* add changelog fragment

* Add stackscript to example

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-13 03:21:56 -08:00
Rafael Sadowski
ef49950b96
Add OpenBSD pkg_add(1) snapshot support (#965)
* Add OpenBSD pkg_add(1) snapshot support

* Fix documentation syntax

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

* Bump version_added

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

* zap one trailing whitespace

The first trailing whitespace is necessary otherwise we cal pkg_add(1)
with '-Im-Dsnap' which is invalid.

* Check build flag in package_present()

* zap one trailing whitespace

The first trailing whitespace is necessary otherwise we cal pkg_add(1)
with '-Im-Dsnap' which is invalid.

* check snapshot/build combination a little earlier

* Update "Force" documentation

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

* Bump version tgo 1.3.0

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

* Add a changelog fragment.

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

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

* Add: mutually exclusiv hint for "build" and add mutually_exclusive

* Re-add build=%s check

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-11-13 06:33:13 +01:00
Alexei Znamensky
7db2ce5be3
added description parameter to create request (#1196)
* added description parameter to create request

* added changelog fragment

* Update changelogs/fragments/1196-use_description-in-gitlab-group-creation.yml

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

* added integration test for description in gitlab_group

* per request in the PR, creating separate task for the description issue in the integration test

* replaced deprecated param names with new names

* description should be optional to keep backward compatibility

* Update plugins/modules/source_control/gitlab/gitlab_group.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-11 13:33:38 +01:00
Felix Fontein
d9e734d662
Add a warning when ansible_key label is not found on a secret. (#31) (#1249)
* add a warning when ansible_label is not found on a secret. addresses #30

* Update changelogs/fragments/31-docker-secret.yml

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

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

Backported from 22ba76b4e9
2020-11-09 08:42:59 +01:00
JuddTracy-DAS
4fe87879ff
Fix idempotent issue when using lvol with %VG or %PVS size options and VG is fully allocated (#229)
* Fix rounding issues with percentages

Changed the behavior when using %VG or %PVS to make the size_requested an even modulus with the VGs physical extents by rounding down.  This makes the usage of %VG or $PVE idempotent when the calculated size_requested does not end on a physical extent boundary.

* Added ansible changelog fragment.

* Forgot the module in the changelog fragment.

* Added URL to the PR to the changelog fragment.

* Update changelogs/fragments/229_lvol_percentage_fix.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-09 08:39:34 +01:00
Alexei Znamensky
42999867b4
Changed parameter name, added aliases for compatibility. (#1244)
* Changed parameter name, added aliases for compatibility.

* added changelog fragment

* Update changelogs/fragments/1244-renamed-parameter.yaml

Added markup around parameters names.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-08 23:04:57 +01:00
montag451
9e51469e01
lxc_container: fix the type of the 'container_config' parameter (#216)
* lxc_container: fix the type of the 'container_config' parameter

* lxc_container: specify the type of elements in 'container_config'

* lxc_container: improve the documentation of the container_config option

* lxc_container: add changelogs fragment for PR 216

* lxc_container: update changelogs fragment for PR 216

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-08 13:10:19 +01:00
John Westcott IV
6441814f8b
odbc: adding parameter to disable auto-commit (#1137) (#1139)
* Adding parameter to disable auto-commit (#1137)

* Update plugins/modules/database/misc/odbc.py

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

* Update plugins/modules/database/misc/odbc.py

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

* Update plugins/modules/database/misc/odbc.py

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

* Update plugins/modules/database/misc/odbc.py

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

* Adding odbc changelog fragment

* Picking a better word while fixing a typo

* Adding additional wording per felixfontein suggestion

* Update wording in plugins/modules/database/misc/odbc.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-06 20:41:34 +01:00
Mathias Ettinger
ce0f327875
InfluxDB_database: Make the path argument conditional on the InfluxDB version (#1126)
Co-authored-by: Mathias Ettinger <mathias.ettinger@viveris.f>
2020-11-06 09:12:00 +01:00
Tobias Lindenberg
890ff574c3
proxmox_template download appliance templates (#1046)
* proxmox_template download appliance templates

* Update changelogs/fragments/proxmox_template-appliance-download.yml

added pull request link

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

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

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

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

Co-authored-by: Tristan Le Guern <tleguern@bouledef.eu>

* Update proxmox_template.py

grammar

* removed debug message

Co-authored-by: Tobias Lindenberg <me@bloomcake.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Tristan Le Guern <tleguern@bouledef.eu>
2020-11-04 23:16:07 +01:00
Zach Peterson
b661c9476f
Remove redundant aliases from NIOS modules (#1223)
* remove redundant alias

* remove redundant aliases

* remove redundant aliases

* remove parameter-alias-self for nios_*

* add fragment

* Update changelogs/fragments/1223-nios-remove-redundant-aliases.yml

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

* Update plugins/modules/net_tools/nios/nios_host_record.py

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

* remove parameter-alias-self for nios_host_record

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-04 07:54:53 +01:00
Пётр
20ca01e486
Unbreak beadm module (#1105)
* Unbreak beadm module

* Add a changelog fragment

* Module beadm.py: remove regex, use split() everywhere, fix array indexes.

* Fix typos

* Change array indexes for BE name - according to Oracle documents, the name of BE is in the first column of beadm output on Solaris.

* Add 'None' checks in beadm.py
2020-10-31 13:51:10 +01:00
Damien Guihal
282c1d546c
Add support for "reconfigure" option for terraform init (#823)
* Add support for extra options for terraform init

* Add missing var declaration

* feat: add changelog fragment

* feat: switch from an init_extra_args global option to an init_reconfigure specific option

* Update changelogs/fragments/823-terraform_init_reconfigure.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-30 20:05:41 +01:00
Krzysztof Dąbrowski
c488cb1dd3
proxmox: ignore QEMU templates altogether (#1185)
* proxmox: ignore QEMU templates altogether

* add changelog fragment

* add test case

* Update changelogs/fragments/1185-proxmox-ignore-qemu-templates.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-30 19:51:49 +01:00
Amin Vakil
d6f5029187
proxmox, proxmox_kvm: Deprecate hard-coded defaults (#850)
* Remove hard-coded defaults

* Remove hard-coded defaults in proxmox.py

* Add changelog

* Remove defaults in proxmox docs

* Remove more default values

* Remove defaults in doc proxmox_kvm

* Restore default=True to onboot

* Add unspecified back to format

* correct changelog format and grammar

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

* improve changelog

* Fix changelog formatting

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

* Fix changelog formatting

* Deprecate before behaviour change

* Change changelog

* Remove unnecessary ignored sanity tests, fix

* Fix

* Better mention it too often than too little :)

* Deprecate in version 4.0.0 instead of 2.0.0

* Fix changelog

* Fix

* Remove none values

* Improve documentation as suggessted by felixfontein

* fix changelog

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

* Remove default value in force in proxmox_kvm

* Add description to force in proxmox_kvm

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-30 13:15:25 +01:00
Dmatrix
e13ca30e01
Add TCP healthcheck support for services registered by consul module (#1144)
* Add support for consul tcp health check

* Fix consul tcp example

* Remove trailing spaces

* Add changelog fragment

* Add format in description

* Use regex for tcp

* Review fix
2020-10-30 06:18:48 +01:00
Felix Fontein
20f470cc64
Remove ansible.posix dependency (#1157)
* Vendor plugins/module_utils/mount.py from ansible.posix, and drop ansible.posix dependency (except for testing).

* Add ignore.txt entries.

* Install test requirements conditionally.

* Apply suggestions from code review

Co-authored-by: John R Barker <john@johnrbarker.com>

* Bump to major changes.

Co-authored-by: John R Barker <john@johnrbarker.com>
2020-10-28 12:57:00 +01:00
Andrew Klaus
b7713830dc
OpenBSD Syspatch: Apply patches by default. Minor module cleanup (#360)
* Apply patches by default. Other minor cleanup

* syspatch: Adding changelog and deprecating redundant apply argument

* Update changelogs/fragments/360_syspatch_apply_patches_by_default.yml

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

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-28 06:49:14 +01:00
MichaelWasher
4c379bd3b2
Resolve homebrew and homebrew_cask package name validation issues (#1038)
Add basic regression tests
Add changelog
Rename _create_regex_group to better suit function
Fix '-' use in Homebrew validation
2020-10-27 22:46:49 +01:00
Laurent G
4842f67da1
Fix lang issue on zypper absent (#1175)
* Fix lang issue on zypper absent

* Add fragment changelog

* Update changelogs/fragments/1175-zypper-absent-lang.yml

Some outfit

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-27 22:45:42 +01:00
Felix Fontein
8670eff750
docker_container: add device_requests option (#1119)
* docker_container: add device_requests option.

* Fix copy'n'paste mistake.

* Fix failure test.

* Added example.

* Adjust tense.
2020-10-27 05:52:39 +01:00
quidame
a5ca990857
filesystem: fix 355 state absent (#1149)
* add support for filesystem removal (fix #355)

- Add 'state' option, defaults to 'present'.
- When state=absent, ignore other options (even 'dev' if the device
  doesn't exist)

* test filesystem state=absent (+ check_mode + idempotency)

* fix doc-required-mismatch

* add changelog fragment

* fix blkid return code

* ext4dev may be deprecated

* base checks on UUID instead

* Update changelogs/fragments/1149-filesystem-fix-355-state-absent.yml

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

* Update plugins/modules/system/filesystem.py (version_added)

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

* use array for new run_command() calls; do not wipefs if no fs found

* use dd as a fallback

* do not use bare 'except' (pep8)

* force string type

* use dd anyway (wipefs not supported everywhere, possibly buggy with vfat, etc.)

* do not truncate regular files; update changelog fragment

* doc: update state description and an example; notice check_mode support

* do not wipe mounted fs, fail instead

* back to wipefs implementation

* update test's main conditions

* update changelog fragment

* explicit types

* fail state=absent on freebsd

* remove doc-missing-type exceptions (2.9, 2.10, 2.11)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-26 19:43:01 +01:00
Jason Lingohr
c776387daa
infoblox inventory script: Use stderr, and allow use of environment for config (#436)
* Use stderr, and allow use of environment for config

Originally from https://github.com/ansible/ansible/pull/49685

* Create 436-infoblox-use-stderr-and-environment-for-config.yaml

* Update changelogs/fragments/436-infoblox-use-stderr-and-environment-for-config.yaml

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

* Update scripts/inventory/infoblox.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-26 19:42:05 +01:00
Mike Williams
0b13fd2c76
Add getbinpkgonly (-G) to portage (#1169)
* Add getbinpkgonly (-G) to portage

* version_added for getbinpkgonly

* Format description nicely, add the mutually exclusive nature of the 'pkg' options, and correct usepkgonly

* Changelog fragement

* Formatting

* Update changelogs/fragments/1169-getbinpkgonly.yaml

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

* Remove all exclusiveness, portage makes no such restrictions

Co-authored-by: Mike Williams <mike.williams@sectigo.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-26 19:37:56 +01:00
Jeff Geerling
19fdfcf0b3
Issue #1179: Fix v2 composer require idempotence (#1180)
* Issue #1179: Add new statement to composer require changed check for v2.

* Issue #1179: Add changelog fragment.
2020-10-26 19:31:17 +01:00
Alexei Znamensky
a93fce6755
Fixed django_manage markup in docs (#1154)
* Fixed django_manage markup in docs

* Update plugins/modules/web_infrastructure/django_manage.py

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

* Full validation in sanity-check

- removed restrictions from the tests/sanity/ignore-*.txt for django_manage
- adjusted documentation and code accordingly

* typo

* ... and added the necessary removed_from_collection='community.general'

* Update plugins/modules/web_infrastructure/django_manage.py

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

* Update plugins/modules/web_infrastructure/django_manage.py

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

* Update plugins/modules/web_infrastructure/django_manage.py

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

* Update plugins/modules/web_infrastructure/django_manage.py

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

* Added changelog fragment

* Documentation sentence lacking period, as pointed in the PR.

* Update plugins/modules/web_infrastructure/django_manage.py

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

* Update changelogs/fragments/1154-django_manage-docs.yml

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

* Update changelogs/fragments/1154-django_manage-docs.yml

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

* Removed the markup for 'shebang' in the docs.

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-26 07:54:57 +01:00
Simon Kelly
8de1c0c205
monit: fix module detection of monitored process state (#1107)
* refactor and test

* require version >= 5.21.0

Prior to this version the status output was different

* python version compatability

* use exception classes from utils

* modify monit to use 'status' output instead of 'summary' output

The summary output is a fixed width table which truncates the
contents and prevents us from parsing the actual status of the
program.

* add integration tests + fixes

* remove unused handlers in monit integration test

* fix lint

* add '__metaclass__ = type' to integration python files

* raise AttributeError

* simplify status

* lint: add type to parameter docs

* remove lint ignore

* move monit process config into main file

* specify path to monit PID file

* set config location based on os_family

* create required directories

* update aliases to set group and skips

* add changelog

* add author

* add types to docs

* add EPEL repo

* custom vars for centos-6

* uninstall EPEL

* support older versions

* wait for status to change before exiting

* use 'validate' to force status updates

* handle 'execution failed'

* better status output for errors

* add more context to failure + standardize

* don't check rc for validate

* legacy string format support

* add integration test for 'reloaded' and 'present'

* don't wait after reload

* lint

* Revert "uninstall EPEL"

This reverts commit 4d548718d0.

* make 'present' more robust

* Apply suggestions from code review

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

* add license header

* drop daemon.py and use python-daemon instead

* skip python2.6 which is not supported by python-daemon

* refactor test tasks for reuse

* cleanup files after test

* lint

* start process before enabling monit

This shouldn't be necessary but I'm adding it in the hopes
it will make tests more robust.

* retry task

* attempt to rescue the task on failure

* fix indentation

* ignore check if rescue ran

* restart monit instead of reload

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-10-23 12:26:23 +02:00
Justin Bronn
7722800561
nmcli: module refactor (#1113)
* * Refactor `nmcli` module to use consistent parameters when creating/modifying connections and detecting changes.
* Keep DNS list arguments as lists internally.
* Remove duplicated code where practical.

* DBus and GObject dependencies are not necessary.

* Update changelog fragment.

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

* Update changelog fragment.

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

* Use identity operator instead of equality for type comparison.

* Don't start changelog notes with a capital letter.

* * Have `settings_type` return `str` by default instead of `None`.
* Improve variable naming, use `convert_func` instead of `type_cast`.

* Revert new feature of allowing ethernet types as slaves.

* Bring back `list_connection_info` to list all connections with `nmcli con show`.

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-23 07:13:39 +02:00
Ty Martin
307c54750f
Add include_tags to datadog_monitor (#409)
* Add include_tags to datadog_monitor

* Incorporate PR feedback

* Add changelog fragment

* Update changelogs/fragments/409-datadog-monitor-include-tags.yaml

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

* Update plugins/modules/monitoring/datadog/datadog_monitor.py

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-23 07:12:22 +02:00
Andrew Klychkov
39a23a05f0
Fix changelog fragment (#1152) 2020-10-22 10:05:21 +03:00
Sebastiaan Mannem
3a5669991f
Update postgresql_pg_hba.py (#1124)
* Update postgresql_pg_hba.py

Fixes #1108

* Create changelog fragment for pull 1124

* Adding a unit test for pg_hba
2020-10-21 20:20:21 +03:00
Felix Fontein
16baefd167
docker_login: fix internal config file storage to handle credentials for more than one registry (#1118)
* docker_login: fix internal config file storage to handle credentials for more than one registry

* Improve setup for docker registry.

* Add second registry frontend. Add tests for #1118.

* Fix cleanup.
2020-10-21 08:18:05 +02:00
quidame
3bc31f286e
iptables_state: fix race condition between module and its action plugin (#1140)
* fix race condition between module and its action plugin

See https://github.com/ansible-collections/community.general/issues/1136.
Also remove irrelevant/unneeded display.v() and display.warning() around
connection reset.

* do not check for cookie if not in async mode

* add changelog fragment
2020-10-20 20:27:37 +02:00
mdaves93
18a5330e62
Added client_cert and client_key to the maven_artifact module. (#1127)
* Added client_cert and client_key to the maven_artifact module.

* Changelog fragment for PR-1127

* Apply suggestions from code review

Changes suggested in review. Match argument_spec values to documentation values.

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

* Update changelogs/fragments/1127-maven_artifact_client_cert.yml

Documentation formatting suggestion.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-20 18:41:57 +02:00
Andrew Klychkov
8267fd3809
postgresql_query: add query_all_results ret value (#886)
* postgresql_query: add query_all_results ret value

* add changelog fragment

* fix CI

* fix doc

* Update plugins/modules/database/postgresql/postgresql_query.py

Co-authored-by: Tobias Birkefeld <t@craxs.de>

* Update plugins/modules/database/postgresql/postgresql_query.py

Co-authored-by: Tobias Birkefeld <t@craxs.de>

* fix doc

Co-authored-by: Tobias Birkefeld <t@craxs.de>
2020-10-20 09:08:16 +03:00
Benjamin Pereto
a6c950a44b
cache/redis: feature redis sentinel (#1055)
* FEATURE: cache/redis: add redis sentinel support

* FEATURE: add changelog fragment

* STYLE: fix sanity

* DOCS: update fragment, specify redis cache plugin

* STYLE: spelling

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

* STYLE: spelling

* FIX: import to_native

* FIX: remove kw args to prevent secrets leak

Co-authored-by: Benjamin Pereto <benjamin@sandchaschte.ch>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-10-20 07:05:40 +02:00
Robbert Müller
bcfd648855
redis: use regexp to check if the value matches expected form (#1079)
* Use regexp to check if the value matches expected form

regexp should match values like:
- 1B
- 10MB
- 10mb

* Added changelog entry

* Update changelogs/fragments/1079-redis-use-regexp-to-check-if-the-value-matches-expected-form.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
2020-10-20 07:04:42 +02:00
Andreas Lutro
b5b5410575
move conversion of data to json in slack API handling (#1101)
* move conversion of data to json in slack API handling

at one point in do_notify_slack, we do operations on the payload
variable assuming it's a dict, but it's not: it's a json encoded string.

it's useful to operate on the payload as a dict rather than a string, so
solve this problem by moving the jsonify call to right before sending
the payload to the slack API.

fixes #1097

* add changelog fragment

* Update changelogs/fragments/1101-slack-ts-fix.yaml

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

* return payload as a json encoded string for backwards compatibility

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-19 10:58:14 +03:00
Anatoly Pugachev
07d123a71a
[capabilities] fix for a newer versions of libcap (#1061)
* [capabilities] fix for a newer versions of libcap

fixes: #993

* Minor correction for files without caps set.

PS: side note, getcap (per sources) does not set non-zero return code,
even for files which are not found (i.e. wrong filename).

* add changelog fragment

* review/suggested changes

* change comment to explicitly state stderr vs output
2020-10-16 21:03:54 +02:00
Andrew Klychkov
398421a9d1
postgresql_ext: fix module's failing when available ext versions contain a pure string (#1099)
* postgresql_ext: fix module's failing when available ext versions contain a pure string

* Add unit tests

* Add changelog fragment

* fix
2020-10-16 11:56:15 +03:00
Justin Bronn
555eb62199
solaris_zone: fix zone configuration with python3 (#1082)
* * Explicitly open up temporary file in text mode.
* Add test for `solaris_zone` creation.

* Update changelog fragment.

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

* Add tests for zone deletion and invalid zone names.

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-14 21:18:04 +02:00
Andrew Klychkov
da7f9ffc3f
postgresql_info: add in_recovery return value to show if a service in recovery mode or not (#1091)
* postgresql_info: add in_recovery return value to show if a service is in recovery mode or not

* add changelog fragment

* fix sanity
2020-10-14 14:30:19 +03:00
Simon Kelly
159f38f4f2
postgresql_ext: sort list of available versions (#1078)
* sort list of available versions

If `version == 'latest'` then the version is set to `available_versions[-1]` however `available_versions` was not previously sorted so the ordering was the natural order of the `pg_available_extension_versions` view.

* remove unnecessary lambda

* create changelog fragment for #1078

* add PR link to changelog fragment

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-10-13 12:36:23 +03:00
Benjamin Pereto
873f1fb7fd
cache/redis: make keyset keyname configurable (#1036)
* FEATURE: make ansible_cache_keys name configurable

* REFACTOR: rename cache_keys to keyset

* FEATURE: add changelog fragment

* Update changelogs/fragments/1036-redis-cache-keyset-name.yaml

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

* Set version_added in plugins/cache/redis.py

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

Co-authored-by: Benjamin Pereto <benjamin@sandchaschte.ch>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-11 15:16:59 +02:00
Andrew Klychkov
434b83170a
postgresql_privs: fix module fails when passing roles containing hyphens (#1059)
* postgresql_privs: fix module fails when passing roles containing hyphens

* fix

* Improve testing

* Improve testing

* Add changelog fragment

* Improve testing

* fix CI Free BSD
2020-10-11 12:57:19 +03:00
lukaszrzasik
e3e66a57ec
proxmox_kvm: allow setting format to null (None) (#1028)
* Allow setting format to null (None)

* Use string instead of None for consistency

* Add changelog

* Update changelogs/fragments/1028-proxmox-kvm-linked-clone.yml

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

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

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

* Substitute 'unspecified' format with None

Co-authored-by: Lukasz Rzasik <lukasz.rzasik@dreamlab.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-10 10:53:09 +02:00
S Code Man
98486c0ee2
Gitlab variables pagination (#968)
* Workaround increasing per_page to max

* Update plugins/modules/source_control/gitlab/gitlab_group_variable.py

* Create 968-gitlab_variables-pagination-increase.yml

* Update changelogs/fragments/968-gitlab_variables-pagination-increase.yml

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

* Update changelogs/fragments/968-gitlab_variables-pagination-increase.yml

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

* Proper support of pagination

* Fix E303 too many blank lines

* Add test for pagination

* Fix last vars removal test

* Apply suggestions from code review

Check misalignement fixed

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-09 14:59:00 +02:00
markafarrell
3af4be34b2
Respect VAULT_SKIP_VERIFY envionment variable setting in hashi_vault lookup plugin (#1024)
* add skip_certificate_validation from env VAULT_SKIP_VERIFY

* use os.envrion.env instead of skip_certificat_validation

* fix typo in test

* add tests for different truthy options

* fix linting

* add changelog

* change precedence for validate_certs

* add precedence test

* fix inverted logic

* Fix documentation

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

* Update plugins/lookup/hashi_vault.py

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

* fix linting

* Update plugins/lookup/hashi_vault.py

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

* Update plugins/lookup/hashi_vault.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-09 14:23:04 +02:00
Jürgen Hötzel
08b81b570e
Improve group expansion speed: query list of pacman groups once (#349) (#349)
For each package check membership in the list instead of checking each
package individually using pacman to see if it is a pacman group.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-09 14:18:11 +02:00
Andrew Klychkov
08c96d94e6
postgresql_privs: add procedure type support (#1048)
* postgresql_privs: add procedure type support

* add CI tests

* add changelog fragment

* change

* improve doc formatting
2020-10-08 08:21:39 +03:00
mklassen
0243eabd30
Fix xml reports changed when node is not deleted (#1007)
* Fix xml reports changed when node is not deleted

* Added changelog fragment

* Added tests for xml no change remove

* Added PR to changeling fragment

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-30 14:11:28 +03:00
Peter Oliver
dd9e999c9f
pkgutil: add update all, check-mode, squashing and examples (#799)
* pkgutil: add update all, check-mode, squashing and examples

Taken from https://github.com/ansible/ansible/pull/51651 by dagwieers, which was taken from https://github.com/ansible/ansible/pull/27866 by scathatheworm.  Let’s have one last attempt to get this merged.

> ##### SUMMARY
>
> Original PR #27866 from scathatheworm
>
> When working with Solaris pkgutil CSW packages, I came across this module being very basic in functionality, in particular, that I could not use it to update all CSW packages.
>
> When going into details into the code I also found it did not incorporate a possibility of doing dry-run from the underlying utility, or supported to specify multiple packages for operations.
>
> This module probably sees very little use, but it seemed like nice functionality to add and make it behave a little more like other package modules.
> ##### ISSUE TYPE
>
>     * Feature Pull Request
>
>
> ##### COMPONENT NAME
>
> pkgutil module
> ##### ANSIBLE VERSION
>
> ```
> ansible 2.3.1.0
>   config file = /etc/ansible/ansible.cfg
>   configured module search path = Default w/o overrides
>   python version = 2.7.5 (default, Aug  2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
> ```
>
> ##### ADDITIONAL INFORMATION
>
>     * Added ability to upgrade all packages:
>
>
> ```yaml
> - pkgutil:
>     name: '*'
>     state: latest
> ```
>
>     * Added ability to modify state of a list of packages:
>
>
> ```yaml
> - pkgutil:
>     name:
>     - CSWtop
>     - CSWwget
>     - CSWlsof
>     state: present
> ```
>
>     * Added ability to have underlying tool perform a dry-run when using check mode, pkgutil -n
>
>     * Added ability to configure force option to force packages to state determined by repository (downgrade for example)
>
>
> ```yaml
> - pkgutil:
>     name: CSWtop
>     state: latest
>     force: yes
> ```
>
>     * Added more examples and documentation to show the new functionality

* Add changelog fragment.

* Observe changelog style guide

https://docs.ansible.com/ansible/devel/community/development_process.html#changelogs

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

* Since module split, version_added no-longer refers to core Ansbile

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

* Tweak documentation

* Apply the new `elements` feature for specifying list types

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

* Set version_added

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

* Document `pkg` alias for `name`

* Be explicit about the purpose of states `installed` and `removed`.

* Force the user to specify their desired state.

* Review documentation for pkgutil module.

* Fully qualify svr4pkg module name

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-30 06:19:36 +02:00
Felix Fontein
e48083e66b
nmcli: set C locale when executing nmcli (#992)
* Set C locale when calling nmcli.

* Add changelog.
2020-09-29 22:57:07 +02:00
Andrew Klychkov
220051768b
postgresql_privs: fix the module mistakes a procedure for a function (#996)
* postgresql_privs: fix the module mistakes a procedure for a function

* add changelog fragment

* fix
2020-09-29 21:27:30 +03:00
Lina He
104f6a3e96
ipa_user: Add userauthtype param (#951)
* ipa_user: Add userauthtype param

* Add changelog fragment

* Update changelogs/fragments/951-ipa_user-add-userauthtype-param.yaml

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

* Update plugins/modules/identity/ipa/ipa_user.py

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

* ipa_user: Add example for userauthtype

Co-authored-by: Lina He <lhe@tmamission.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-09-29 17:02:40 +02:00
trumbaut
9b24b7a969
nagios: force an active service check for all services of a particular host or for the host itself (#998)
* Update nagios.py

Force an active service check for all services of a particular host or for the host itself

* Create 998-nagios-added_forced_check_for_all_services_or_host.yml

Added fragment
2020-09-29 13:49:27 +02:00
Mikhail Khvoinitsky
3d19e15a7d
Fix changes detection for createcachetable (#699) 2020-09-29 06:18:34 +02:00
Tony Goetheyn
7310a34b55
Nagios: added 'acknowledge' and 'schedule_forced_svc_check' action (#820)
* bugfix for None-type error

* add acknowledge and service_check options

* fix whitespace issues

* documentation fix

* fix version error

* changelog fix

* Update plugins/modules/monitoring/nagios.py

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

* fix int convert error

* Update plugins/modules/monitoring/nagios.py

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

* indentation fix

Co-authored-by: Goetheyn Tony <tony.goetheyn@digipolis.gent>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-29 06:17:09 +02:00
quidame
ea1fb83b0c
use FQCN when calling a module from action plugin (#967)
* use FQCN when calling a module from action plugin

https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.10.html#action-plugins-which-execute-modules-should-use-fully-qualified-module-names

* doc: add changelog fragment (minor_changes)

* move to shippable/posix/group1 to run tests with ansible 2.9

* move back to shippable/posix/group4

to not share testbed with docker engine on rhel7, that never releases
the xtables lock and leads 'iptables_state' tests to always fail.
2020-09-28 22:06:08 +02:00
Robert Osowiecki
4931fb2681
parted: proper fix for change of partition label case (#594)
* parted: proper fix for change of partition label case
calling mkpart even when partition existed before mklabel call, fixes #522

* changelog fragment for parted fix #522

* Update changelogs/fragments/522-parted_change_label.yml

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

* typo in comment

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-28 22:05:15 +02:00
Hobnob
13fb60f58f
Fix zfs snapshot handling on root zvols (#936)
* Update zfs.py

Added support for snapshots when working with a root zvol that contains no / in its path.

* Added Changelog Fragment
2020-09-28 22:04:24 +02:00
Felix Fontein
4e1f6683d9
docker_container: fix idempotency problem with empty published_ports list (#979)
* Distinguish between [] and None.

* Add changelog fragment.

* Fix typo.
2020-09-28 20:40:57 +02:00
Matt Martz
954fb0a311
Use platform.system for Darwin comparisons (#945)
* Use platform.system for Darwin comparisons

In Python3, `platform.platform()` returns `macOS-10.15.6-x86_64-i386-64bit` instead of `Darwin-10.15.6-x86_64-i386-64bit`. 

`platform.system()` returns `Darwin` On py2 and py3.

* Add changlog fragment

* Update changelogs/fragments/945-darwin-timezone-py3.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-28 08:12:38 +02:00
tomaszn
2794dc7b02
launchd: fix for user-level services (#899)
* launchd: fix for user-level services

* fix changelog fragment number
2020-09-27 22:30:22 +02:00
Kailun
62ae120c50
[aerospike_migrations] - handle exception for unstable-cluster (#900)
* [aerospike_migrations] - handle exception when unstable-cluster is returned

* fix lint issue

* Update changelogs/fragments/900-aerospike-migration-handle-unstable-cluster.yaml

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

Co-authored-by: Kailun Shi <kaishi@adobe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-25 07:38:48 +02:00
Andrew Klychkov
77bf8b9a66
postgresql_privs: add usage_on_types option (#941)
* postgresql_privs: add usage_of_types option

* add CI tests

* add changelog fragment
2020-09-24 10:08:34 +03:00
Tristan Le Guern
02e80c610b
proxmox_kvm: code cleanup (#934)
* proxmox_kvm: remove redundant parameters

The functions start_vm() and stop_vm() receive four common parameters:
module, proxmox, vm and vmid.
The last too are redundant so keep only vm.

I also took the opportunity to remove extra API calls to proxmox.nodes()
by assigning its return value to a variable.

* proxmox_kvm: remove extra calls to status.current

The get_vm() function already returns an array of properties containing
the status so remove extra API calls to retrieve this information.

Example:

    [{''netin'': 177232, ''name'': ''test-instance'', ''maxcpu'': 1, ''node'': ''prx-01'', ''disk'': 0, ''template'': 0, ''uptime'': 267, ''cpu'': 0.0410680030805531, ''diskread'': 165294744, ''maxdisk'': 10737418240, ''vmid'': 42, ''status'': ''running'', ''id'': ''qemu/42'', ''maxmem'': 536870912, ''diskwrite'': 18528256, ''netout'': 2918, ''type'': ''qemu'', ''mem'': 160284950}]

* proxmox_kvm: kill VZ_TYPE global variable

It reduces readability without providing much values nowadays.

* proxmox_kvm: simplify vmid generation

Forgotten suggestion from Felix Fontein in PR#811.

* proxmox_kvm: add changelog fragment for PR#934
2020-09-23 16:39:46 +03:00
Bill Dodd
e382044e42
Support same reset actions on Managers as on Systems (#903)
* bring Manager power cmds to parity with System power commands

* add changelog fragment

* Update changelogs/fragments/903-enhance-redfish-manager-reset-actions.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-23 08:42:56 +02:00
Amin Vakil
09d89da0ab
zypper_repository: Proper failure when python-xml is missing (#939)
* Proper error when python-xml is missing

* use missing_required_lib to output error

* Add changelog
2020-09-20 14:09:02 +02:00
Brian Scholer
ba5b86cf4a
hashi_vault - Change token_path env var loading precedence (#902)
* Change how vault token is loaded

* Add changelog for PR #902

* Update changelogs/fragments/902-hashi_vault-token-path.yml

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

* Update plugins/lookup/hashi_vault.py

Add version_added

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

* Update plugins/lookup/hashi_vault.py

Add version_added

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-18 21:59:25 +02:00
holtwilkins
1a5702cf21
Support use of VAULT_NAMESPACE env var (#929)
As per https://learn.hashicorp.com/tutorials/vault/namespaces, setting VAULT_NAMESPACE env var is a completely supported mechanism to make all vault command use said namespace, so hashi_vault lookup function should do the same.

Co-authored-by: Holt Wilkins <hwilkins@palantir.com>
2020-09-18 21:21:41 +02:00
Benoit Bayszczak
51121e54d0
[lookup_plugin/hashi_vault] add missing 'mount_point' param for approle (#897)
* [lookup_plugin/hashi_vault] add missing 'mount_point' param for approle

* [lookup_plugin/hashi_vault] add changelog fragment

* Update changelogs/fragments/897-lookup-plugin-hashivault-add-approle-mount-point.yaml

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

Co-authored-by: Benoit Bayszczak <benoit.bayszczak@adevinta.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-17 10:19:12 +02:00
Georg Sauthoff
2b3c8f4582
Rollback if nothing changed (#887)
Since the module unconditionally issues ALTER statements in order to
observe their effect on the postgres catalog - to determine whether the
privileges have changes - a rollback is thus advisable when in fact
nothing has changed.

fix #885
2020-09-15 16:21:34 +03:00
Scott Seekamp
d7ec65c19c
redfish_command: allow setting the BootSourceOverrideEnabled property (#825)
Issue: 824

Co-authored-by: Scott Seekamp <sseekamp@digitalocean.com>
2020-09-10 17:25:48 +02:00
Andrew Klychkov
bfdb76e60d
postgresql_privs: allow lowercased PUBLIC role (#858)
* postgresql_privs: allow lowercased PUBLIC role

* add changelog fragment

* improve CI

* fix changelog fragment
2020-09-10 16:08:57 +03:00
Jan-Philipp Litza
eb24b5707e
interfaces_file: re.escape() old value (#873) 2020-09-08 14:48:20 +02:00
Tristan Le Guern
9a5fe4c9af
proxmox_kvm: new function wait_for_task() (#831)
Allows some factorization of redundant code in stop_vm(), start_vm(),
create_vm() and main().
This new function also waits one extra second after a successful task execution as the API can be a bit ahead of Proxmox.

Before:

    TASK [ansible-role-proxmox-instance : Ensure test-instance is created]
    changed: [localhost]

    TASK [ansible-role-proxmox-instance : Ensure test-instance is updated]
    fatal: [localhost]: FAILED! => changed=false
      msg: VM test-instance does not exist in cluster.

After:

    TASK [ansible-role-proxmox-instance : Ensure test-instance is created]
    changed: [localhost]

    TASK [ansible-role-proxmox-instance : Ensure test-instance is updated]
    changed: [localhost]

With suggestions from Felix Fontein <felix@fontein.de>.
2020-09-08 13:11:37 +02:00
Andreas Lutro
6d60d3fa7f
add message_id (ts) option to slack module to allow editing messages (#843)
* add ts option to slack module to allow editing messages

* add version_added

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

* use correct API URL when updating

* add changelog fragment

* add diff/changed support for updating slack messages

* add an example on how to edit a message

* rename ts to message_id

* use the changed variable where possible

* correct conversation.history url

* proper formatting in documentation

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

* add channel to example

* correct conversation history url

* allow channel to start with C0

* fetch_url does not construct query parameters

* add missing argument

* return more data when nothing has changed

* use urlencode to construct query string

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-08 13:09:25 +02:00
Josh VanDeraa
1eb3ab3b27
Slack: moves to \S+ check instead of \w+-\w+ (#863)
* Moves to \S+ check instead of \w+-\w+

* Adds changelog fragment

* Update changelogs/fragments/892-slack-token-validation.yml

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

Co-authored-by: Josh VanDeraa <josh.vanderaa@networktocode.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-07 22:09:31 +02:00
Tristan Le Guern
e20eb64c6e
proxmox_kvm: allow force to be use with state=absent (#849)
In this case a running VM will be automaticaly shut down before being
removed.

With updates from Andrew Klychkov <aaklychkov@mail.ru>.
2020-09-07 22:07:40 +02:00
Tristan Le Guern
73f8338980
proxmox_kvm: fix idempotency issue with state=absent (#811)
When the `vmid` parameter is not supplied and the module can only rely on
name look-up an early failure can happen if the targeted VM doesn't exist.
In this case a task execution with the parameter `state` set to `absent`
will actually fail instead of being considered ok.

This patch introduces a deferred error-checking for non-existent VMs
by assigning the value -1 to the `vmid` parameter, allowing the actual
verification to be performed in the right code paths.
Is also help to differentiate between a non-existent `vmid` or non-existent
VM `name`.

Previously:

    TASK [ansible-role-proxmox-instance : Remove instance-test]
    changed: [localhost]
    ...
    TASK [ansible-role-proxmox-instance : Remove instance-test]
    fatal: [localhost]: FAILED! => changed=false
      msg: VM instance-test does not exist in cluster.

Now:

    TASK [ansible-role-proxmox-instance : Remove instance-test]
    ok: [localhost]
    ...
    TASK [ansible-role-proxmox-instance : Remove instance-test]
    ok: [localhost]

Update changelogs/fragments/811-proxmox-kvm-state-absent.yml

With suggestions from Felix Fontein <felix@fontein.de>.
2020-09-05 00:51:54 +02:00
Bernd Arnold
bf41ddc8ef
Specify device for Pushover notification (#802)
* Specify device for Pushover notification

New parameter: device

Example:
- community.general.pushover:
    msg: '{{ inventory_hostname }} has been lost somewhere'
    app_token: wxfdksl
    user_key: baa5fe97f2c5ab3ca8f0bb59
    device: admins-iPhone
  delegate_to: localhost

Using the Pushover API, you can specify a device where the message should be delivered to. Instead of notifying all devices (the default), the message is sent only to the specified device. Multiple devices can be given separated by a comma.

This change is downwards compatible: omitting the device key sends the message to all devices (as before).

* Added changelog fragments file for pushover

File format as specified in https://docs.ansible.com/ansible/devel/community/development_process.html#changelogs-how-to.

* Added version_added information

As suggested by Felix (thanks!).

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-03 08:01:52 +02:00
Vlad Mencl
6dc98c08fd
gem: Fix get_installed_versions: correctly parse "default" version. (#783)
* Fix get_installed_versions: correctly parse "default" version.

gem query output of

    bundler (default: 2.1.4, 1.17.2)

Gets parsed as:

    ['default:', '1.17.2']

Fix this by skipping "default: " if present in the list of versions - by adding
it as an optional part of the regex, grouped as a non-capturing group to keep
the index of existing group.

This now correctly parses the above input as

    ['2.1.4:', '1.17.2']

Fixes #782

* Fix gem get_installed_versions (cont): add changelog fragment

* Update changelogs/fragments/783-fix-gem-installed-versions.yaml as per suggestion

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-03 07:47:34 +02:00
Brandon Boles
8f2b2d9dc6
Fix for error trying to install cask with '@' in the name (#763)
* Fix for casks with @ in the name

* Add changelog fragment

* Update changelogs/fragments/homebrew-cask-at-symbol-fix.yaml

Period required at the end of changelog entry

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

* Use double backticks

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-09-02 07:52:23 +03:00
Peter Oliver
d4e9b7575c
pkg5: wrap 'to modify' package list (#789)
* pkg5: wrap 'to modify' package list

Moved from https://github.com/ansible/ansible/pull/56378

* Add changelog fragment.

* Correct markup.

* Update changelogs/fragments/789-pkg5-wrap-to-modify-package-list.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-08-25 21:21:51 +02:00
AdamGoldsmith
7e6bde2ce1
Fix terraform changed status detection test (#561) (#563)
* Fix terraform changed status detection test (#561)

* Add changelog fragment

* Update changelogs/fragments/563-update-terraform-status-test.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-08-21 21:44:15 +02:00
Milan Ilic
f3b82a9470
postgresql_privs: Fix bug with grant_option (#796) 2020-08-21 13:57:26 +03:00
Felix Fontein
0ae3d0aecb
Fix galaxy.yml (#774)
* Bump dependencies to 1.0.0, fix tags in galaxy.yml.

* Add changelog.
2020-08-16 17:09:34 +01:00
Andrew Klychkov
05556dc671
postgresql_set: allow to pass an empty string as a value (#776)
* postgresql_set: allow to pass an empty string as a value

* add check_mode to CI for the case

* add changelog fragment

* add pause

* fix

* fix ci

* fix

* fix

* add suggested
2020-08-14 22:46:45 +03:00
Adriaan Callaerts
d13b026f47
Update xfconf.py: make locale-independent (#744)
* Update xfconf.py

- ensure correct behaviour, even in desktop environments which don't use English as the default language
- add double as content type

* set environ_update for entire module

* set envvar LANGUAGE instead of LANG because of priority order in evaluating them
2020-08-11 12:27:33 +02:00
Kelly Brazil
b2a222b136
JC plugin (#750)
* initial commit

* add contrib info

* remove nonfunctional \n in error messate

* add documentation and optional quiet and raw arguments

* add changelog fragment

* add aliases

* add initial test

* change folder name

* add pip install jc for tests

* simplify changelog since tests were failing

* add newline to end of file

* fix trailing whitespace in comment causing test failure

* use pip3 since tests are failing using python2.6 pip

* skip python 2.7 tests since jc only supports python 3

* use pip instead of pip3

* add python version requirement
2020-08-11 09:12:17 +03:00
Dusan Matejka
fefc4b3423
Cleanup changelog for not included zabbix plugins (#760)
* cleanup changelog for not included zabbix plugins

* Re-generate changelog

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-08-11 08:02:30 +02:00
Abhijeet Kasurde
9e039cc4a0
dsv: Use correct dict usage (#743)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-08-10 10:22:24 +05:30
Felix Fontein
ea21341686
Fix plugins (names, constants, FQCNs in examples) (#722)
* cobbler inventory: fix NAME

* oc transport: fix transport name

* Inventory plugins: fix plugin identifications

* Use FQCN in lookup plugin examples.

* Use FQCN in callback plugins.

* Add changelog fragment.

* Adjust documentation.

* Fix lookup plugin linting errors.

* Fix quotes.
2020-08-08 22:04:34 +02:00
David Marthy
0951833a6c
ipa module utils: BUGFIX ipa modules Cookie problem with Loadbalanced IPA and Python3 (… (#738)
* BUGFIX ipa modules Cookie problem with Loadbalanced IPA and Python3 (#737)

* Update changelogs/fragments/738-ipa-python3.yml

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

* Update plugins/module_utils/ipa.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-08-07 08:26:38 +02:00
Felix Fontein
d0879bfaf9 Rename changelogs/fragments/.empty -> changelogs/fragments/.keep 2020-08-07 08:17:57 +02:00
chris93111
623817b0b7
add ini config to logstash callback (#610)
* Update logstash.py

* remove version with collection

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* rename the callback name with migration collection

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update plugins/callback/logstash.py

v1

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

* Create 610_logstash_callback_add_ini_config.yml

* Update changelogs/fragments/610_logstash_callback_add_ini_config.yml

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

* Update logstash.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-07-31 10:56:12 +02:00
Roman
6df7fd3026
module lxd_container - added target parameter for cluster deployments (#711)
* module lxd_container - added target support for LXD cluster deployments.
https://github.com/ansible-collections/community.general/issues/637

* lxd_container.py fixed PEP8 issues.

* Update plugins/modules/cloud/lxd/lxd_container.py

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

* Update plugins/modules/cloud/lxd/lxd_container.py

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

* Update plugins/modules/cloud/lxd/lxd_container.py

Added type: str for target parameter description.

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

* lxd_container.py - added example of using target parameter

* lxd_container.py - fixed PEP8 issue, trailing whitespace.

* Update plugins/modules/cloud/lxd/lxd_container.py

Cosmetic fix, adding newline between two blocks of examples.

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-07-30 12:30:25 +03:00
Sean Reifschneider
848d63fa38
haproxy: Enable/disable health and agent checks (#689)
* Enable/disable health and agent checks

Health and agent checks can cause a disabled service to re-enable
itself.  This adds "health" and "agent" options that will also
enable or disable those checks, matching if the service is to be
enabled/disabled.

* Update plugins/modules/net_tools/haproxy.py

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

* Update plugins/modules/net_tools/haproxy.py

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

* Update plugins/modules/net_tools/haproxy.py

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

* Update plugins/modules/net_tools/haproxy.py

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

* Changes to documentation and changelog.

Changes for the haproxy documentation to resolve issues with
the CI/CD, and adding a changelog fragment.

* Update changelogs/fragments/689-haproxy_agent_and_health.yml

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

* Update changelogs/fragments/689-haproxy_agent_and_health.yml

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

* Update plugins/modules/net_tools/haproxy.py

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

* Add an example of health/agent disable.

* Update plugins/modules/net_tools/haproxy.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-07-29 23:39:48 +02:00
Ken Dreyer
b29af922eb
jira: cast error messages to strings (#707)
Sometimes Jira returns dicts as "errors" instead of simple strings.
For example, when a user specifies a field that cannot be set, Jira
returns a dict with the field name as a key and the error message as the
value.

In the rare case that we have both a "errorMessages" list and an
"errors" dict, when we combine those values later with join(), Python
raises a TypeError.

Transform each individual error message into a string, and then join()
the list of strings.
2020-07-29 23:38:51 +02:00
Lee Goolsbee
9822d8172b
slack: support for blocks (#702)
* Slack: add support for blocks

* Slack: drop unused validate_certs option

* Slack: update docs to reflect thread_id can be sent with tokens other than WebAPI

* Slack: drop escaping of quotes and apostrophes

* Slack: typo

* Revert "Slack: drop escaping of quotes and apostrophes"

This reverts commit bc6120907e.

* Revert "Slack: drop unused validate_certs option"

This reverts commit a981ee6bca.

* Slack: other/minor PR feedback

* Slack: add changelog fragment

* Slack: clean-up/clarify use of recursive escaping function

* Slack: PR feedback

Co-authored-by: Lee Goolsbee <lgoolsbee@atlassian.com>
2020-07-29 22:11:32 +02:00
Felix Fontein
08f10d5758
Fix more become plugins (#708)
* Fix more become plugins.

* Don't re-use var.

* Other way around.
2020-07-29 20:27:16 +02:00
Felix Fontein
233617fdfa
Add porting guide entries from Ansible-base porting guide (#703)
* Add porting guide entries from Ansible-base porting guide (https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/porting_guides/porting_guide_2.10.rst).

* This is already in the changelog.
2020-07-29 08:02:12 +02:00
Gonéri Le Bouder
15e9f04f86
doas: properly set the default values (#704)
* doas: properly set the default values

The module expects by default:

- `become_user` to be `None` or a string,
- `become_flags` to by an empty string.

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-07-29 07:55:01 +02:00
Pierre Roudier
4a1d86c47e
Added uint type to xfconf module (#696)
* Added uint type to xfconf module

* Update changelogs/fragments/xfconf_add_uint_type.yml

Updated PR number in changelog

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

Co-authored-by: Pierre Roudier <pierre.roudier@ticksmith.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-07-28 10:40:40 +03:00
Ken Dreyer
041824b98e
jira: log error messages in "errors" key (#311)
Jira's API can return a empty "errorMessages" list, and the real error
is in the "errors" object. This happens, for example, if a user tries to
file a ticket in a project that does not exist (tested with Jira
v7.13.8)

Check both "errorMessages" and "errors", and report both values with
fail_json().

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-07-28 08:59:33 +03:00
Michael Williams
1beabef60e
Shameless recommit of changes in jesstruck/ansible:jenkins_plugins_sha1 (#677)
* Shameless recommit of changes in jesstruck/ansible:jenkins_plugins_sha1

* Add changelog fragment.

* Change variable name to remove reference to sha1

Also, update changelog fragment typos/style.

* Update changelog fragment typos/style.
2020-07-27 11:33:08 +02:00
Alexei Znamensky
d40dece6c5
big revamp on xfconf, adding array values (#693)
* big revamp on xfconf, adding array values

* added changelog fragment

* Update changelogs/fragments/693-big-revamp-on-xfconf-adding-array-values.yml

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-07-25 13:58:14 +03:00
Bill Dodd
87423f4a33
Fix decoding of response payloads for python 3.5 (#687)
* fix decoding of response payloads for python 3.5

* add changelog fragment
2020-07-24 23:35:33 +02:00
Jan Gaßner
eb2369a934
yarn: Fix handling of empty outdated & scoped packages (#474)
* Fixed index out of range in yarn module when no packages are outdated

* Fixed handling of yarn dependencies when scoped modules are installed

* Added changelog fragment for yarn module fixes

* Adhere changelogs/fragments/474-yarn_fix-outdated-fix-list.yml to current standards

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

* Added scoped package to yarn integration test

Co-authored-by: Jan Gaßner <jan.gassner@plusserver.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-07-23 10:19:32 +03:00
Andrew Klychkov
c207b7298c
osx_defaults: fix handling negative integers (#676)
* osx_defaults: fix handling negative integers

* add changelog fragment
2020-07-21 16:12:21 +02:00
ernst-s
d7aabcceed
Handle 'No more variables left in this MIB View ' in snmp_facts (#613)
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-07-21 12:40:26 +05:30
Felix Fontein
7ac467a359
Restore removed google modules (#675)
* Revert "Remove entries of modules that no longer exist." partially.

This reverts commit c1e1b37da4.

* Revert "The _info module is in google.cloud."

This reverts commit 26f5c84924.

* Revert "Remove modules that were moved to the google.cloud collection according to ansible/ansible's ansible_builtin_runtime.yml."

This reverts commit a1442ccc35.

* Fix FQCNs in examples and module references.

* Add changelog fragment.

* Update ignore.txt.

* Remove bad lines.
2020-07-21 07:45:32 +01:00