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

338 commits

Author SHA1 Message Date
Felix Fontein
b56539f17e Release 1.3.2. 2021-01-04 18:26:01 +01:00
Felix Fontein
167d4bae90 Add release summary. 2021-01-04 13:36:21 +01:00
Felix Fontein
de85c11bd1
[stable-1] Add OC, hashi_vault and Google removal announcements (#1560)
* Add removal announcements.

* Remove Latin abbrevation.

* Add hashi_vault removal announcement.
2021-01-04 11:06:49 +01:00
patchback[bot]
7cd96ef3b6
changed make parameter from --question to -q (#1574) (#1581)
* 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>
(cherry picked from commit 0bd4b3cbc9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-01-03 13:55:58 +01:00
patchback[bot]
b7a44a593e
fix passwordstore.py to be compatible with gopass versions (#1493) (#1580)
* 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>
(cherry picked from commit 491b622041)

Co-authored-by: Eike Waldt <git@yeoldegrove.de>
2021-01-03 11:48:37 +00:00
patchback[bot]
c413963ecb
pamd - fixed bug (#1538) (#1579)
* 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>
(cherry picked from commit 325a19d88a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-01-03 11:48:07 +00:00
patchback[bot]
4f7d44aa10
monit: add support for all monit services when checking process state (#1532) (#1578)
* add support for all monit service types

* ignore case when performing check

* add changelog

* Escape special characters before matching

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

* escape each element individually

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

Co-authored-by: Graham Herceg <g.a.herceg@gmail.com>
2021-01-03 11:47:54 +00:00
patchback[bot]
56055d4f1e
Remove bridge-slave from list of IP based connections (#1517) (#1577)
* 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>
(cherry picked from commit fd741ed663)

Co-authored-by: momcilo78 <momcilo@majic.rs>
2021-01-03 12:43:56 +01:00
patchback[bot]
3fa4a9c073
Legacy Python certificate validation fixed (#470) (#1576)
* 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>
(cherry picked from commit df9f0741b5)

Co-authored-by: Johannes Petz <PetzJohannes@users.noreply.github.com>
2021-01-03 11:37:40 +01:00
patchback[bot]
1552bae77b
syslogger - update syslog.openlog API call for older Python (#1572) (#1573)
* 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>
(cherry picked from commit ce83bde742)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-01-02 21:05:43 +01:00
patchback[bot]
7ac14f964b
updated deprecated homebrew cask commands (#1481) (#1565)
* 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>
(cherry picked from commit ed813176ce)

Co-authored-by: Jianhao Tan <jianhao@shopback.com>
2020-12-31 23:07:39 +00:00
patchback[bot]
95d725a3cc
launchd: Handle deprecated APIs in plistlib (#1554) (#1563)
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6c88b69d6f)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-30 09:00:33 +01:00
patchback[bot]
95de8bd39d
sendgrid: Update docs (#1557) (#1558)
* Updated docs
* Warn user about required Sendgrid Python library version i.e <=1.6.22

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-29 10:25:40 +01:00
Felix Fontein
ecbdaca971
Backport of 5eef093e99 (#1548) 2020-12-27 15:50:21 +01:00
patchback[bot]
bd15741647
jira - some improvements to the module (#1536) (#1547)
* 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>
(cherry picked from commit 5016f402a5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-12-27 13:47:33 +00:00
Felix Fontein
fa05ca3f63
Backport of 117f132213 (#1542) 2020-12-26 18:30:07 +00:00
patchback[bot]
29992f1fbf
nios_member: fix nios api member_normalize error with python 3 (#1527) (#1534)
* 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>
(cherry picked from commit c63f3f9956)

Co-authored-by: neatherweb <35084494+neatherweb@users.noreply.github.com>
2020-12-23 08:49:29 +01:00
patchback[bot]
34ab07865f
Ensured `changed returns False`. (#1530) (#1531)
* Ensured ``changed`` returns ``False``.

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

* yamllint caught it

* Rephrased changelog fragment

(cherry picked from commit 1faf8ef08b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-12-22 16:15:50 +01:00
patchback[bot]
5fa1fc65ca
YAML callback: do not remove non-ASCII Unicode from multi-line string output (#1522) (#1529)
* Do not remove non-ASCII Unicode from multi-line string output.

* Added basic tests.

* Add Unicode test.

* Simplify tests, avoid later Jinja features.

* Refactor.

* Make use diy tests use callback test framework as well.

* Remove color codes.

* Work around stable-2.9 bug.

* Simplify again.

(cherry picked from commit 0a7ed3b019)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-22 09:59:57 +00:00
Felix Fontein
332ba8166c Release 1.3.1. 2020-12-21 14:25:46 +01:00
Felix Fontein
725450e57a Add release summary. 2020-12-21 14:24:51 +01:00
patchback[bot]
f4311e08aa
Some adjustments/improvements (#1516) (#1520)
* 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

(cherry picked from commit 5ee5c004b4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-12-21 14:20:35 +01:00
patchback[bot]
9e7b067904
Raises error for non-existent repo path (#1512) (#1518)
* 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>
(cherry picked from commit e9dafb3467)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-12-21 13:11:45 +01:00
patchback[bot]
d29db3ecf9
saltstack: fix put_file to preserve checksum (#1472) (#1514)
* 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>
(cherry picked from commit 47b940fc63)

Co-authored-by: Zac Medico <zmedico@gmail.com>
2020-12-19 18:55:57 +00:00
patchback[bot]
4aba7d5b87
jira: Provide useful error message to user (#1509) (#1513)
* Code refactor
* Handle exception
* Provide useful error message to user when exception is raised

Fixes: #1504

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-19 18:11:11 +01:00
patchback[bot]
0bfed46136
bitbucket_pipeline_variable: Change pagination logic (#1498) (#1502)
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>
(cherry picked from commit 4c14df6d88)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-17 11:12:39 +01:00
patchback[bot]
a04912dec0
[PR #645/c3ef9bf6 backport][stable-1] cobbler: Add Python 3 support (#1499)
* cobbler: Add Python 3 support (#645)


(cherry picked from commit c3ef9bf668)

* Fix changelog fragment.

(cherry picked from commit d495d3969b)

Co-authored-by: Dag Wieers <dag@wieers.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-16 23:04:23 +01:00
patchback[bot]
3960153f70
fix so module nios_host_record can remove aliases (#1470) (#1490)
* 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>
(cherry picked from commit 496be77a2b)

Co-authored-by: Pablo Escobar Lopez <pescobar001@gmail.com>
2020-12-15 20:49:52 +01:00
patchback[bot]
777a741d4d
keycloak: Provide meaningful error message to user (#1487) (#1489)
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>
(cherry picked from commit f37eb12580)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-15 06:39:47 +01:00
patchback[bot]
aaf42f3646
Fix property name typo in get_memory_inventory() (#1484) (#1486)
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 51dfc1f288)

Co-authored-by: Bill Dodd <billdodd@gmail.com>
2020-12-14 07:57:07 +01:00
patchback[bot]
c167ac10e0
xfconf: add return values and expand test coverage (#1419) (#1479)
* xfconf: add return values and expand test coverage

* fix pep8

* fix pylint

* fix returns yaml docs

* Add changelog fragemnt

* revert docts for `returned`

* Update changelogs/fragments/1419-xfconf-return-values.yaml

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

* Update plugins/modules/system/xfconf.py

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

* update return values to raw for scalar/lists

* another doc tweak: None -> none

* Break newline for pep8

* Fix merge mistake

* Back to list of strings

* fix yaml syntax

* Fall back to old way, deprecate returns, add ingores for errors

* add a note about dprecating facts

* Add depracation messages and fix docstring error

* remove deprecation of return values.

* Update plugins/modules/system/xfconf.py

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

* drop the deprecation message too

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

Co-authored-by: Matthew Campbell <calvinmc@gmail.com>
2020-12-12 15:29:20 +01:00
Felix Fontein
a118bb8d05
Backport of https://github.com/ansible-collections/community.docker/pull/43 (518e99411a9ce47c249a045b346cf28b63b512e2). (#1468) 2020-12-09 11:05:30 +03:00
patchback[bot]
d2b1df49c1
Bugfix: Fix parsing array values from osx_defaults (#358) (#1467)
* Bugfix: Fix parsing array values in osx_defaults

Unquote values and unescape double quotes when reading array values from defaults.

* Fix fragments: fix_parsing_array_values_in_osx_defaults

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

* add test code for Bugfix: Fix parsing array values from osx_defaults

* handle spaces after the comma

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

Co-authored-by: Kazufumi NOTO <noto.kazufumi@gmail.com>
2020-12-09 08:12:28 +01:00
patchback[bot]
c642ee9157
Fix #1435: mas : Fix "invalid literal" when no app (#1436) (#1448)
* 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>
(cherry picked from commit b80854ff50)

Co-authored-by: Jean-Pierre Matsumoto <jpmat296@gmail.com>
2020-12-04 09:36:03 +01:00
patchback[bot]
9defd1aca1
json_query: Handle AnsibleUnicode, AnsibleUnsafeText (#1434) (#1443)
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>
(cherry picked from commit 5319437bc2)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-12-04 08:06:09 +01:00
patchback[bot]
961011891b
[icinga2_host.py] Actually return codes instead of data (#335) (#1431)
* [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>
(cherry picked from commit 70ba401602)

Co-authored-by: Martin <spleefer90@gmail.com>
2020-12-02 08:17:26 +01:00
Felix Fontein
6470d3defe
Tidy up validate-modules:no-default-for-required-parameter and other cases (#1423) (#1429)
* Fixed validate-modules:mutually_exclusive-unknown for plugins/modules/packaging/os/redhat_subscription.py

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

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

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

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

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

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

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

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

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

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

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

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

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

* added a couple of FIXME comments

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

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

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

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

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

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

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

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

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

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

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

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

* Added changelog frag

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

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

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

* Typos and small fixes

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

* Typos and small fixes, part 2

* Fixes from PR comments

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

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

* Rolled back the mutually-exclusive-unknown in redhat_subscription

* Update changelogs/fragments/1423-valmod_multiple_cases.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-12-01 21:13:54 +00:00
Felix Fontein
1dfe7963cf
Tidy up validate-modules:doc-required-mismatch (#1415) (#1417)
* Tidy up validate-modules ignores doc-required-mismatch

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

* Fixed chengelog frag

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

* removed changelog frag for the rollback

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

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

* Revert "removed changelog frag for the rollback"

This reverts commit 56a02ead3b.

* suggestion from PR

* yet another PR suggestion

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-28 15:41:36 +01:00
patchback[bot]
70a8ca6ac3
Tidy up validate-modules:doc-elements-mismatch (#1399) (#1407)
* fixed validation-modules for plugins/modules/cloud/xenserver/xenserver_guest.py

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

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

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

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

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

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

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

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

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

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

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

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

* Added changelog frag for utm_proxy_exception

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

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

* Fixed couple of missing docs

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-27 08:25:08 +01:00
Felix Fontein
bc13182e1d Release 1.3.0. 2020-11-26 14:12:35 +01:00
Felix Fontein
6cbd0c772e Add release summary. 2020-11-26 14:10:50 +01:00
patchback[bot]
bd8df8e94e
Apache2 module: Add another shib module identifier (#1383) (#1397)
* 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>
(cherry picked from commit 382be570ec)

Co-authored-by: peter <peter-@users.noreply.github.com>
2020-11-26 08:47:02 +01:00
patchback[bot]
9bb439632b
adding fix for packet_net.py (#891) (#1396)
* 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>
(cherry picked from commit cc7d0f7670)

Co-authored-by: elreydetoda <unc741@gmail.com>
2020-11-26 08:10:33 +01:00
patchback[bot]
9e780b9d5e
Fix macports package present/active detection (#1308) (#1395)
* Fix typo in redhat_subscription testcase

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

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

Instead:

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

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

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

* Update macports state=active to eliminate use_unsafe_shell

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

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

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

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

* Basic test case of query_port for present and active

* Attempt to fix lint errors in test

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

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

fingers crossed this addresses the known build errors

* Add changelog fragment

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

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

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

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

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

Co-authored-by: Dan Jackson <dan@djackson.org>
2020-11-26 07:15:27 +01:00
Andrew Klychkov
a07db2f731
Add changelog fragment with PostgreSQL migration announcement (#1384) 2020-11-25 08:24:26 +01:00
Felix Fontein
528602f1b9
Improve fragments. (#1381) 2020-11-25 08:03:40 +01:00
patchback[bot]
b99586e26a
Datadog: Mark notification_message as no_log (#1338) (#1385)
* 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>
(cherry picked from commit e73451f09e)

Co-authored-by: Albert Vaca Cintora <albertvaka@gmail.com>
2020-11-25 08:01:17 +01:00
patchback[bot]
999620c789
Add Cloud Init variables for Proxmox_KVM module (#797) (#1380)
* 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>
(cherry picked from commit 1f7649fcd7)

Co-authored-by: morph027 <morphsen@gmx.com>
2020-11-24 20:58:28 +01:00
patchback[bot]
d5c24e67e8
proxmox: create a common base (#1331) (#1378)
* proxmox: create a common base

Add a doc_fragment to share the documentation regarding authentication
parameters (api_host, api_user, api_password, api_token_id,
api_token_secret as well as the lone validate_certs).

Add a module_utils to hold common code such as the argument spec (again
related to authentication paramters), a helper function to convert from
Proxmox boolean representation to python and the base class
ProxmoxAnsible.
For now it only handles the connection to Proxmox VE API but more can be
added in the future.

To check if everything is well in place add three new modules:
proxmox_{domain,group,user}_info.

And finaly tests these new modules.

* Apply suggestions from code review

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

* Add tests/integration/targets/proxmox/aliases

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

Co-authored-by: Tristan Le Guern <tleguern@bouledef.eu>
2020-11-24 17:56:50 +01:00
patchback[bot]
b1d1391be5
Added umask option to passwordstore lookup plugin. (#1156) (#1376)
* 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>
(cherry picked from commit 28ac4b79e2)

Co-authored-by: bratw0rst <42434435+bratw0rst@users.noreply.github.com>
2020-11-24 07:36:15 +00:00