Compare commits

..

130 Commits
2.5.2 ... 2.5.6

Author SHA1 Message Date
Felix Fontein
44de6b09a7 Relesae 2.5.6. 2021-09-21 12:58:35 +02:00
patchback[bot]
c7eed0f32c Update README.md (#3402) (#3414)
* Update README.md

* Update README.md

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

* Fix the link

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

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
2021-09-21 12:16:23 +02:00
Felix Fontein
000b3cee58 Prepare 2.5.6 release. 2021-09-21 09:49:25 +02:00
Felix Fontein
ba30fc63b7 Make ready for split-controller testing in ansible-core (#3345) (#3413)
* Accept context/ in aliases.

* Mark ansible_galaxy_install test as context/controller.

* Fix interfaces_file test.

ci_complete

* Install pyone dependency.

ci_complete

(cherry picked from commit 98d071f61e)
2021-09-21 09:47:48 +02:00
patchback[bot]
afddbaa857 openbsd_pkg: Fix KeyError (#3336) (#3406)
If package installation has an error after the package is install (e.g.
when running tags), then there will be output on stderr and the fallback
regex will match; however, since pkg_add exited non-zero, changed is
never added as a key to the dictionary. As a result the code at the end
of main that checks if anything has changed raises a KeyError.

(cherry picked from commit 02d0e3d286)

Co-authored-by: Matthew Martin <phy1729@gmail.com>
2021-09-20 19:49:48 +02:00
patchback[bot]
ad9b4ac781 Install nios test requirements. (#3375) (#3376)
(cherry picked from commit b20fc7a7c3)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-15 08:09:34 +02:00
Ajpantuso
0b98534df1 Manually merging BOTMETA (#3356) 2021-09-09 15:43:14 +02:00
Felix Fontein
da0738badf Improve CI (#3348) (#3352)
* Remove superfluous test.

* Use remote_temp_dir instead of output_dir on remote.

* Read certificate from correct place.

* Adjust more places.

* Fix boolean.

* Improve cryptography setup.

* Fix java_keystore changes.

* Need to copy binary from remote.

* Use correct Python for serve script.

* Sleep before downloading.

* Use correct Python interpreter.

* Avoid failing shebang test.

* Fix permission error with macOS 11.1.

* Avoid shebang trouble.

(cherry picked from commit 7c43cc3faa)
2021-09-09 08:10:26 +02:00
patchback[bot]
3735ee6df7 Fix copr integration tests (#3237) (#3324)
Fixes: #2084
(cherry picked from commit 7c493eb4e5)

Co-authored-by: Silvie Chlupova <33493796+schlupov@users.noreply.github.com>
2021-09-02 06:30:01 +02:00
patchback[bot]
de602a9b93 django_manage: Remove scottanderson42 and tastychutney as maintainers. (#3314) (#3316)
Note: tastychutney is another github account of mine that was also added as a maintainer.
(cherry picked from commit 135faf4421)

Co-authored-by: Scott Anderson <scott@waymark.com>
2021-08-31 18:33:08 +02:00
patchback[bot]
c64ab70c75 pamd - fixed issue+minor refactorings (#3285) (#3308)
* pamd - fixed issue+minor refactorings

* added changelog fragment

* added unit test suggested in issue

* Update tests/integration/targets/pamd/tasks/main.yml

* fixed per PR + additional adjustment

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-08-31 12:59:29 +02:00
patchback[bot]
bea5a6266c proxmox inventory plugin - Update examples documentation (#3299) (#3306)
* Initial commit

* Update plugins/inventory/proxmox.py

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-31 11:18:54 +02:00
patchback[bot]
a354dd463f Initial commit (#3300) (#3302)
(cherry picked from commit 58c6f6c95a)

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-08-31 10:22:37 +02:00
patchback[bot]
2414011428 udm_dns_record: Fix handling of PTR records (#3244) (#3256) (#3297)
* udm_dns_record: Fix handling of PTR records (#3244)

Before, it was not possible to manage PTR records in Univention DNS,
due to broken zone lookups and improper used parameters of the object.
This patch fixes the PTR handling, allowing both v4 and v6 entries.

* udm_dns_record: [doc] add changelog fragment

* udm_dns_record: [fix] validation errors

* udm_dns_record: import ipaddress module conditionally (#3244)

* udm_dns_record: fix sanity check error, improve doc (#3244)

* udm_dns_record: Improve changes to meet community standards (#3244)

(cherry picked from commit d9dcdcbbe4)

Co-authored-by: Sebastian Damm <SipSeb@users.noreply.github.com>
2021-08-30 19:05:38 +02:00
patchback[bot]
5b4bce3f88 [PR #3289/cf433567 backport][stable-2] Fix unit tests (#3292)
* Fix unit tests (#3289)

* Force new enough requests version.

* Revert "Force new enough requests version."

This reverts commit 339d40bef7.

* Make sure we don't install a too new python-gitlab for Ansible 2.10.

* Change requirement instead of appending new one.

* Fix quoting.

* Try to skip if import fails.

* Revert "Try to skip if import fails."

This reverts commit 254bbd8548.

* Make other Python versions happy...

* Update tests/utils/shippable/units.sh

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit cf43356753)

* Add newline.

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-29 13:19:55 +02:00
patchback[bot]
f21b41d3aa Fixed incorrect VMID: cloning to an existing VM (#3266) (#3281)
* Fixed incorrect VMID: cloning to an existing VM

During a cloning operation, if the destination VM already exists the VMID returned is not correct.
The VMID returned should be that of the destination VM and not that of the source VM (consistent with line 1230).
A playbook that relies on the returned VMID, for example, to perform other operations on the destination VM, will not work properly if it is unexpectedly interrupted.

* Add files via upload

* moved 3266-vmid-existing-target-clone.yml to changelogs/fragments/
replaced line separator CRLF -> LF

* storing vmid list in variable to avoid multiple API calls

(cherry picked from commit 4e2d4e3c68)

Co-authored-by: Atlas974 <43972908+Atlas974@users.noreply.github.com>
2021-08-27 19:04:00 +02:00
patchback[bot]
01e995abf2 Stop notifications for apache2_module for me (#3261) (#3270)
(cherry picked from commit e40aa69e77)

Co-authored-by: Robin Roth <robin@rroth.de>
2021-08-26 08:23:40 +02:00
patchback[bot]
760b1e2cad nmcli: allow IPv4/IPv6 configuration on ipip and sit devices (#3239) (#3254)
* Allow IPv4/IPv6 configuration on mode "sit" tunnel devices

* Update Unit Test for Allow IPv4/IPv6 configuration on mode "sit" tunnel devices

* Add changelog for Allow IPv4/IPv6 configuration on mode "sit" tunnel devices

* Update changelogs/fragments/3239-nmcli-sit-ip-config-bugfix.yaml

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Added ip4/ip6 configuration arguments for ipip tunnels

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
(cherry picked from commit 1ca9c35010)

Co-authored-by: zerotens <zerotens@users.noreply.github.com>
2021-08-23 18:38:18 +02:00
patchback[bot]
276fb08503 Temporarily disable datadog_downtime unit tests. (#3222) (#3223)
(cherry picked from commit f19e191467)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-17 06:34:05 +00:00
patchback[bot]
2d2bbb8fe3 Linode inventory plugin typo fixes (#3218) (#3220)
- Fix a typo in the Linode inventory plugin unit tests
- Fix some style issues in descriptions where punctuation was missing

Signed-off-by: Kellin <kellin@retromud.org>
(cherry picked from commit fccae19177)

Co-authored-by: Kellin <kellin@retromud.org>
2021-08-17 07:20:27 +02:00
patchback[bot]
f2b71f7874 vdo - refactor (#3191) (#3212)
* refactor to vdo

* adjusted if condition

* added changelog fragment

* Update plugins/modules/system/vdo.py

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

* adjustements per the PR

* more occurrences of bool compared with yes or no

* Update changelogs/fragments/3191-vdo-refactor.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-08-16 12:33:01 +00:00
patchback[bot]
9c36a23a2d Add ipv4 example to linode inventory docs (#3200) (#3208)
* Add ipv4 example to linode inventory

* Update plugins/inventory/linode.py

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

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

Co-authored-by: Paul Hauner <paul@paulhauner.com>
2021-08-15 13:25:22 +02:00
Felix Fontein
bc02dc4c44 [PR #3194/1fec1d0c backport][stable-3] Fix sanity failures (#3195) (#3196)
* Fix new devel sanity errors. (#3194)

(cherry picked from commit 1fec1d0c81)

* Add two more.

* Fix PR #.

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

Co-authored-by: patchback[bot] <45432694+patchback[bot]@users.noreply.github.com>
2021-08-12 14:17:01 +02:00
Felix Fontein
d85908da6e Next expected release is 2.5.6. 2021-08-10 19:46:46 +02:00
Felix Fontein
e4741d8ff6 Release 2.5.5. 2021-08-10 17:02:32 +02:00
patchback[bot]
d9c12d1d53 Support older version of psutil (RHEL7 and RHEL6) (#2808) (#3188)
* Support older version of psutil (RHEL7 and RHEL6)

The psutil python module is a true mess, they changed the API twice. The function arguments, as well as the objects that are returned.
The documentation does not make it clear which version supports what so the safest implementation is this waterfall approach.

A better approach would be to inspect the returned information, rather than trust a version, but that would not be any more efficient.
In the end it is better to have something that at least works out-of-the-box on all platforms than something that requires custom updates to system packages before it works as expected. Especially for something as basic as `pids`.

* A little bit more concise

* Apply suggestions from code review

* Add changelog fragment.

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

Co-authored-by: Dag Wieers <dag@wieers.com>
2021-08-10 08:08:46 +02:00
Felix Fontein
29c4cff580 Prepare 2.5.5 release. 2021-08-10 07:52:05 +02:00
patchback[bot]
1d07d6e3b5 openbsd_pkg: Fix regexp matching crash (#3161) (#3185)
When a package name contains special characters (e.g. "g++"), they are
interpreted as part of the regexp.

This can lead to a crash with an error in the python re module, for
instance with "g++":

    sre_constants.error: multiple repeat

Fix this by escaping the package name.

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
(cherry picked from commit 56b5be0630)

Co-authored-by: zorun <github@bitsofnetworks.org>
2021-08-09 23:02:49 +02:00
patchback[bot]
3b9a571bd4 Update the .gitignore with the latest version (#3177) (#3183)
This because it contains new changes, e.g. ignore development
environments for Python projects.

(cherry picked from commit 429359e977)

Co-authored-by: Roy Lenferink <lenferinkroy@gmail.com>
2021-08-09 17:01:02 +02:00
Daniel Ziegenberg
009c88dc64 [PR #3074/2831bc45 backport][stable-2] ini_file: fix empty-value vs. no-value inconsistency (#3181)
* ini_file: fix empty-value vs. no-value inconsistency (#3074)

* fix empty-value vs. no-value inconsistency

* rename changelog fragment

* tests: omit value where there should be no value

* add integration tests

(cherry picked from commit 2831bc45f5)

* fixup backport

Co-authored-by: quidame <quidame@poivron.org>
2021-08-09 16:31:24 +02:00
patchback[bot]
e9356ad8fa contributing: make expected behavior clearer (#3168) (#3175)
* contributing: make expected behavior clearer

reformulate the preference of not having squashed commits clearer,
shorter and more precise.

https://github.com/ansible-collections/community.general/pull/3164#discussion_r684644504

* Update CONTRIBUTING.md

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

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

Co-authored-by: Sebastian <sebix@sebix.at>
2021-08-08 11:48:35 +02:00
patchback[bot]
7c18dbaf70 Inform contributors on changelog fragments in CONTRIBUTING.md (#3167) (#3172)
* Inform contributors on changelog fragments.

* Mention docs-only PRs as well.

(cherry picked from commit 87ba15fa45)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-08 11:47:57 +02:00
patchback[bot]
95d8364025 Update AZP config (#3111) (#3153)
* Update AZP config.

* Skip 8.4 as well for django_manage (next to 8.3 and 8.2).

* Temporarily skip 8.4 for yum_versionlock.

(cherry picked from commit 16476f5cb9)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-06 07:52:40 +02:00
patchback[bot]
48b0a48b76 Updated the tss lookup plugin to reflect breaking changes introduced in the underpinning SDK (#3139) (#3151)
* Updated the plugin to reflect breaking changes introduced in the underlying SDK v1.0.0 update.

* Added Changelog fragment

* Updates based on feedback/review

* Added newline to pass CI

* Added whitepace for linter

* Update changelogs/fragments/3139-tss-lookup-plugin-update-to-make-compatible-with-sdk-v1.yml

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
(cherry picked from commit a73720c103)

Co-authored-by: Ricky White <rickywhite@outlook.com>
2021-08-05 22:41:29 +02:00
patchback[bot]
ef3d81b947 utf8 marker batch1 (#3127) (#3129)
* added utf-8 markers to all .py files in plugins/{action,cache,callback}

* added utf-8 markers to all .py files in plugins/connection

* added utf-8 markers to all .py files in plugins/doc_fragments

(cherry picked from commit 73c27d6a0e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-08-01 15:46:43 +02:00
patchback[bot]
a0e32eaf62 fixed RETURN doc (#3120) (#3122)
(cherry picked from commit 5f8d6a73d3)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-07-31 09:38:26 +02:00
patchback[bot]
0e17d74b15 deploy_helper - changed in-code condition to required_if (#3104) (#3107)
* changed in-code condition to required_if

* added changelog fragment

(cherry picked from commit cde9564163)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-07-29 08:04:13 +02:00
patchback[bot]
a1682efa38 ejabberd_user - refactoring and simplification (#3093) (#3099)
* ejabberd_user - refactoring and simplification

* added changelog fragment

* Update changelogs/fragments/3093-ejabberd_user-refactor.yaml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-07-28 08:57:26 +02:00
Felix Fontein
0fda418702 [stable-2] added supports_check_mode=True to info/facts modules (#3095)
* added supports_check_mode=True to info/facts modules (#3084)

* added supports_check_mode=True to info/facts modules

* added changelog fragment

* rolled back vertica_info

* rolled back utm_proxy_*_info

* updated changelog fragment with latest adjustments

* Update changelogs/fragments/3084-info-checkmode.yaml

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

* added check mode to xenserver_facts + oneview_*_info

* added check mode to utm_proxy_*_info

* updated changelog

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

* Also fix modules removed in 3.0.0.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-07-28 07:42:07 +02:00
patchback[bot]
ca561aead8 java_cert: import certificate+key bundle from pkcs12 (#3080) (#3085)
* import certificate+key bundle from pkcs12

* fix typo/syntax

* fix variable name

* fix passwords order and improve error handling

* add changelog fragment

* enter keystore pass only once if keystore already exists, and twice at creation

* nomalize tests

- Replace `command` tasks by dedicated (community.crypto) modules.
- Add spaces around jinja2 variable names.
- Call modules by their FQCNs.

* Add tests to check keystore has a private key

fix tests for RedHat/CentOS < 8 (run openssl command as an alternative to
`openssl_pkcs12` module)

(cherry picked from commit 21d5668c97)

Co-authored-by: quidame <quidame@poivron.org>
2021-07-26 11:58:11 +02:00
patchback[bot]
58e56e11bd Succesful clone from proxmox_kvm should return new vm id, not id from cloned vm. (#3034) (#3082)
* Clone sucess should return new vm id, not id from cloned vm.

* add changelog fragment

* Update changelogs/fragments/3034-promox-kvm-return-new-id.yaml

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

Co-authored-by: Yvan E. Watchman <git@yvanwatchman.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ac03881002)

Co-authored-by: Yvan Watchman <ik@yvanwatchman.eu>
2021-07-26 10:42:34 +02:00
patchback[bot]
3df8ac28e1 taiga_issue - bugfix + pythonification (#3067) (#3076)
* taiga_issue - bugfix + pythonification

* added changelog fragment

(cherry picked from commit 95ceb53676)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-07-25 23:15:22 +02:00
Ajpantuso
1da0db4984 [PR #3036/31189e96 backport][stable-2] archive - fixing determination of archive root when root is '/' (#3065)
* archive - fixing determination of archive root when root is '/' (#3036)

* Initial commit

* Fixing units and path joins

* Ensuring paths are consistently ordered

* Adding changelog fragment

* Using os.path.join to ensure trailing slashes are present

* optimizing use of root in add_targets

* Applying initial review suggestions

(cherry picked from commit 31189e9645)

* removing unneccessary addition
2021-07-25 09:52:37 +02:00
patchback[bot]
4281331639 gitlab_group_members/gitlab_project_members - fix pagination issue (#3054) (#3060)
* Fix

* fixed linter stuff

* typo in section name of changlog fragment

Co-authored-by: Max Bidlingmaier <Max-Florian.Bidlingmaier@sap.com>
(cherry picked from commit d057b2e3b2)

Co-authored-by: Max Bidlingmaier <maks@konsolan.de>
2021-07-24 21:24:15 +02:00
patchback[bot]
0ba92cd677 proxmox inventory plugin: Easy fix (#3052) (#3058)
* Don't know why this works but it does.

Plugin was crashing on this line on Python 3.9.2 deployed on qemu image with debian bullseye. It doesn't crash anymore.

* Create 3052_proxmox_inventory_plugin.yml

* Update changelogs/fragments/3052_proxmox_inventory_plugin.yml

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
(cherry picked from commit 99c28313e4)

Co-authored-by: The Right Honourable Reverend <samueljsmith@gmail.com>
2021-07-24 20:58:13 +02:00
patchback[bot]
8df0c82b8b fixed doc in xfconf (#3050) (#3055)
(cherry picked from commit 9631de4939)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-07-23 09:34:29 +02:00
patchback[bot]
af0ee5438c [PR #3019/27ba98a6 backport][stable-2] Check targets (#3021)
* Check targets (#3019)

* Add extra sanity test to check aliases files.

* Remove invalid target name.

(cherry picked from commit 27ba98a68e)

* Enable tests (#3015)

* Enable tests.

* Fix error message check.

* Fix boolean tests.

* Adjust to Python version.

(cherry picked from commit 9b1c6f0743)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-16 20:33:06 +02:00
patchback[bot]
4391507a72 Redfish Bootoverride Disable behaves incorrectly (#3006) (#3016)
* https://github.com/ansible-collections/community.general/issues/3005

Bypass the boot device argument check when the command is: DisableBootOverride
as it isn't needed to perform this operation.

* Add changelog fragment

(cherry picked from commit ea822c7bdd)

Co-authored-by: Scott Seekamp <sylgeist@users.noreply.github.com>
2021-07-16 19:18:42 +02:00
patchback[bot]
acc77182bb pamd - fixed single line issue (#2989) (#3012)
* fixed pamd single line issue

* added changelog fragment

* supported case for 0 lines, improved test

(cherry picked from commit a3a40f6de3)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-07-14 13:22:01 +02:00
patchback[bot]
34f963e2f4 Update README.md (#3003) (#3009)
(cherry picked from commit 28193b699b)

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
2021-07-14 08:46:16 +02:00
patchback[bot]
e3e25b60d3 proxmox inventory - fix parsing for offline nodes (#2967) (#2984)
* Initial commit

* Adding changelog fragment

* Applying initial review suggestions

(cherry picked from commit 111c5de550)

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-07-10 16:56:01 +02:00
patchback[bot]
754cd31195 launchd - fixed validation check (#2960) (#2975)
* replaced use of expanduser() with value from HOME var

* fixed sanity check

* added changelog fragment

(cherry picked from commit 1990f79d8a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-07-10 13:49:24 +02:00
patchback[bot]
641f8b3059 Temporarily disable passwordstore lookup tests on macOS and OSX. (#2979) (#2981)
(cherry picked from commit 4ae392e5de)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-10 13:49:15 +02:00
John R Barker
03d33a1d09 Update commit-rights.md (#2965)
aminvakil is no longer involved with the Ansible Community due to United
States export controls and economic sanctions laws apply to U.S.
persons, entities, and controlled software and technology that is of
U.S. origin or that enters the U.S., including open source software.

(cherry picked from commit 518ace2562)
2021-07-09 12:05:36 +01:00
patchback[bot]
ce92da7e70 pacman: fix changed status when ignorepkg has been defined (#2936) (#2944)
* pacman: fix returned code when ignorepkg has been defined

* add changelog

* make ignored check preciser

(cherry picked from commit c0740ca398)

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-07-07 06:53:34 +02:00
patchback[bot]
ea873ae471 lvol: honor check_mode on thinpool (#2935) (#2938)
* lvol: support check_mode on thinpool

* add changelog

* Add %s when needed

* correct changelog sentence

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

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-07-05 21:03:04 +02:00
patchback[bot]
859bebbfc5 npm - fix installing from package.json (#2924) (#2928)
correctly handle cases where a dependency does not have a `version` property because it is either missing or invalid

(cherry picked from commit a0915036f9)

Co-authored-by: Shahar Mor <shaharmor1@gmail.com>
2021-07-02 21:57:51 +02:00
patchback[bot]
257b268746 archive - fix removal failures for nested files with tar archives (#2923) (#2926)
* Initial commit

* Adding changelog fragment

(cherry picked from commit ffe505a798)

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-07-02 21:43:25 +02:00
Ajpantuso
55ce4af134 Manually backporting to stable-2 (#2865) 2021-07-01 07:46:33 +02:00
Felix Fontein
f6afc0f019 Next release will be 2.5.5. 2021-06-29 08:45:22 +02:00
Felix Fontein
16eb0b8749 Release 2.5.4. 2021-06-29 05:57:50 +02:00
patchback[bot]
e8eb6c1163 [nmcli] add connection.slave-type for teamed devices (#2827) (#2899)
* [nmcli] add connection.slave-type for teamed devices

* [nmcli] add fragment with changes for #2827

* [nmcli] add tests for network team

* [nmcli] fix testing

Co-authored-by: Oriol MULA VALLS <oriol.mula@lxp.lu>
(cherry picked from commit 2d1527a564)

Co-authored-by: omula <joriol.mula@gmail.com>
2021-06-28 21:12:57 +02:00
Felix Fontein
21c16ae0b3 Prepare 2.5.4 release. 2021-06-28 07:03:25 +02:00
patchback[bot]
175c481236 pacman: Descriptive state documentation (#2894) (#2897)
* pacman: Descriptive state documentation

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

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

Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit debb15efbe)

Co-authored-by: Martin <spleefer90@gmail.com>
2021-06-27 19:05:38 +02:00
patchback[bot]
85d1fecd80 Fix/gitlab project user workspace (#2881) (#2890)
* Add ability to create project under a user

* Add changelog

* Change minor_changes in changelog

As suggested in this comment https://github.com/ansible-collections/community.general/pull/2824#discussion_r653411741

* Fix user's namespace

* Delete changelog

* Add changelog

* Fix changelog

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

* Change user_group_id to namespace_group_id

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

* Change to namespace_id

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
(cherry picked from commit 2fb0877577)

Co-authored-by: Stef Graces <stef.graces@nubera.eu>
2021-06-27 14:19:05 +02:00
Felix Fontein
05aaeb3fce _mount module utils - fixed sanity checks (#2883) (#2885)
* updated _mount.py, removed ignore lines

* added changelog fragment

(cherry picked from commit acf7b106c9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-06-27 09:59:25 +02:00
patchback[bot]
d5cf5bf567 modprobe - fix task status when module cannot be loaded (#2843) (#2879)
* Initial Commit

* Adding changelog fragment

* Ensured params are present during verbose output and enhanced check_mode

* Making specific to builtins

* Removing unneccessary external call

* Acutal bugfix

(cherry picked from commit d180390dbc)

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-06-26 13:45:17 +02:00
patchback[bot]
024ef1d782 Adjust example to remove unnecessary offensive language. (#2869) (#2871)
(cherry picked from commit d2a984ded1)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-25 06:49:11 +02:00
patchback[bot]
4e06d778ab [PR #2633/07085785 backport][stable-2] Dynamically add meta/runtime.yml redirects for integration tests to correctly report coverage (#2854)
* Dynamically add meta/runtime.yml redirects before integration tests. (#2633)

ci_coverage

(cherry picked from commit 07085785a3)

* Remove superfluous files.

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-22 09:13:40 +02:00
Amin Vakil
72d0c21f56 [backport][stable-2] proxmox_kvm: Fix ZFS device string parsing (#2841) (#2849)
* proxmox_kvm: Fix ZFS device string parsing (#2841)

ZFS-backed block devices may contain just the bare device name and
not have extra options like `,size=foo`, `,format=qcow2` etc. This
breaks an assumption in existing regex (which expects a comma).

Support such device strings and add a couple of testcases to validate.

* Fix

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

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

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

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

Co-authored-by: Anup Chenthamarakshan <anupcshan@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-21 12:40:28 +02:00
patchback[bot]
f9438bd3c6 npm - fix updating version specific modules (#2830) (#2838)
* npm - fix updating version specific modules

if a version specific module is used, the comparison will be used with the version and not only by name

* Update plugins/modules/packaging/language/npm.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update changelogs/fragments/2830-npm-version-update.yml

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Update changelogs/fragments/2830-npm-version-update.yml

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

* Update changelogs/fragments/2830-npm-version-update.yml

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
(cherry picked from commit 1ed4394c5e)

Co-authored-by: Shahar Mor <shaharmor1@gmail.com>
2021-06-18 22:50:28 +02:00
patchback[bot]
76377dd5bf fix sudorule_add_allow_command_group (#2821) (#2832)
* fix sudorule_add_allow_command_group

fix sudorule_add_allow_command_group is not working on freeIPA 4.8.7 at least, sudorule_add_allow_command should be used instead with item sudocmdgroup

* Added changelog fragment

(cherry picked from commit ee23c26150)

Co-authored-by: TizeN85 <tenou.sylvain@outlook.com>
2021-06-17 19:42:57 +02:00
patchback[bot]
f22fd3c121 Update README (#2802) (#2828)
* Update README

* Update README.md

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

* Change

* Fix

* Update README.md

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

* Update README.md

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

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Update README.md

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e9f3455b62)

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
2021-06-17 13:39:00 +02:00
patchback[bot]
640f5fd860 Rename test_pr_quick_start_guide.rst to test_pr_locally_guide.rst (#2823) (#2825)
(cherry picked from commit 13ab8f412d)

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-17 13:38:30 +02:00
patchback[bot]
c670216e27 pamd: Add a note in docs about authselect profiles (#2815) (#2819)
pamd module does not handle or modify authselect profiles
which are basically template files for authselect. The autheselect
generates pam.d files from these profiles.

Fixes: #1954

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-16 22:25:40 +02:00
patchback[bot]
ed8de04cab Add Test PRs locally section to CONTRIBUTING.md (#2738) (#2812)
* Add Test PRs locally section to CONTRIBUTING.md

* fix formatting

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

* Adjust PR now that ansible-collections/community-docs#16 has been merged

* improve sentence

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

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-15 20:20:35 +02:00
patchback[bot]
7c4e11f504 BOTMETA.yml: grant supershipit (#2807) (#2810)
(cherry picked from commit b1b34ee12e)

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
2021-06-15 19:11:24 +02:00
patchback[bot]
5ee3d77924 BOTMETA.yml: supershipit to quidame (#2801) (#2805)
(cherry picked from commit bccf317814)

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
2021-06-14 21:00:18 +02:00
patchback[bot]
9b4dd42813 Make extra sanity test runner produce ansibullbot and JUnit output. (#2794) (#2799)
(cherry picked from commit a55c96d5c1)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-14 07:48:56 +02:00
patchback[bot]
049cace2e7 CI: Remove scripts that are no longer needed (#2793) (#2795)
* Remove scripts that are no longer needed.

ci_complete

* Remove sanity ignores.

(cherry picked from commit d4c4d00ad1)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-14 05:43:28 +02:00
patchback[bot]
6418098602 Documentation fix for access_level parameter of gitlab_runner (#2788) (#2791)
* * Documentation fix for access_level parameter of gitlab_runner

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Address reviewer's comments

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
(cherry picked from commit 343339655d)

Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
2021-06-13 09:08:39 +02:00
patchback[bot]
4177da9560 scaleway: Misc doc changes (#2776) (#2785)
* Updated example section for ``variables``
* Added link about token generation
* Misc changes in doc

Fixes: #467

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-11 19:29:07 +02:00
patchback[bot]
d451fc6292 [scaleway inventory] Fix JSON object must be str, not 'bytes' (#2771) (#2782)
* Fix JSON object decoding

* Code improvement : python 3.5 fix

* Add changelog fragment

* Update changelogs/fragments/2771-scaleway_inventory_json_accept_byte_array.yml

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

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

Co-authored-by: Loïc <loic.latreille@gmail.com>
2021-06-11 13:23:45 +02:00
Felix Fontein
b3450ab331 Next expected release is 2.5.4. 2021-06-08 13:44:52 +02:00
Felix Fontein
eac1dfdc78 Release 2.5.3. 2021-06-08 13:00:19 +02:00
patchback[bot]
930b64226c with great powers come great responsibility (#2755) (#2758)
(cherry picked from commit eef645c3f7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-06-08 10:58:47 +02:00
Felix Fontein
885bb73cc6 ModuleHelper - also uses LC_ALL to force language (#2731) (#2737)
* also uses LC_ALL to force language

* adjusted test_xfconf and test_cpanm

* added changelog fragment

* Update changelogs/fragments/2731-mh-cmd-locale.yml

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

* adjusted chglog frag per PR

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-06-08 10:54:46 +02:00
Felix Fontein
6afde82f2c Prepare 2.5.3 release. 2021-06-08 09:26:18 +02:00
patchback[bot]
62d53eb3cf zypper_repository: fix idempotency on adding repo with releasever and basearch variables (#2722) (#2752)
* zypper_repository: Check idempotency on adding repo with releasever

* Name required when adding non-repo files.

* Initial try to fix releasever

* Replace re.sub with .replace

* name releaseverrepo releaseverrepo

* Change  to ansible_distribution_version for removing repo

* improve asserts format

* add changelog

* Fix changelog formatting

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

* improve command used for retrieving releasever variable

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

* add basearch replace

* Add basearch to changelog fragment

* Check for releasever and basearch only when they are there

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-08 08:47:11 +02:00
patchback[bot]
1ae9bcc2dd Re-enable flatpak_remote tests (#2747) (#2748)
* Automate test repo creation, re-enable flatpak_remote tests.

* Linting.

* Another try.

(cherry picked from commit 4c50f1add7)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-07 21:48:40 +02:00
patchback[bot]
1533b5b244 Remove aminvakil from supershipit section as it is not needed anymore (#2743) (#2745)
(cherry picked from commit 7c3f2ae4af)

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-07 17:02:21 +02:00
patchback[bot]
99295fac75 Add aminvakil to committers (#2739) (#2741)
(cherry picked from commit 1e34df7ca0)

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-06-07 16:01:26 +02:00
patchback[bot]
434ff80ec6 iptables_state: fix async status call (-> action plugin) (#2711) (#2728)
* fix call to async_status (-> action plugin)

* add changelog fragment

* Apply suggestions from code review

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

* rename a local variable for readability

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

Co-authored-by: quidame <quidame@poivron.org>
2021-06-06 18:10:26 +02:00
patchback[bot]
be6d3e9aa1 Wire token param into consul_api #2124 (#2126) (#2725)
* Wire token param into consul_api #2124

* Update changelogs/fragments/2124-consul_kv-pass-token.yml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* #2124 renamed release fragment to match pr, removed parse_params.

* putting look back in, do some linting   #2124

* try more linting

* linting

* try overwriting defaults in parse_params with get_option vals, instead of removing that function completely.

* Revert "back to start, from 2nd approach: allow keyword arguments via parse_params for compatibility."

This reverts commit 748be8e366.

* Revert " linting"

This reverts commit 1d57374c3e.

* Revert " try more linting"

This reverts commit 91c8d06e6a.

* Revert "putting look back in, do some linting   #2124"

This reverts commit 87eeec7180.

* Revert " #2124 renamed release fragment to match pr, removed parse_params."

This reverts commit d2869b2f22.

* Revert "Update changelogs/fragments/2124-consul_kv-pass-token.yml"

This reverts commit c50b1cf9d4.

* Revert "Wire token param into consul_api #2124"

This reverts commit b60b6433a8.

* minimal chnages for this PR relative to current upstream.

* superfluous newline in changlog fragment.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 0e6d70697c)

Co-authored-by: fkuep <flo.kuepper@gmail.com>
2021-06-05 23:03:48 +02:00
patchback[bot]
b06d46f4d1 Reduce stormssh searches based on host (#2568) (#2723)
* Reduce stormssh searches based on host

Due to the stormssh searches in the whole config values, we need to reduce the search results based on the full matching of the hosts

* Removed whitespaces in the blank line

* Added changelog fragment and tests for the fix.

* Added newline at the end of the changelog fragment

* Added newline at the end of the tests

* Fixed bug with name in tests

* Changed assertion for the existing host

* Update changelogs/fragments/2568-ssh_config-reduce-stormssh-searches-based-on-host.yml

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

* Adjusted tests

* New line at the end of the tests

Co-authored-by: Anton Nikolaev <anikolaev@apple.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1a4af9bfc3)

Co-authored-by: Anton Nikolaev <drenout@gmail.com>
2021-06-05 16:03:10 +00:00
patchback[bot]
acea90ceec Terraform: ensure workspace is reset to current value (#2634) (#2721)
* fix: ensure workspace is reset to current value

* chore: linter

* chore: changelog

(cherry picked from commit c49a384a65)

Co-authored-by: christophemorio <49184206+christophemorio@users.noreply.github.com>
2021-06-04 21:12:50 +02:00
patchback[bot]
034d09532e Fix repeated word in description of fs_type (#2717) (#2718)
(cherry picked from commit a343756e6f)

Co-authored-by: Alex Willmer <al.willmer@cgi.com>
2021-06-04 21:12:37 +02:00
patchback[bot]
f815bef3d1 Fix action plugin BOTMETA entries. (#2707) (#2713)
(cherry picked from commit 4396ec9631)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-04 11:13:25 +02:00
patchback[bot]
e205494c8c BOTMETA.yml: remove myself from zypper_repository (#2701) (#2702)
(cherry picked from commit d93bc039b2)

Co-authored-by: Matthias Vogelgesang <matthias.vogelgesang@gmail.com>
2021-06-04 06:40:28 +02:00
patchback[bot]
1541eecd0e iptables_state: fix broken query of async_status result (#2671) (#2675)
* use get() rather than querying the key directly

* add a changelog fragment

* re-enable CI tests

* Update changelog fragment

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

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

Co-authored-by: quidame <quidame@poivron.org>
2021-05-29 13:54:32 +02:00
patchback[bot]
6cd87580da proxmox_kvm - Fixed vmid result when VM with name exists (#2648) (#2673)
* Fixed vmid result when VM with name exists

* Adding changelog fragment

(cherry picked from commit b281d3d699)

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-05-29 08:50:06 +00:00
patchback[bot]
d227ace4a0 Stop mentioning Freenode. We're on Libera.chat. (#2666) (#2668)
(cherry picked from commit 14813a6287)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-28 07:26:22 +02:00
patchback[bot]
e7770b9132 Add extra docs tests (#2663) (#2664)
* Add extra docs tests.

* Linting.

* Fix copy'n'paste error.

(cherry picked from commit 14f13904d6)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-28 06:48:57 +02:00
patchback[bot]
d0f1d9efd9 xml: Add an example for absent (#2644) (#2655)
Element node can be deleted based upon the attribute
value.

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 20:19:39 +02:00
patchback[bot]
22f0747e03 Fix drain example with correct wait values (#2603) (#2657)
(cherry picked from commit 95794f31e3)

Co-authored-by: Merouane Atig <merwan@users.noreply.github.com>
2021-05-27 20:15:28 +02:00
patchback[bot]
2ee7de681a fix a regression in initialization_from_null_state() (iptables-nft > 1.8.2) (#2604) (#2645)
(cherry picked from commit 909e9fe950)

Co-authored-by: quidame <quidame@poivron.org>
2021-05-27 07:16:34 +00:00
patchback[bot]
2e20e9bb8f Temporarily disable iptables_state tests. (#2641) (#2642)
(cherry picked from commit b45298bc43)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-27 08:28:43 +02:00
patchback[bot]
9d9e2bd797 Add one-liner lookup example (#2615) (#2637)
* Add one-liner lookup example

* Remove trailing whitespace

* Update plugins/lookup/tss.py

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

* Update plugins/lookup/tss.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
(cherry picked from commit 26757edfb2)

Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2021-05-27 08:25:44 +02:00
patchback[bot]
d9aa9e8021 influxdb_user: Fix bug introduced by PR 2499 (#2614) (#2639)
* Update influxdb_user.py

Fixed function name

* Create 2614-influxdb_user-fix-issue-introduced-in-PR#2499

Added changelog

* Rename 2614-influxdb_user-fix-issue-introduced-in-PR#2499 to 2614-influxdb_user-fix-issue-introduced-in-PR#2499.yml

Fixed extension

* Update changelogs/fragments/2614-influxdb_user-fix-issue-introduced-in-PR#2499.yml

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
(cherry picked from commit 4aa50962cb)

Co-authored-by: sgalea87 <43749726+sgalea87@users.noreply.github.com>
2021-05-27 08:23:11 +02:00
patchback[bot]
a9eeced6d7 Use become test framework for sudosu tests. (#2629) (#2630)
(cherry picked from commit 0b4a2bea01)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-26 10:47:02 +02:00
patchback[bot]
066b306deb Add CONTRIBUTING.md (#2602) (#2625)
* Initial file shamelessly copied from community.mysql

* Add some notes on pull requests

* Add CONTRIBUTING.md link to README.md

* Add quick-start development guide link

* Apply felixfontein's suggestions

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

* add note about rebasing and merge commits

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

* add note about easyfix and waiting_on_contributor tags

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

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-26 10:09:19 +02:00
patchback[bot]
7426c3839e redis cache - better parsing of connection uri (#2579) (#2621)
* better parsing of connection uri

* added changelog fragment

* fixed tests for ansible 2.9

* Update tests/unit/plugins/cache/test_redis.py

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

* Update tests/unit/plugins/cache/test_redis.py

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

* Adjustments from PR

* Update test_redis.py

* Update test_redis.py

* Update plugins/cache/redis.py

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

* Update plugins/cache/redis.py

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

* Update tests/unit/plugins/cache/test_redis.py

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-05-26 09:59:58 +02:00
patchback[bot]
4d6735bebf jenkins_plugin: HTTP Error 405: Method Not Allowed on disable/enable plugin #2510 (#2511) (#2618)
* define POST method for pluginManager api requests

Jenkins makeEnable/makeDisable api requests requires to use POST method

* add changelog fragment

* fix my yoda lang thx to aminvakil

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

* update changelog fragment

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6df3685d42)

Co-authored-by: Alexander Moiseenko <brainsam@yandex.ru>
2021-05-26 07:29:09 +02:00
patchback[bot]
1ceed02048 Use str() to get exception message (#2590) (#2610)
(cherry picked from commit 63012eef82)

Co-authored-by: DasSkelett <dasskelett@gmail.com>
2021-05-25 13:59:51 +02:00
patchback[bot]
6dc31b13c3 json_query, no more 'unknown type' errors (#2607) (#2612)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit d871399220)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2021-05-25 13:59:01 +02:00
patchback[bot]
c7899e384a rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases (#2571) (#2605)
* rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases.

* Fix the unit test error: The new release_matcher could pass a wider range of patterns but that would not cause extra issue to the whole module.

* Submit the changelog fragment.

* Update changelogs/fragments/2571-rhsm_release-fix-release_matcher.yaml

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
(cherry picked from commit 593d622438)

Co-authored-by: Tong He <68936428+unnecessary-username@users.noreply.github.com>
2021-05-24 20:28:22 +00:00
patchback[bot]
35c8bbec8a Massive adjustment in integration tests for changed and failed (#2577) (#2585)
* Replaced ".changed ==" with "is [not] changed". Same for failed

* Mr Quote refused to go

(cherry picked from commit d7e55db99b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-05-22 14:53:10 +02:00
patchback[bot]
87c37ea441 ovir4 inventory script (#2461) (#2582)
* update configparser

* changelog

* handle multiple python version

* Update changelogs/fragments/2461-ovirt4-fix-configparser.yml

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

* Update ovirt4.py

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

Co-authored-by: abikouo <79859644+abikouo@users.noreply.github.com>
2021-05-22 14:36:44 +02:00
patchback[bot]
0f7e39fa1a java_cert - fix incorrect certificate alias on pkcs12 import (#2560) (#2580)
* fix wrong certificate alias used when importing pkcs12, modify error output, stdout is more relevant than stderr

* add changelog fragment

* fix changelog fragment

(cherry picked from commit 8f083d5d85)

Co-authored-by: absynth76 <58172580+absynth76@users.noreply.github.com>
2021-05-22 13:51:24 +02:00
patchback[bot]
cde48c3c03 Add missing author name (#2570) (#2575)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 852e240525)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-21 19:44:05 +02:00
patchback[bot]
778c91caa7 removed supporting code for testing module "nuage" - no longer exists here (#2559) (#2562)
(cherry picked from commit 452a185a23)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-05-19 22:23:33 +02:00
patchback[bot]
61258c9216 iptables_state: fix per-table initialization command (#2525) (#2552)
* refactor initialize_from_null_state()

* Use a more neutral command (iptables -L) to load per-table needed modules.

* fix 'FutureWarning: Possible nested set at position ...' (re.sub)

* fix pylints (module + action plugin)

* unsubscriptable-object
* superfluous-parens
* consider-using-in
* unused-variable
* unused-import
* no-else-break

* cleanup other internal module_args if they exist

* add changelog fragment

* Apply suggestions from code review (changelog fragment)

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

* Remove useless plugin type in changelog fragment

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
(cherry picked from commit 2c1ab2d384)

Co-authored-by: quidame <quidame@poivron.org>
2021-05-18 12:27:34 +02:00
patchback[bot]
99e0f8a3a0 influxdb_user: allow creation of first user with auth enabled (#2364) (#2368) (#2547)
* influxdb_user: allow creation of first user with auth enabled (#2364)

* handle potential exceptions while parsing influxdb client error

* fix changelog

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

* influxdb_user: use generic exceptions to be compatible with python 2.7

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

Co-authored-by: Xabier Napal <xabiernapal@pm.me>
2021-05-17 19:18:46 +00:00
patchback[bot]
2dd159493b yum_versionlock: disable fedora34 integration test (#2536) (#2537)
* Disable yum_versionlock integration test on Fedora 34

* Remove --assumeyes and add a comment regarding this

* Update update task name

(cherry picked from commit da7e4e1dc2)

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-17 10:45:34 +02:00
patchback[bot]
28caeff7bd Use --assumeyes with explicit yum call. (#2533) (#2534)
(cherry picked from commit 2cc848fe1a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 08:27:22 +02:00
patchback[bot]
76cf21a05b fix error when cache is disabled (#2518) (#2531)
(cherry picked from commit 448b8cbcda)

Co-authored-by: Dennis Israelsson <dennis.israelsson@gmail.com>
2021-05-17 08:09:56 +02:00
patchback[bot]
64248acce6 Update influxdb_user.py Fixed Multiple No Privileges (#2499) (#2529)
* Update influxdb_user.py

Fixed Multiple No Privileges

* Update influxdb_user.py

Fixed line spaces

* Update influxdb_user.py

Fixed whitespace

* Create 2499-influxdb_user-fix-multiple-no-privileges.yml

Added changelog

(cherry picked from commit ea200c9d8c)

Co-authored-by: sgalea87 <43749726+sgalea87@users.noreply.github.com>
2021-05-17 08:09:46 +02:00
patchback[bot]
8ed5beb978 1085 updating the hcl whitelist to include all supported options (#2495) (#2527)
* 1085 updating the hcl whitelist to include all supported options

* Update changelogs/fragments/1085-consul-acl-hcl-whitelist-update.yml

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

Co-authored-by: Dillon Gilmore <dgilmor@rei.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5b77515308)

Co-authored-by: iridian <442359+iridian-ks@users.noreply.github.com>
2021-05-17 08:09:17 +02:00
patchback[bot]
9b7194be53 Run unit tests also with Python 3.10. (#2486) (#2487)
ci_complete

(cherry picked from commit 624eb7171e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-11 08:31:12 +02:00
Felix Fontein
984d9d91b8 Next expected release will be 2.5.3. 2021-05-11 07:52:00 +02:00
368 changed files with 3835 additions and 1913 deletions

View File

@@ -124,6 +124,7 @@ stages:
- test: 3.7
- test: 3.8
- test: 3.9
- test: '3.10'
- stage: Units_2_11
displayName: Units 2.11
dependsOn: []
@@ -185,8 +186,8 @@ stages:
test: macos/11.1
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.3
test: rhel/8.3
- name: RHEL 8.4
test: rhel/8.4
- name: FreeBSD 12.2
test: freebsd/12.2
- name: FreeBSD 13.0

22
.github/BOTMETA.yml vendored
View File

@@ -1,17 +1,14 @@
automerge: true
files:
plugins/:
supershipit: aminvakil russoz
supershipit: quidame
changelogs/fragments/:
support: community
$actions:
labels: action
$actions/aireos.py:
labels: aireos cisco networking
$actions/ironware.py:
maintainers: paulquack
labels: ironware networking
$actions/shutdown.py:
$actions/system/iptables_state.py:
maintainers: quidame
$actions/system/shutdown.py:
maintainers: nitzmahone samdoran aminvakil
$becomes/:
labels: become
@@ -711,8 +708,9 @@ files:
labels: zypper
ignore: dirtyharrycallahan robinro
$modules/packaging/os/zypper_repository.py:
maintainers: $team_suse matze
maintainers: $team_suse
labels: zypper
ignore: matze
$modules/remote_management/cobbler/:
maintainers: dagwieers
$modules/remote_management/dellemc/:
@@ -858,6 +856,8 @@ files:
labels: interfaces_file
$modules/system/iptables_state.py:
maintainers: quidame
$modules/system/shutdown.py:
maintainers: nitzmahone samdoran aminvakil
$modules/system/java_cert.py:
maintainers: haad absynth76
$modules/system/java_keystore.py:
@@ -957,11 +957,13 @@ files:
$modules/web_infrastructure/apache2_mod_proxy.py:
maintainers: oboukili
$modules/web_infrastructure/apache2_module.py:
maintainers: berendt n0trax robinro
maintainers: berendt n0trax
ignore: robinro
$modules/web_infrastructure/deploy_helper.py:
maintainers: ramondelafuente
$modules/web_infrastructure/django_manage.py:
maintainers: scottanderson42 russoz tastychutney
maintainers: russoz
ignore: scottanderson42 tastychutney
labels: django_manage
$modules/web_infrastructure/ejabberd_user.py:
maintainers: privateip

81
.gitignore vendored
View File

@@ -1,6 +1,6 @@
# Created by https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
# Edit at https://www.gitignore.io/?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
# Created by https://www.toptal.com/developers/gitignore/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
# Edit at https://www.toptal.com/developers/gitignore?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
### dotenv ###
.env
@@ -88,7 +88,7 @@ flycheck_*.el
.nfs*
### PyCharm+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
@@ -98,6 +98,9 @@ flycheck_*.el
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
@@ -118,6 +121,9 @@ flycheck_*.el
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
@@ -198,7 +204,6 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
@@ -225,13 +230,25 @@ htmlcov/
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
@@ -239,9 +256,19 @@ coverage.xml
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.python-version
# pipenv
@@ -251,12 +278,24 @@ target/
# install all needed dependencies.
#Pipfile.lock
# celery beat schedule file
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
@@ -264,10 +303,6 @@ celerybeat-schedule
# Rope project settings
.ropeproject
# Mr Developer
.mr.developer.cfg
.project
# mkdocs documentation
/site
@@ -279,9 +314,16 @@ dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
### Vim ###
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
@@ -299,11 +341,13 @@ tags
[._]*.un~
### WebStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# AWS User-specific
# Generated files
# Sensitive or high-churn files
@@ -314,6 +358,9 @@ tags
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
@@ -349,15 +396,27 @@ tags
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
### Windows ###
# Windows thumbnail cache files
Thumbs.db
@@ -384,4 +443,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk
# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
# End of https://www.toptal.com/developers/gitignore/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv

View File

@@ -6,6 +6,187 @@ Community General Release Notes
This changelog describes changes after version 1.0.0.
v2.5.6
======
Release Summary
---------------
Regular bugfix release.
Minor Changes
-------------
- pamd - minor refactorings (https://github.com/ansible-collections/community.general/pull/3285).
- vdo - minor refactoring of the code (https://github.com/ansible-collections/community.general/pull/3191).
Bugfixes
--------
- copr - fix chroot naming issues, ``centos-stream`` changed naming to ``centos-stream-<number>`` (for exmaple ``centos-stream-8``) (https://github.com/ansible-collections/community.general/issues/2084, https://github.com/ansible-collections/community.general/pull/3237).
- launchd - use private attribute to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- logdns callback plugin - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- maven_artifact - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- memcached cache plugin - change function argument names to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- netapp module utils - remove always-true conditional to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- nmcli - added ip4/ip6 configuration arguments for ``sit`` and ``ipip`` tunnels (https://github.com/ansible-collections/community.general/issues/3238, https://github.com/ansible-collections/community.general/pull/3239).
- one_template - change function argument name to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- online inventory plugin - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- online module utils - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- openbsd_pkg - fix crash from ``KeyError`` exception when package installs, but ``pkg_add`` returns with a non-zero exit code (https://github.com/ansible-collections/community.general/pull/3336).
- packet_device - use generator to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- packet_sshkey - use generator to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- pamd - code for ``state=updated`` when dealing with the pam module arguments, made no distinction between ``None`` and an empty list (https://github.com/ansible-collections/community.general/issues/3260).
- proxmox_kvm - clone operation should return the VMID of the target VM and not that of the source VM. This was failing when the target VM with the chosen name already existed (https://github.com/ansible-collections/community.general/pull/3266).
- saltstack connection plugin - fix function signature (https://github.com/ansible-collections/community.general/pull/3194).
- scaleway inventory script - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3195).
- scaleway module utils - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- udm_dns_record - fixed managing of PTR records, which can never have worked before (https://github.com/ansible-collections/community.general/pull/3256).
- ufw - use generator to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- vbox inventory script - change function argument name to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3195).
- vdo - boolean arguments now compared with proper ``true`` and ``false`` values instead of string representations like ``"yes"`` or ``"no"`` (https://github.com/ansible-collections/community.general/pull/3191).
v2.5.5
======
Release Summary
---------------
Maintenance release.
Bugfixes
--------
- ali_instance_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- archive - fixed ``exclude_path`` values causing incorrect archive root (https://github.com/ansible-collections/community.general/pull/2816).
- archive - fixed improper file names for single file zip archives (https://github.com/ansible-collections/community.general/issues/2818).
- archive - fixed incorrect ``state`` result value documentation (https://github.com/ansible-collections/community.general/pull/2816).
- archive - fixed task failure when using the ``remove`` option with a ``path`` containing nested files for ``format``s other than ``zip`` (https://github.com/ansible-collections/community.general/issues/2919).
- archive - fixing archive root determination when longest common root is ``/`` (https://github.com/ansible-collections/community.general/pull/3036).
- deploy_helper - improved parameter checking by using standard Ansible construct (https://github.com/ansible-collections/community.general/pull/3104).
- ejabberd_user - replaced in-code check with ``required_if``, using ``get_bin_path()`` for the command, passing args to ``run_command()`` as list instead of string (https://github.com/ansible-collections/community.general/pull/3093).
- gitlab_group_members - fixes issue when gitlab group has more then 20 members, pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
- gitlab_project_members - fixes issue when gitlab group has more then 20 members, pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
- gluster_heal_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- idrac_redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- ini_file - fix inconsistency between empty value and no value (https://github.com/ansible-collections/community.general/issues/3031).
- java_cert - import private key as well as public certificate from PKCS#12 (https://github.com/ansible-collections/community.general/issues/2460).
- launchd - fixed sanity check in the module's code (https://github.com/ansible-collections/community.general/pull/2960).
- lvol - honor ``check_mode`` on thinpool (https://github.com/ansible-collections/community.general/issues/2934).
- memset_memstore_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- memset_server_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- npm - correctly handle cases where a dependency does not have a ``version`` property because it is either missing or invalid (https://github.com/ansible-collections/community.general/issues/2917).
- ome_device_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- oneview_datacenter_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_enclosure_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_ethernet_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_fc_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_fcoe_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_logical_interconnect_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_network_set_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_san_manager_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- openbsd_pkg - fix regexp matching crash. This bug could trigger on package names with special characters, for example ``g++`` (https://github.com/ansible-collections/community.general/pull/3161).
- ovirt_affinity_label_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_api_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_cluster_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_datacenter_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_disk_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_event_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_external_provider_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_group_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_host_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_host_storage_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_network_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_nic_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_permission_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_quota_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_scheduling_policy_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_snapshot_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_storage_domain_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_storage_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_storage_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_tag_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_user_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_vmpool_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- pacman - fix changed status when ignorepkg has been defined (https://github.com/ansible-collections/community.general/issues/1758).
- pamd - fixed problem with files containing only one or two lines (https://github.com/ansible-collections/community.general/issues/2925).
- pids - avoid crashes for older ``psutil`` versions, like on RHEL6 and RHEL7 (https://github.com/ansible-collections/community.general/pull/2808).
- proxmox inventory plugin - fixed parsing failures when some cluster nodes are offline (https://github.com/ansible-collections/community.general/issues/2931).
- proxmox inventory plugin - fixed plugin failure when a ``qemu`` guest has no ``template`` key (https://github.com/ansible-collections/community.general/pull/3052).
- proxmox_kvm - fix result of clone, now returns ``newid`` instead of ``vmid`` (https://github.com/ansible-collections/community.general/pull/3034).
- purefa_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- rax_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- redfish_command - fix extraneous error caused by missing ``bootdevice`` argument when using the ``DisableBootOverride`` sub-command (https://github.com/ansible-collections/community.general/issues/3005).
- redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- smartos_image_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- snmp_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- taiga - some constructs in the module fixed to work also in Python 3 (https://github.com/ansible-collections/community.general/pull/3067).
- tss lookup plugin - fixed incompatibility with ``python-tss-sdk`` version 1.0.0 (https://github.com/ansible-collections/community.general/issues/3057, https://github.com/ansible-collections/community.general/pull/3139).
- utm_aaa_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- utm_ca_host_key_cert_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- utm_network_interface_address_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- utm_proxy_frontend_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- utm_proxy_location_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- xenserver_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- xfconf_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
v2.5.4
======
Release Summary
---------------
Regular bugfix release.
Bugfixes
--------
- _mount module utils - fixed the sanity checks (https://github.com/ansible-collections/community.general/pull/2883).
- gitlab_project - user projects are created using namespace ID now, instead of user ID (https://github.com/ansible-collections/community.general/pull/2881).
- ipa_sudorule - call ``sudorule_add_allow_command`` method instead of ``sudorule_add_allow_command_group`` (https://github.com/ansible-collections/community.general/issues/2442).
- modprobe - added additional checks to ensure module load/unload is effective (https://github.com/ansible-collections/community.general/issues/1608).
- nmcli - fixes team-slave configuration by adding connection.slave-type (https://github.com/ansible-collections/community.general/issues/766).
- npm - when the ``version`` option is used the comparison of installed vs missing will use name@version instead of just name, allowing version specific updates (https://github.com/ansible-collections/community.general/issues/2021).
- proxmox_kvm - fix parsing of Proxmox VM information with device info not containing a comma, like disks backed by ZFS zvols (https://github.com/ansible-collections/community.general/issues/2840).
- scaleway plugin inventory - fix ``JSON object must be str, not 'bytes'`` with Python 3.5 (https://github.com/ansible-collections/community.general/issues/2769).
v2.5.3
======
Release Summary
---------------
Regular bugfix release.
Bugfixes
--------
- consul_acl - update the hcl allowlist to include all supported options (https://github.com/ansible-collections/community.general/pull/2495).
- consul_kv lookup plugin - allow to set ``recurse``, ``index``, ``datacenter`` and ``token`` as keyword arguments (https://github.com/ansible-collections/community.general/issues/2124).
- influxdb_user - allow creation of admin users when InfluxDB authentication is enabled but no other user exists on the database. In this scenario, InfluxDB 1.x allows only ``CREATE USER`` queries and rejects any other query (https://github.com/ansible-collections/community.general/issues/2364).
- influxdb_user - fix bug where an influxdb user has no privileges for 2 or more databases (https://github.com/ansible-collections/community.general/pull/2499).
- influxdb_user - fix bug which removed current privileges instead of appending them to existing ones (https://github.com/ansible-collections/community.general/issues/2609, https://github.com/ansible-collections/community.general/pull/2614).
- iptables_state - call ``async_status`` action plugin rather than its module (https://github.com/ansible-collections/community.general/issues/2700).
- iptables_state - fix a 'FutureWarning' in a regex and do some basic code clean up (https://github.com/ansible-collections/community.general/pull/2525).
- iptables_state - fix a broken query of ``async_status`` result with current ansible-core development version (https://github.com/ansible-collections/community.general/issues/2627, https://github.com/ansible-collections/community.general/pull/2671).
- iptables_state - fix initialization of iptables from null state when adressing more than one table (https://github.com/ansible-collections/community.general/issues/2523).
- java_cert - fix issue with incorrect alias used on PKCS#12 certificate import (https://github.com/ansible-collections/community.general/pull/2560).
- jenkins_plugin - use POST method for sending request to jenkins API when ``state`` option is one of ``enabled``, ``disabled``, ``pinned``, ``unpinned``, or ``absent`` (https://github.com/ansible-collections/community.general/issues/2510).
- json_query filter plugin - avoid 'unknown type' errors for more Ansible internal types (https://github.com/ansible-collections/community.general/pull/2607).
- module_helper module utils - ``CmdMixin`` must also use ``LC_ALL`` to enforce locale choice (https://github.com/ansible-collections/community.general/pull/2731).
- netcup_dns - use ``str(ex)`` instead of unreliable ``ex.message`` in exception handling to fix ``AttributeError`` in error cases (https://github.com/ansible-collections/community.general/pull/2590).
- nmap inventory plugin - fix local variable error when cache is disabled (https://github.com/ansible-collections/community.general/issues/2512).
- ovir4 inventory script - improve configparser creation to avoid crashes for options without values (https://github.com/ansible-collections/community.general/issues/674).
- proxmox_kvm - fixed ``vmid`` return value when VM with ``name`` already exists (https://github.com/ansible-collections/community.general/issues/2648).
- redis cache - improved connection string parsing (https://github.com/ansible-collections/community.general/issues/497).
- rhsm_release - fix the issue that module considers 8, 7Client and 7Workstation as invalid releases (https://github.com/ansible-collections/community.general/pull/2571).
- ssh_config - reduce stormssh searches based on host (https://github.com/ansible-collections/community.general/pull/2568/).
- terraform - ensure the workspace is set back to its previous value when the apply fails (https://github.com/ansible-collections/community.general/pull/2634).
- xfconf - also use ``LC_ALL`` to enforce locale choice (https://github.com/ansible-collections/community.general/issues/2715).
- zypper_repository - fix idempotency on adding repository with ``$releasever`` and ``$basearch`` variables (https://github.com/ansible-collections/community.general/issues/1985).
v2.5.2
======

36
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,36 @@
# Contributing
We follow [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) in all our contributions and interactions within this repository.
If you are a committer, also refer to the [collection's committer guidelines](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md).
## Issue tracker
Whether you are looking for an opportunity to contribute or you found a bug and already know how to solve it, please go to the [issue tracker](https://github.com/ansible-collections/community.general/issues).
There you can find feature ideas to implement, reports about bugs to solve, or submit an issue to discuss your idea before implementing it which can help choose a right direction at the beginning of your work and potentially save a lot of time and effort.
Also somebody may already have started discussing or working on implementing the same or a similar idea,
so you can cooperate to create a better solution together.
* If you are interested in starting with an easy issue, look for [issues with an `easyfix` label](https://github.com/ansible-collections/community.general/labels/easyfix).
* Often issues that are waiting for contributors to pick up have [the `waiting_on_contributor` label](https://github.com/ansible-collections/community.general/labels/waiting_on_contributor).
## Open pull requests
Look through currently [open pull requests](https://github.com/ansible-collections/community.general/pulls).
You can help by reviewing them. Reviews help move pull requests to merge state. Some good pull requests cannot be merged only due to a lack of reviews. And it is always worth saying that good reviews are often more valuable than pull requests themselves.
Note that reviewing does not only mean code review, but also offering comments on new interfaces added to existing plugins/modules, interfaces of new plugins/modules, improving language (not everyone is a native english speaker), or testing bugfixes and new features!
Also, consider taking up a valuable, reviewed, but abandoned pull request which you could politely ask the original authors to complete yourself.
* Try committing your changes with an informative but short commit message.
* Do not squash your commits and force-push to your branch if not needed. Reviews of your pull request are much easier with individual commits to comprehend the pull request history. All commits of your pull request branch will be squashed into one commit by GitHub upon merge.
* Do not add merge commits to your PR. The bot will complain and you will have to rebase ([instructions for rebasing](https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html)) to remove them before your PR can be merged. To avoid that git automatically does merges during pulls, you can configure it to do rebases instead by running `git config pull.rebase true` inside the respository checkout.
* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#changelogs-how-to). (You must not include a fragment for new modules or new plugins, except for test and filter plugins. Also you shouldn't include one for docs-only changes. If you're not sure, simply don't include one, we'll tell you whether one is needed or not :) )
You can also read [our Quick-start development guide](https://github.com/ansible/community-docs/blob/main/create_pr_quick_start_guide.rst).
## Test pull requests
If you want to test a PR locally, refer to [our testing guide](https://github.com/ansible/community-docs/blob/main/test_pr_locally_guide.rst) for instructions on how do it quickly.
If you find any inconsistencies or places in this document which can be improved, feel free to raise an issue or pull request to fix it.

View File

@@ -3,12 +3,18 @@
[![Build Status](https://dev.azure.com/ansible/community.general/_apis/build/status/CI?branchName=stable-2)](https://dev.azure.com/ansible/community.general/_build?definitionId=31)
[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.general)](https://codecov.io/gh/ansible-collections/community.general)
This repo contains the `community.general` Ansible Collection. The collection includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.
This repository contains the `community.general` Ansible Collection. The collection is a part of the Ansible package and includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.
You can find [documentation for this collection on the Ansible docs site](https://docs.ansible.com/ansible/latest/collections/community/general/).
Please note that this collection does **not** support Windows targets. Only connection plugins included in this collection might support Windows targets, and will explicitly mention that in their documentation if they do so.
## Code of Conduct
We follow [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) in all our interactions within this project.
If you encounter abusive behavior violating the [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html), please refer to the [policy violations](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html#policy-violations) section of the Code of Conduct for information on how to raise a complaint.
## Tested with Ansible
Tested with the current Ansible 2.9, ansible-base 2.10 and ansible-core 2.11 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.
@@ -23,7 +29,9 @@ Please check the included content on the [Ansible Galaxy page for this collectio
## Using this collection
Before using the General community collection, you need to install the collection with the `ansible-galaxy` CLI:
This collection is shipped with the Ansible package. So if you have it installed, no more action is required.
If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole Ansible package, you need to install the collection from [Ansible Galaxy](https://galaxy.ansible.com/community/general) manually with the `ansible-galaxy` command-line tool:
ansible-galaxy collection install community.general
@@ -34,47 +42,69 @@ collections:
- name: community.general
```
Note that if you install the collection manually, it will not be upgraded automatically when you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:
```bash
ansible-galaxy collection install community.general --upgrade
```
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where `X.Y.Z` can be any [available version](https://galaxy.ansible.com/community/general):
```bash
ansible-galaxy collection install community.general:==X.Y.Z
```
See [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
## Contributing to this collection
If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATH`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there.
The content of this collection is made by good people just like you, a community of individuals collaborating on making the world better through developing automation software.
For example, if you are working in the `~/dev` directory:
We are actively accepting new contributors.
```
cd ~/dev
git clone git@github.com:ansible-collections/community.general.git collections/ansible_collections/community/general
export COLLECTIONS_PATH=$(pwd)/collections:$COLLECTIONS_PATH
```
All types of contributions are very welcome.
You don't know how to start? Refer to our [contribution guide](https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md)!
The current maintainers are listed in the [commit-rights.md](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md#people) file. If you have questions or need help, feel free to mention them in the proposals.
You can find more information in the [developer guide for collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html).
Also for some notes specific to this collection see [our CONTRIBUTING documentation](https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md).
### Running tests
See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#testing-collections).
### Communication
## Collection maintenance
We have a dedicated Working Group for Ansible development.
To learn how to maintain / become a maintainer of this collection, refer to:
You can find other people interested on the following Freenode IRC channels -
- `#ansible` - For general use questions and support.
- `#ansible-devel` - For discussions on developer topics and code related to features or bugs.
- `#ansible-community` - For discussions on community topics and community meetings.
* [Committer guidelines](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md).
* [Maintainer guidelines](https://github.com/ansible/community-docs/blob/main/maintaining.rst).
It is necessary for maintainers of this collection to be subscribed to:
* The collection itself (the `Watch` button → `All Activity` in the upper right corner of the repository's homepage).
* The "Changes Impacting Collection Contributors and Maintainers" [issue](https://github.com/ansible-collections/overview/issues/45).
They also should be subscribed to Ansible's [The Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn).
## Communication
We announce important development changes and releases through Ansible's [The Bullhorn newsletter](https://eepurl.com/gZmiEP). If you are a collection developer, be sure you are subscribed.
Join us in the `#ansible` (general use questions and support), `#ansible-community` (community and collection development questions), and other [IRC channels](https://docs.ansible.com/ansible/devel/community/communication.html#irc-channels) on [Libera.chat](https://libera.chat).
We take part in the global quarterly [Ansible Contributor Summit](https://github.com/ansible/community/wiki/Contributor-Summit) virtually or in-person. Track [The Bullhorn newsletter](https://eepurl.com/gZmiEP) and join us.
For more information about communities, meetings and agendas see [Community Wiki](https://github.com/ansible/community/wiki/Community).
For more information about [communication](https://docs.ansible.com/ansible/latest/community/communication.html)
For more information about communication, refer to Ansible's the [Communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
### Publishing New Version
## Publishing New Version
Basic instructions without release branches:
1. Create `changelogs/fragments/<version>.yml` with `release_summary:` section (which must be a string, not a list).
2. Run `antsibull-changelog release --collection-flatmap yes`
3. Make sure `CHANGELOG.rst` and `changelogs/changelog.yaml` are added to git, and the deleted fragments have been removed.
4. Tag the commit with `<version>`. Push changes and tag to the main repository.
See the [Releasing guidelines](https://github.com/ansible/community-docs/blob/main/releasing_collections.rst) to learn how to release this collection.
## Release notes
@@ -82,10 +112,10 @@ See the [changelog](https://github.com/ansible-collections/community.general/blo
## Roadmap
See [this issue](https://github.com/ansible-collections/community.general/issues/582) for information on releasing, versioning and deprecation.
In general, we plan to release a major version every six months, and minor versions every two months. Major versions can contain breaking changes, while minor versions only contain new features and bugfixes.
See [this issue](https://github.com/ansible-collections/community.general/issues/582) for information on releasing, versioning, and deprecation.
## More information
- [Ansible Collection overview](https://github.com/ansible-collections/overview)

View File

@@ -1882,3 +1882,278 @@ releases:
- 2454-detect_zfs_changed.yml
- ovirt-fixup.yml
release_date: '2021-05-11'
2.5.3:
changes:
bugfixes:
- consul_acl - update the hcl allowlist to include all supported options (https://github.com/ansible-collections/community.general/pull/2495).
- consul_kv lookup plugin - allow to set ``recurse``, ``index``, ``datacenter``
and ``token`` as keyword arguments (https://github.com/ansible-collections/community.general/issues/2124).
- influxdb_user - allow creation of admin users when InfluxDB authentication
is enabled but no other user exists on the database. In this scenario, InfluxDB
1.x allows only ``CREATE USER`` queries and rejects any other query (https://github.com/ansible-collections/community.general/issues/2364).
- influxdb_user - fix bug where an influxdb user has no privileges for 2 or
more databases (https://github.com/ansible-collections/community.general/pull/2499).
- influxdb_user - fix bug which removed current privileges instead of appending
them to existing ones (https://github.com/ansible-collections/community.general/issues/2609,
https://github.com/ansible-collections/community.general/pull/2614).
- iptables_state - call ``async_status`` action plugin rather than its module
(https://github.com/ansible-collections/community.general/issues/2700).
- iptables_state - fix a 'FutureWarning' in a regex and do some basic code clean
up (https://github.com/ansible-collections/community.general/pull/2525).
- iptables_state - fix a broken query of ``async_status`` result with current
ansible-core development version (https://github.com/ansible-collections/community.general/issues/2627,
https://github.com/ansible-collections/community.general/pull/2671).
- iptables_state - fix initialization of iptables from null state when adressing
more than one table (https://github.com/ansible-collections/community.general/issues/2523).
- java_cert - fix issue with incorrect alias used on PKCS#12 certificate import
(https://github.com/ansible-collections/community.general/pull/2560).
- jenkins_plugin - use POST method for sending request to jenkins API when ``state``
option is one of ``enabled``, ``disabled``, ``pinned``, ``unpinned``, or ``absent``
(https://github.com/ansible-collections/community.general/issues/2510).
- json_query filter plugin - avoid 'unknown type' errors for more Ansible internal
types (https://github.com/ansible-collections/community.general/pull/2607).
- module_helper module utils - ``CmdMixin`` must also use ``LC_ALL`` to enforce
locale choice (https://github.com/ansible-collections/community.general/pull/2731).
- netcup_dns - use ``str(ex)`` instead of unreliable ``ex.message`` in exception
handling to fix ``AttributeError`` in error cases (https://github.com/ansible-collections/community.general/pull/2590).
- nmap inventory plugin - fix local variable error when cache is disabled (https://github.com/ansible-collections/community.general/issues/2512).
- ovir4 inventory script - improve configparser creation to avoid crashes for
options without values (https://github.com/ansible-collections/community.general/issues/674).
- proxmox_kvm - fixed ``vmid`` return value when VM with ``name`` already exists
(https://github.com/ansible-collections/community.general/issues/2648).
- redis cache - improved connection string parsing (https://github.com/ansible-collections/community.general/issues/497).
- rhsm_release - fix the issue that module considers 8, 7Client and 7Workstation
as invalid releases (https://github.com/ansible-collections/community.general/pull/2571).
- ssh_config - reduce stormssh searches based on host (https://github.com/ansible-collections/community.general/pull/2568/).
- terraform - ensure the workspace is set back to its previous value when the
apply fails (https://github.com/ansible-collections/community.general/pull/2634).
- xfconf - also use ``LC_ALL`` to enforce locale choice (https://github.com/ansible-collections/community.general/issues/2715).
- zypper_repository - fix idempotency on adding repository with ``$releasever``
and ``$basearch`` variables (https://github.com/ansible-collections/community.general/issues/1985).
release_summary: Regular bugfix release.
fragments:
- 1085-consul-acl-hcl-whitelist-update.yml
- 2.5.3.yml
- 2126-consul_kv-pass-token.yml
- 2364-influxdb_user-first_user.yml
- 2461-ovirt4-fix-configparser.yml
- 2499-influxdb_user-fix-multiple-no-privileges.yml
- 2510-jenkins_plugin_use_post_method.yml
- 2518-nmap-fix-cache-disabled.yml
- 2525-iptables_state-fix-initialization-command.yml
- 2560-java_cert-pkcs12-alias-bugfix.yml
- 2568-ssh_config-reduce-stormssh-searches-based-on-host.yml
- 2571-rhsm_release-fix-release_matcher.yaml
- 2579-redis-cache-ipv6.yml
- 2590-netcup_dns-exception-no-message-attr.yml
- 2614-influxdb_user-fix-issue-introduced-in-PR#2499.yml
- 2634-terraform-switch-workspace.yml
- 2648-proxmox_kvm-fix-vmid-return-value.yml
- 2671-fix-broken-query-of-async_status-result.yml
- 2711-fix-iptables_state-2700-async_status-call.yml
- 2722-zypper_repository-fix_idempotency_on_adding_repo_with_releasever.yml
- 2731-mh-cmd-locale.yml
- json_query_more_types.yml
release_date: '2021-06-08'
2.5.4:
changes:
bugfixes:
- _mount module utils - fixed the sanity checks (https://github.com/ansible-collections/community.general/pull/2883).
- gitlab_project - user projects are created using namespace ID now, instead
of user ID (https://github.com/ansible-collections/community.general/pull/2881).
- ipa_sudorule - call ``sudorule_add_allow_command`` method instead of ``sudorule_add_allow_command_group``
(https://github.com/ansible-collections/community.general/issues/2442).
- modprobe - added additional checks to ensure module load/unload is effective
(https://github.com/ansible-collections/community.general/issues/1608).
- nmcli - fixes team-slave configuration by adding connection.slave-type (https://github.com/ansible-collections/community.general/issues/766).
- npm - when the ``version`` option is used the comparison of installed vs missing
will use name@version instead of just name, allowing version specific updates
(https://github.com/ansible-collections/community.general/issues/2021).
- proxmox_kvm - fix parsing of Proxmox VM information with device info not containing
a comma, like disks backed by ZFS zvols (https://github.com/ansible-collections/community.general/issues/2840).
- scaleway plugin inventory - fix ``JSON object must be str, not 'bytes'`` with
Python 3.5 (https://github.com/ansible-collections/community.general/issues/2769).
release_summary: Regular bugfix release.
fragments:
- 2.5.4.yml
- 2771-scaleway_inventory_json_accept_byte_array.yml
- 2821-ipa_sudorule.yml
- 2827-nmcli_fix_team_slave.yml
- 2830-npm-version-update.yml
- 2841-proxmox_kvm_zfs_devstr.yml
- 2843-modprobe-failure-conditions.yml
- 2881-gitlab_project-fix_workspace_user.yaml
- 2883-_mount-fixed-sanity-checks.yml
release_date: '2021-06-29'
2.5.5:
changes:
bugfixes:
- ali_instance_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- archive - fixed ``exclude_path`` values causing incorrect archive root (https://github.com/ansible-collections/community.general/pull/2816).
- archive - fixed improper file names for single file zip archives (https://github.com/ansible-collections/community.general/issues/2818).
- archive - fixed incorrect ``state`` result value documentation (https://github.com/ansible-collections/community.general/pull/2816).
- archive - fixed task failure when using the ``remove`` option with a ``path``
containing nested files for ``format``s other than ``zip`` (https://github.com/ansible-collections/community.general/issues/2919).
- archive - fixing archive root determination when longest common root is ``/``
(https://github.com/ansible-collections/community.general/pull/3036).
- deploy_helper - improved parameter checking by using standard Ansible construct
(https://github.com/ansible-collections/community.general/pull/3104).
- ejabberd_user - replaced in-code check with ``required_if``, using ``get_bin_path()``
for the command, passing args to ``run_command()`` as list instead of string
(https://github.com/ansible-collections/community.general/pull/3093).
- gitlab_group_members - fixes issue when gitlab group has more then 20 members,
pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
- gitlab_project_members - fixes issue when gitlab group has more then 20 members,
pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
- gluster_heal_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- idrac_redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- ini_file - fix inconsistency between empty value and no value (https://github.com/ansible-collections/community.general/issues/3031).
- java_cert - import private key as well as public certificate from PKCS#12
(https://github.com/ansible-collections/community.general/issues/2460).
- launchd - fixed sanity check in the module's code (https://github.com/ansible-collections/community.general/pull/2960).
- lvol - honor ``check_mode`` on thinpool (https://github.com/ansible-collections/community.general/issues/2934).
- memset_memstore_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- memset_server_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- npm - correctly handle cases where a dependency does not have a ``version``
property because it is either missing or invalid (https://github.com/ansible-collections/community.general/issues/2917).
- ome_device_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- oneview_datacenter_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_enclosure_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_ethernet_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_fc_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_fcoe_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_logical_interconnect_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_network_set_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- oneview_san_manager_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- openbsd_pkg - fix regexp matching crash. This bug could trigger on package
names with special characters, for example ``g++`` (https://github.com/ansible-collections/community.general/pull/3161).
- ovirt_affinity_label_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_api_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_cluster_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_datacenter_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_disk_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_event_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_external_provider_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_group_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_host_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_host_storage_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_network_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_nic_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_permission_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_quota_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_scheduling_policy_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_snapshot_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_storage_domain_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_storage_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_storage_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_tag_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_user_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- ovirt_vmpool_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- pacman - fix changed status when ignorepkg has been defined (https://github.com/ansible-collections/community.general/issues/1758).
- pamd - fixed problem with files containing only one or two lines (https://github.com/ansible-collections/community.general/issues/2925).
- pids - avoid crashes for older ``psutil`` versions, like on RHEL6 and RHEL7
(https://github.com/ansible-collections/community.general/pull/2808).
- proxmox inventory plugin - fixed parsing failures when some cluster nodes
are offline (https://github.com/ansible-collections/community.general/issues/2931).
- proxmox inventory plugin - fixed plugin failure when a ``qemu`` guest has
no ``template`` key (https://github.com/ansible-collections/community.general/pull/3052).
- proxmox_kvm - fix result of clone, now returns ``newid`` instead of ``vmid``
(https://github.com/ansible-collections/community.general/pull/3034).
- purefa_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
- rax_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- redfish_command - fix extraneous error caused by missing ``bootdevice`` argument
when using the ``DisableBootOverride`` sub-command (https://github.com/ansible-collections/community.general/issues/3005).
- redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- smartos_image_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- snmp_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- taiga - some constructs in the module fixed to work also in Python 3 (https://github.com/ansible-collections/community.general/pull/3067).
- tss lookup plugin - fixed incompatibility with ``python-tss-sdk`` version
1.0.0 (https://github.com/ansible-collections/community.general/issues/3057,
https://github.com/ansible-collections/community.general/pull/3139).
- utm_aaa_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- utm_ca_host_key_cert_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- utm_network_interface_address_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- utm_proxy_frontend_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- utm_proxy_location_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- xenserver_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
- xfconf_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
release_summary: Maintenance release.
fragments:
- 2.5.5.yml
- 2808-pids-older-psutil.yml
- 2816-archive-refactor.yml
- 2923-archive-remove-bugfix.yml
- 2924-npm-fix-package-json.yml
- 2935-lvol-support_check_mode_thinpool.yml
- 2936-pacman-fix_changed_status_when_ignorepkg_has_been_defined.yml
- 2960-launchd-validation-check.yaml
- 2967-proxmox_inventory-offline-node-fix.yml
- 2989-pamd-single-line.yaml
- 3006-redfish_command-bootoverride-argument-check.yaml
- 3034-promox-kvm-return-new-id.yaml
- 3036-archive-root-path-fix.yml
- 3041-fix_gitlab_group_members_gitlab_project_mambers.yml
- 3052_proxmox_inventory_plugin.yml
- 3067-taiga-bugfix.yaml
- 3074-ini_file-3031-empty-value-inconsistency.yml
- 3080-java_cert-2460-import_private_key.yml
- 3084-info-checkmode.yaml
- 3093-ejabberd_user-refactor.yaml
- 3104-deploy_helper-required_if.yaml
- 3139-tss-lookup-plugin-update-to-make-compatible-with-sdk-v1.yml
- 3161-openbsd-pkg-fix-regexp-matching-crash.yml
release_date: '2021-08-10'
2.5.6:
changes:
bugfixes:
- copr - fix chroot naming issues, ``centos-stream`` changed naming to ``centos-stream-<number>``
(for exmaple ``centos-stream-8``) (https://github.com/ansible-collections/community.general/issues/2084,
https://github.com/ansible-collections/community.general/pull/3237).
- launchd - use private attribute to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- logdns callback plugin - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- maven_artifact - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- memcached cache plugin - change function argument names to fix sanity errors
(https://github.com/ansible-collections/community.general/pull/3194).
- netapp module utils - remove always-true conditional to fix sanity errors
(https://github.com/ansible-collections/community.general/pull/3194).
- nmcli - added ip4/ip6 configuration arguments for ``sit`` and ``ipip`` tunnels
(https://github.com/ansible-collections/community.general/issues/3238, https://github.com/ansible-collections/community.general/pull/3239).
- one_template - change function argument name to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- online inventory plugin - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- online module utils - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- openbsd_pkg - fix crash from ``KeyError`` exception when package installs,
but ``pkg_add`` returns with a non-zero exit code (https://github.com/ansible-collections/community.general/pull/3336).
- packet_device - use generator to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- packet_sshkey - use generator to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- pamd - code for ``state=updated`` when dealing with the pam module arguments,
made no distinction between ``None`` and an empty list (https://github.com/ansible-collections/community.general/issues/3260).
- proxmox_kvm - clone operation should return the VMID of the target VM and
not that of the source VM. This was failing when the target VM with the chosen
name already existed (https://github.com/ansible-collections/community.general/pull/3266).
- saltstack connection plugin - fix function signature (https://github.com/ansible-collections/community.general/pull/3194).
- scaleway inventory script - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3195).
- scaleway module utils - improve split call to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- udm_dns_record - fixed managing of PTR records, which can never have worked
before (https://github.com/ansible-collections/community.general/pull/3256).
- ufw - use generator to fix sanity errors (https://github.com/ansible-collections/community.general/pull/3194).
- vbox inventory script - change function argument name to fix sanity errors
(https://github.com/ansible-collections/community.general/pull/3195).
- vdo - boolean arguments now compared with proper ``true`` and ``false`` values
instead of string representations like ``"yes"`` or ``"no"`` (https://github.com/ansible-collections/community.general/pull/3191).
minor_changes:
- pamd - minor refactorings (https://github.com/ansible-collections/community.general/pull/3285).
- vdo - minor refactoring of the code (https://github.com/ansible-collections/community.general/pull/3191).
release_summary: Regular bugfix release.
fragments:
- 2.5.6.yml
- 3191-vdo-refactor.yml
- 3194-sanity.yml
- 3237-copr-fix_chroot_naming.yml
- 3239-nmcli-sit-ipip-config-bugfix.yaml
- 3256-fix-ptr-handling-in-udm_dns_record.yml
- 3266-vmid-existing-target-clone.yml
- 3285-pamd-updated-with-empty-args.yaml
- 3336-openbsd_pkg-fix-KeyError.yml
release_date: '2021-09-21'

View File

@@ -67,6 +67,8 @@ Individuals who have been asked to become a part of this group have generally be
| Name | GitHub ID | IRC Nick | Other |
| ------------------- | -------------------- | ------------------ | -------------------- |
| Alexei Znamensky | russoz | russoz | |
| Andrew Klychkov | andersson007 | andersson007_ | |
| Andrew Pantuso | Ajpantuso | ajpantuso | |
| Felix Fontein | felixfontein | felixfontein | |
| John R Barker | gundalow | gundalow | |

View File

@@ -1,6 +1,6 @@
namespace: community
name: general
version: 2.5.2
version: 2.5.6
readme: README.md
authors:
- Ansible (https://github.com/ansible)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright: (c) 2020, quidame <quidame@poivron.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -7,7 +8,7 @@ __metaclass__ = type
import time
from ansible.plugins.action import ActionBase
from ansible.errors import AnsibleError, AnsibleActionFail, AnsibleConnectionFailure
from ansible.errors import AnsibleActionFail, AnsibleConnectionFailure
from ansible.utils.vars import merge_hash
from ansible.utils.display import Display
@@ -40,19 +41,27 @@ class ActionModule(ActionBase):
"(=%s) to 0, and 'async' (=%s) to a value >2 and not greater than "
"'ansible_timeout' (=%s) (recommended).")
def _async_result(self, module_args, task_vars, timeout):
def _async_result(self, async_status_args, task_vars, timeout):
'''
Retrieve results of the asynchonous task, and display them in place of
the async wrapper results (those with the ansible_job_id key).
'''
async_status = self._task.copy()
async_status.args = async_status_args
async_status.action = 'ansible.builtin.async_status'
async_status.async_val = 0
async_action = self._shared_loader_obj.action_loader.get(
async_status.action, task=async_status, connection=self._connection,
play_context=self._play_context, loader=self._loader, templar=self._templar,
shared_loader_obj=self._shared_loader_obj)
if async_status.args['mode'] == 'cleanup':
return async_action.run(task_vars=task_vars)
# At least one iteration is required, even if timeout is 0.
for i in range(max(1, timeout)):
async_result = self._execute_module(
module_name='ansible.builtin.async_status',
module_args=module_args,
task_vars=task_vars,
wrap_async=False)
if async_result['finished'] == 1:
for dummy in range(max(1, timeout)):
async_result = async_action.run(task_vars=task_vars)
if async_result.get('finished', 0) == 1:
break
time.sleep(min(1, timeout))
@@ -76,7 +85,6 @@ class ActionModule(ActionBase):
task_async = self._task.async_val
check_mode = self._play_context.check_mode
max_timeout = self._connection._play_context.timeout
module_name = self._task.action
module_args = self._task.args
if module_args.get('state', None) == 'restored':
@@ -107,7 +115,7 @@ class ActionModule(ActionBase):
# longer on the controller); and set a backup file path.
module_args['_timeout'] = task_async
module_args['_back'] = '%s/iptables.state' % async_dir
async_status_args = dict(_async_dir=async_dir)
async_status_args = dict(mode='status')
confirm_cmd = 'rm -f %s' % module_args['_back']
starter_cmd = 'touch %s.starter' % module_args['_back']
remaining_time = max(task_async, max_timeout)
@@ -133,7 +141,7 @@ class ActionModule(ActionBase):
# The module is aware to not process the main iptables-restore
# command before finding (and deleting) the 'starter' cookie on
# the host, so the previous query will not reach ssh timeout.
garbage = self._low_level_execute_command(starter_cmd, sudoable=self.DEFAULT_SUDOABLE)
dummy = self._low_level_execute_command(starter_cmd, sudoable=self.DEFAULT_SUDOABLE)
# As the main command is not yet executed on the target, here
# 'finished' means 'failed before main command be executed'.
@@ -143,7 +151,7 @@ class ActionModule(ActionBase):
except AttributeError:
pass
for x in range(max_timeout):
for dummy in range(max_timeout):
time.sleep(1)
remaining_time -= 1
# - AnsibleConnectionFailure covers rejected requests (i.e.
@@ -151,7 +159,7 @@ class ActionModule(ActionBase):
# - ansible_timeout is able to cover dropped requests (due
# to a rule or policy DROP) if not lower than async_val.
try:
garbage = self._low_level_execute_command(confirm_cmd, sudoable=self.DEFAULT_SUDOABLE)
dummy = self._low_level_execute_command(confirm_cmd, sudoable=self.DEFAULT_SUDOABLE)
break
except AnsibleConnectionFailure:
continue
@@ -164,16 +172,12 @@ class ActionModule(ActionBase):
del result[key]
if result.get('invocation', {}).get('module_args'):
if '_timeout' in result['invocation']['module_args']:
del result['invocation']['module_args']['_back']
del result['invocation']['module_args']['_timeout']
for key in ('_back', '_timeout', '_async_dir', 'jid'):
if result['invocation']['module_args'].get(key):
del result['invocation']['module_args'][key]
async_status_args['mode'] = 'cleanup'
garbage = self._execute_module(
module_name='ansible.builtin.async_status',
module_args=async_status_args,
task_vars=task_vars,
wrap_async=False)
dummy = self._async_result(async_status_args, task_vars, 0)
if not wrap_async:
# remove a temporary path we created

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright: (c) 2020, Amin Vakil <info@aminvakil.com>
# Copyright: (c) 2016-2018, Matt Davis <mdavis@ansible.com>
# Copyright: (c) 2018, Sam Doran <sdoran@redhat.com>

View File

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2014, Brian Coca, Josh Drake, et al
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -153,12 +154,12 @@ class CacheModuleKeys(MutableSet):
def __len__(self):
return len(self._keyset)
def add(self, key):
self._keyset[key] = time.time()
def add(self, value):
self._keyset[value] = time.time()
self._cache.set(self.PREFIX, self._keyset)
def discard(self, key):
del self._keyset[key]
def discard(self, value):
del self._keyset[value]
self._cache.set(self.PREFIX, self._keyset)
def remove_by_timerange(self, s_min, s_max):

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2017, Brian Coca
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2014, Brian Coca, Josh Drake, et al
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -61,6 +62,7 @@ DOCUMENTATION = '''
type: integer
'''
import re
import time
import json
@@ -91,6 +93,8 @@ class CacheModule(BaseCacheModule):
performance.
"""
_sentinel_service_name = None
re_url_conn = re.compile(r'^([^:]+|\[[^]]+\]):(\d+):(\d+)(?::(.*))?$')
re_sent_conn = re.compile(r'^(.*):(\d+)$')
def __init__(self, *args, **kwargs):
uri = ''
@@ -130,11 +134,18 @@ class CacheModule(BaseCacheModule):
self._db = self._get_sentinel_connection(uri, kw)
# normal connection
else:
connection = uri.split(':')
connection = self._parse_connection(self.re_url_conn, uri)
self._db = StrictRedis(*connection, **kw)
display.vv('Redis connection: %s' % self._db)
@staticmethod
def _parse_connection(re_patt, uri):
match = re_patt.match(uri)
if not match:
raise AnsibleError("Unable to parse connection string")
return match.groups()
def _get_sentinel_connection(self, uri, kw):
"""
get sentinel connection details from _uri
@@ -158,7 +169,7 @@ class CacheModule(BaseCacheModule):
except IndexError:
pass # password is optional
sentinels = [tuple(shost.split(':')) for shost in connections]
sentinels = [self._parse_connection(self.re_sent_conn, shost) for shost in connections]
display.vv('\nUsing redis sentinels: %s' % sentinels)
scon = Sentinel(sentinels, **kw)
try:

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2017, Brian Coca
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2018, Ivan Aragones Muniesa <ivan.aragones.muniesa@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
'''

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2016, Dag Wieers <dag@wieers.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (C) 2014, Matt Martz <matt@sivel.net>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright (C) 2016 maxn nikolaev.makc@gmail.com
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2018, Samir Musali <samir.musali@logdna.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -77,7 +78,7 @@ def get_mac():
# Getting hostname of system:
def get_hostname():
return str(socket.gethostname()).split('.local')[0]
return str(socket.gethostname()).split('.local', 1)[0]
# Getting IP of system:

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2015, Logentries.com, Jimmy Tang <jimmy.tang@logentries.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (C) 2020, Yevhen Khmelenko <ujenmr@gmail.com>
# (C) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) Fastly, inc 2016
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (C) 2014-2015, Matt Martz <matt@sivel.net>
# (C) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright: (c) 2017, Allyson Bowles <@akatch>
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# (c) 2013, Maykel Moya <mmoya@speedyrails.com>

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# Copyright (c) 2013, Michael Scherer <misc@zarb.org>

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Based on jail.py
# (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Based on local.py by Michael DeHaan <michael.dehaan@gmail.com>
# and chroot.py by Maykel Moya <mmoya@speedyrails.com>
# Copyright (c) 2013, Michael Scherer <misc@zarb.org>

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2015, Joerg Thalheim <joerg@higgsboson.tk>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# (c) 2016 Matt Clay <matt@mystile.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Based on the buildah connection plugin
# Copyright (c) 2017 Ansible Project
# 2018 Kushal Das

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# Based on func.py
@@ -57,7 +58,7 @@ class Connection(ConnectionBase):
self._connected = True
return self
def exec_command(self, cmd, sudoable=False, in_data=None):
def exec_command(self, cmd, in_data=None, sudoable=False):
''' run a command on the remote minion '''
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# and jail.py (c) 2013, Michael Scherer <misc@zarb.org>

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright: (c) 2018, Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright: (c) 2018, Huawei Inc.
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright (c) 2018, Oracle and/or its affiliates.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright (c) 2018, Oracle and/or its affiliates.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright (c) 2018, Oracle and/or its affiliates.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright (c) 2018, Oracle and/or its affiliates.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright (c) 2018, Oracle and/or its affiliates.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
# Copyright (c) 2018, Oracle and/or its affiliates.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -1,3 +1,4 @@
# coding: utf-8 -*-
#
# Copyright: (c) 2019, Sandeep Kasargod <sandeep@vexata.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@@ -35,9 +35,11 @@ def json_query(data, expr):
raise AnsibleError('You need to install "jmespath" prior to running '
'json_query filter')
# Hack to handle Ansible String Types
# Hack to handle Ansible Unsafe text, AnsibleMapping and AnsibleSequence
# See issue: https://github.com/ansible-collections/community.general/issues/320
jmespath.functions.REVERSE_TYPES_MAP['string'] = jmespath.functions.REVERSE_TYPES_MAP['string'] + ('AnsibleUnicode', 'AnsibleUnsafeText', )
jmespath.functions.REVERSE_TYPES_MAP['array'] = jmespath.functions.REVERSE_TYPES_MAP['array'] + ('AnsibleSequence', )
jmespath.functions.REVERSE_TYPES_MAP['object'] = jmespath.functions.REVERSE_TYPES_MAP['object'] + ('AnsibleMapping', )
try:
return jmespath.search(expr, data)
except jmespath.exceptions.JMESPathError as e:

View File

@@ -22,7 +22,7 @@ DOCUMENTATION = r'''
- constructed
options:
plugin:
description: marks this as an instance of the 'linode' plugin
description: Marks this as an instance of the 'linode' plugin.
required: true
choices: ['linode', 'community.general.linode']
access_token:
@@ -77,6 +77,10 @@ groups:
webservers: "'web' in (tags|list)"
mailservers: "'mail' in (tags|list)"
compose:
# By default, Ansible tries to connect to the label of the instance.
# Since that might not be a valid name to connect to, you can
# replace it with the first IPv4 address of the linode as follows:
ansible_ssh_host: ipv4[0]
ansible_port: 2222
'''

View File

@@ -130,7 +130,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
# This occurs if the cache_key is not in the cache or if the cache_key expired, so the cache needs to be updated
cache_needs_update = True
if cache_needs_update:
if not user_cache_setting or cache_needs_update:
# setup command
cmd = [self._nmap]
if not self._options['ports']:
@@ -207,6 +207,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
except Exception as e:
raise AnsibleParserError("failed to parse %s: %s " % (to_native(path), to_native(e)))
if cache_needs_update:
self._cache[cache_key] = results
self._populate(results)

View File

@@ -234,7 +234,7 @@ class InventoryModule(BaseInventoryPlugin):
self.headers = {
'Authorization': "Bearer %s" % token,
'User-Agent': "ansible %s Python %s" % (ansible_version, python_version.split(' ')[0]),
'User-Agent': "ansible %s Python %s" % (ansible_version, python_version.split(' ', 1)[0]),
'Content-type': 'application/json'
}

View File

@@ -81,13 +81,24 @@ DOCUMENTATION = '''
'''
EXAMPLES = '''
# Minimal example which will not gather additional facts for QEMU/LXC guests
# By not specifying a URL the plugin will attempt to connect to the controller host on port 8006
# my.proxmox.yml
plugin: community.general.proxmox
url: http://localhost:8006
user: ansible@pve
password: secure
validate_certs: no
# More complete example demonstrating the use of 'want_facts' and the constructed options
# Note that using facts returned by 'want_facts' in constructed options requires 'want_facts=true'
# my.proxmox.yml
plugin: community.general.proxmox
url: http://pve.domain.com:8006
user: ansible@pve
password: secure
validate_certs: false
want_facts: true
keyed_groups:
# proxmox_tags_parsed is an example of a fact only returned when 'want_facts=true'
- key: proxmox_tags_parsed
separator: ""
prefix: group
@@ -353,6 +364,9 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
if node['type'] == 'node':
self.inventory.add_child(nodes_group, node['node'])
if node['status'] == 'offline':
continue
# get node IP address
ip = self._get_node_ip(node['node'])
self.inventory.set_variable(node['node'], 'ansible_host', ip)
@@ -383,7 +397,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
node_qemu_group = self.to_safe('%s%s' % (self.get_option('group_prefix'), ('%s_qemu' % node['node']).lower()))
self.inventory.add_group(node_qemu_group)
for qemu in self._get_qemu_per_node(node['node']):
if qemu['template']:
if qemu.get('template'):
continue
self.inventory.add_host(qemu['name'])

View File

@@ -1,24 +1,24 @@
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r'''
name: scaleway
author:
- Remy Leone (@sieben)
short_description: Scaleway inventory source
description:
- Get inventory hosts from Scaleway
- Get inventory hosts from Scaleway.
options:
plugin:
description: token that ensures this is a source file for the 'scaleway' plugin.
description: Token that ensures this is a source file for the 'scaleway' plugin.
required: True
choices: ['scaleway', 'community.general.scaleway']
regions:
description: Filter results on a specific Scaleway region
description: Filter results on a specific Scaleway region.
type: list
default:
- ams1
@@ -26,11 +26,13 @@ DOCUMENTATION = '''
- par2
- waw1
tags:
description: Filter results on a specific tag
description: Filter results on a specific tag.
type: list
oauth_token:
required: True
description: Scaleway OAuth token.
description:
- Scaleway OAuth token.
- More details on L(how to generate token, https://www.scaleway.com/en/docs/generate-api-keys/).
env:
# in order of precedence
- name: SCW_TOKEN
@@ -48,14 +50,14 @@ DOCUMENTATION = '''
- hostname
- id
variables:
description: 'set individual variables: keys are variable names and
description: 'Set individual variables: keys are variable names and
values are templates. Any value returned by the
L(Scaleway API, https://developer.scaleway.com/#servers-server-get)
can be used.'
type: dict
'''
EXAMPLES = '''
EXAMPLES = r'''
# scaleway_inventory.yml file in YAML format
# Example command line: ansible-inventory --list -i scaleway_inventory.yml
@@ -81,6 +83,15 @@ regions:
- par1
variables:
ansible_host: public_ip.address
# Using static strings as variables
plugin: community.general.scaleway
hostnames:
- hostname
variables:
ansible_host: public_ip.address
ansible_connection: "'ssh'"
ansible_user: "'admin'"
'''
import json
@@ -89,7 +100,7 @@ from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, parse_pagination_link
from ansible.module_utils.urls import open_url
from ansible.module_utils._text import to_native
from ansible.module_utils._text import to_native, to_text
import ansible.module_utils.six.moves.urllib.parse as urllib_parse
@@ -105,7 +116,7 @@ def _fetch_information(token, url):
except Exception as e:
raise AnsibleError("Error while fetching %s: %s" % (url, to_native(e)))
try:
raw_json = json.loads(response.read())
raw_json = json.loads(to_text(response.read()))
except ValueError:
raise AnsibleError("Incorrect JSON payload")
@@ -230,8 +241,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
if not matching_tags:
return set()
else:
return matching_tags.union((server_zone,))
return matching_tags.union((server_zone,))
def _filter_host(self, host_infos, hostname_preferences):

View File

@@ -10,6 +10,8 @@ DOCUMENTATION = '''
name: stackpath_compute
short_description: StackPath Edge Computing inventory source
version_added: 1.2.0
author:
- UNKNOWN (@shayrybak)
extends_documentation_fragment:
- inventory_cache
- constructed

View File

@@ -171,10 +171,10 @@ class LookupModule(LookupBase):
paramvals = {
'key': params[0],
'token': None,
'recurse': False,
'index': None,
'datacenter': None
'token': self.get_option('token'),
'recurse': self.get_option('recurse'),
'index': self.get_option('index'),
'datacenter': self.get_option('datacenter')
}
# parameters specified?

View File

@@ -103,17 +103,26 @@ EXAMPLES = r"""
| items2dict(key_name='slug',
value_name='itemValue'))['password']
}}
"""
- hosts: localhost
vars:
secret_password: >-
{{ ((lookup('community.general.tss', 1) | from_json).get('items') | items2dict(key_name='slug', value_name='itemValue'))['password'] }}"
tasks:
- ansible.builtin.debug:
msg: the password is {{ secret_password }}
"""
from distutils.version import LooseVersion
from ansible.errors import AnsibleError, AnsibleOptionsError
sdk_is_missing = False
try:
from thycotic import __version__ as sdk_version
from thycotic.secrets.server import (
SecretServer,
SecretServerAccessError,
SecretServerError,
PasswordGrantAuthorizer,
)
except ImportError:
sdk_is_missing = True
@@ -128,7 +137,20 @@ display = Display()
class LookupModule(LookupBase):
@staticmethod
def Client(server_parameters):
return SecretServer(**server_parameters)
if LooseVersion(sdk_version) < LooseVersion('1.0.0'):
return SecretServer(**server_parameters)
else:
authorizer = PasswordGrantAuthorizer(
server_parameters["base_url"],
server_parameters["username"],
server_parameters["password"],
server_parameters["token_path_uri"],
)
return SecretServer(
server_parameters["base_url"], authorizer, server_parameters["api_path_uri"]
)
def run(self, terms, variables, **kwargs):
if sdk_is_missing:

View File

@@ -48,6 +48,10 @@
# agrees to be bound by the terms and conditions of this License
# Agreement.
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os

View File

@@ -383,8 +383,8 @@ class NetAppESeriesModule(object):
path = path[1:]
request_url = self.url + self.DEFAULT_REST_API_PATH + path
if self.log_requests or True:
self.module.log(pformat(dict(url=request_url, data=data, method=method)))
# if self.log_requests:
self.module.log(pformat(dict(url=request_url, data=data, method=method)))
return request(url=request_url, data=data, method=method, headers=headers, use_proxy=True, force=False, last_mod_time=None,
timeout=self.DEFAULT_TIMEOUT, http_agent=self.HTTP_AGENT, force_basic_auth=True, ignore_errors=ignore_errors, **self.creds)

View File

@@ -487,13 +487,16 @@ class CmdMixin(object):
def run_command(self, extra_params=None, params=None, *args, **kwargs):
self.vars.cmd_args = self._calculate_args(extra_params, params)
options = dict(self.run_command_fixed_options)
env_update = dict(options.get('environ_update', {}))
options['check_rc'] = options.get('check_rc', self.check_rc)
options.update(kwargs)
env_update = dict(options.get('environ_update', {}))
if self.force_lang:
env_update.update({'LANGUAGE': self.force_lang})
env_update.update({
'LANGUAGE': self.force_lang,
'LC_ALL': self.force_lang,
})
self.update_output(force_lang=self.force_lang)
options['environ_update'] = env_update
options.update(kwargs)
rc, out, err = self.module.run_command(self.vars.cmd_args, *args, **options)
self.update_output(rc=rc, stdout=out, stderr=err)
return self.process_command_output(rc, out, err)

View File

@@ -201,7 +201,7 @@ class OneViewModuleBase(object):
resource_client = None
def __init__(self, additional_arg_spec=None, validate_etag_support=False):
def __init__(self, additional_arg_spec=None, validate_etag_support=False, supports_check_mode=False):
"""
OneViewModuleBase constructor.
@@ -210,7 +210,7 @@ class OneViewModuleBase(object):
"""
argument_spec = self._build_argument_spec(additional_arg_spec, validate_etag_support)
self.module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=False)
self.module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=supports_check_mode)
self._check_hpe_oneview_sdk()
self._create_oneview_client()

View File

@@ -100,7 +100,7 @@ class Online(object):
@staticmethod
def get_user_agent_string(module):
return "ansible %s Python %s" % (module.ansible_version, sys.version.split(' ')[0])
return "ansible %s Python %s" % (module.ansible_version, sys.version.split(' ', 1)[0])
def get(self, path, data=None, headers=None):
return self.send('GET', path, data, headers)

View File

@@ -1586,13 +1586,14 @@ class RedfishUtils(object):
boot = data[key]
annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues'
if annotation in boot:
allowable_values = boot[annotation]
if isinstance(allowable_values, list) and bootdevice not in allowable_values:
return {'ret': False,
'msg': "Boot device %s not in list of allowable values (%s)" %
(bootdevice, allowable_values)}
if override_enabled != 'Disabled':
annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues'
if annotation in boot:
allowable_values = boot[annotation]
if isinstance(allowable_values, list) and bootdevice not in allowable_values:
return {'ret': False,
'msg': "Boot device %s not in list of allowable values (%s)" %
(bootdevice, allowable_values)}
# read existing values
cur_enabled = boot.get('BootSourceOverrideEnabled')

View File

@@ -141,7 +141,7 @@ class Scaleway(object):
@staticmethod
def get_user_agent_string(module):
return "ansible %s Python %s" % (module.ansible_version, sys.version.split(' ')[0])
return "ansible %s Python %s" % (module.ansible_version, sys.version.split(' ', 1)[0])
def get(self, path, data=None, headers=None, params=None):
return self.send(method='GET', path=path, data=data, headers=headers, params=params)

View File

@@ -382,7 +382,10 @@ def main():
filters=dict(type='dict')
)
)
module = AnsibleModule(argument_spec=argument_spec)
module = AnsibleModule(
argument_spec=argument_spec,
supports_check_mode=True,
)
if module._name in ('ali_instance_facts', 'community.general.ali_instance_facts'):
module.deprecate("The 'ali_instance_facts' module has been renamed to 'ali_instance_info'",
version='3.0.0', collection_name='community.general') # was Ansible 2.13

View File

@@ -149,7 +149,7 @@ def main():
api_key=dict(required=True, type='str', no_log=True),
name=dict(required=True, type='str')
),
supports_check_mode=False
supports_check_mode=True,
)
if module._name in ('memset_memstore_facts', 'community.general.memset_memstore_facts'):
module.deprecate("The 'memset_memstore_facts' module has been renamed to 'memset_memstore_info'",

View File

@@ -274,7 +274,7 @@ def main():
api_key=dict(required=True, type='str', no_log=True),
name=dict(required=True, type='str')
),
supports_check_mode=False
supports_check_mode=True,
)
if module._name in ('memset_server_facts', 'community.general.memset_server_facts'):
module.deprecate("The 'memset_server_facts' module has been renamed to 'memset_server_info'",

View File

@@ -31,7 +31,14 @@ options:
type: str
disk:
description:
- hard disk size in GB for instance
- This option was previously described as "hard disk size in GB for instance" however several formats describing
a lxc mount are permitted.
- Older versions of Proxmox will accept a numeric value for size using the I(storage) parameter to automatically
choose which storage to allocate from, however new versions enforce the C(<STORAGE>:<SIZE>) syntax.
- "Additional options are available by using some combination of the following key-value pairs as a
comma-delimited list C([volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>]
[,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>])."
- See U(https://pve.proxmox.com/wiki/Linux_Container) for a full description.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(3). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.

View File

@@ -815,26 +815,27 @@ def get_vminfo(module, proxmox, node, vmid, **kwargs):
del kwargs[k]
# Split information by type
for k, v in kwargs.items():
if re.match(r'net[0-9]', k) is not None:
interface = k
k = vm[k]
k = re.search('=(.*?),', k).group(1)
mac[interface] = k
if (re.match(r'virtio[0-9]', k) is not None or
re.match(r'ide[0-9]', k) is not None or
re.match(r'scsi[0-9]', k) is not None or
re.match(r'sata[0-9]', k) is not None):
device = k
k = vm[k]
k = re.search('(.*?),', k).group(1)
devices[device] = k
re_net = re.compile(r'net[0-9]')
re_dev = re.compile(r'(virtio|ide|scsi|sata)[0-9]')
for k in kwargs.keys():
if re_net.match(k):
mac[k] = parse_mac(vm[k])
elif re_dev.match(k):
devices[k] = parse_dev(vm[k])
results['mac'] = mac
results['devices'] = devices
results['vmid'] = int(vmid)
def parse_mac(netstr):
return re.search('=(.*?),', netstr).group(1)
def parse_dev(devstr):
return re.search('(.*?)(,|$)', devstr).group(1)
def settings(module, proxmox, vmid, node, name, **kwargs):
proxmox_node = proxmox.nodes(node)
@@ -1200,8 +1201,9 @@ def main():
module.fail_json(vmid=vmid, msg='VM with vmid = %s does not exist in cluster' % vmid)
# Ensure the choosen VM name doesn't already exist when cloning
if get_vmid(proxmox, name):
module.exit_json(changed=False, vmid=vmid, msg="VM with name <%s> already exists" % name)
existing_vmid = get_vmid(proxmox, name)
if existing_vmid:
module.exit_json(changed=False, vmid=existing_vmid[0], msg="VM with name <%s> already exists" % name)
# Ensure the choosen VM id doesn't already exist when cloning
if get_vm(proxmox, newid):
@@ -1226,7 +1228,7 @@ def main():
if get_vm(proxmox, vmid) and not (update or clone):
module.exit_json(changed=False, vmid=vmid, msg="VM with vmid <%s> already exists" % vmid)
elif get_vmid(proxmox, name) and not (update or clone):
module.exit_json(changed=False, vmid=vmid, msg="VM with name <%s> already exists" % name)
module.exit_json(changed=False, vmid=get_vmid(proxmox, name)[0], msg="VM with name <%s> already exists" % name)
elif not (node, name):
module.fail_json(msg='node, name is mandatory for creating/updating vm')
elif not node_check(proxmox, node):
@@ -1302,7 +1304,7 @@ def main():
if update:
module.exit_json(changed=True, vmid=vmid, msg="VM %s with vmid %s updated" % (name, vmid))
elif clone is not None:
module.exit_json(changed=True, vmid=vmid, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid))
module.exit_json(changed=True, vmid=newid, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid))
else:
module.exit_json(changed=True, msg="VM %s with vmid %s deployed" % (name, vmid), **results)
except Exception as e:

View File

@@ -398,7 +398,14 @@ def main():
command.append(plan_file)
if needs_application and not module.check_mode and not state == 'planned':
rc, out, err = module.run_command(command, check_rc=True, cwd=project_path)
rc, out, err = module.run_command(command, check_rc=False, cwd=project_path)
if rc != 0:
if workspace_ctx["current"] != workspace:
select_workspace(command[0], project_path, workspace_ctx["current"])
module.fail_json(msg=err.rstrip(), rc=rc, stdout=out,
stdout_lines=out.splitlines(), stderr=err,
stderr_lines=err.splitlines(),
cmd=' '.join(command))
# checks out to decide if changes were made during execution
if ' 0 added, 0 changed' not in out and not state == "absent" or ' 0 destroyed' not in out:
changed = True

View File

@@ -160,7 +160,9 @@ def get_srs(session):
def main():
module = AnsibleModule({})
module = AnsibleModule(
supports_check_mode=True,
)
if not HAVE_XENAPI:
module.fail_json(changed=False, msg="python xen api required for this module")

View File

@@ -212,8 +212,8 @@ class TemplateModule(OpenNebulaModule):
def get_template_by_id(self, template_id):
return self.get_template(lambda template: (template.ID == template_id))
def get_template_by_name(self, template_name):
return self.get_template(lambda template: (template.NAME == template_name))
def get_template_by_name(self, name):
return self.get_template(lambda template: (template.NAME == name))
def get_template_instance(self, requested_id, requested_name):
if requested_id:

View File

@@ -127,7 +127,7 @@ def main():
host=dict(default=None),
vm=dict(default=None),
)
module = AnsibleModule(argument_spec)
module = AnsibleModule(argument_spec, supports_check_mode=True)
is_old_facts = module._name in ('ovirt_affinity_label_facts', 'community.general.ovirt_affinity_label_facts')
if is_old_facts:
module.deprecate("The 'ovirt_affinity_label_facts' module has been renamed to 'ovirt_affinity_label_info', "

View File

@@ -63,7 +63,7 @@ from ansible_collections.community.general.plugins.module_utils._ovirt import (
def main():
argument_spec = ovirt_info_full_argument_spec()
module = AnsibleModule(argument_spec)
module = AnsibleModule(argument_spec, supports_check_mode=True)
is_old_facts = module._name in ('ovirt_api_facts', 'community.general.ovirt_api_facts')
if is_old_facts:
module.deprecate("The 'ovirt_api_facts' module has been renamed to 'ovirt_api_info', "

Some files were not shown because too many files have changed in this diff Show More