Compare commits

...

98 Commits
2.0.0 ... 2.2.0

Author SHA1 Message Date
Felix Fontein
3f2111582d Release 2.2.0. 2021-03-08 12:38:28 +01:00
patchback[bot]
bd8634e04e Tidy up sanity checks ignore lines modules (batch 7) (#1970) (#1984)
* fixed validation-modules for plugins/modules/cloud/heroku/heroku_collaborator.py

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

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

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

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

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

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

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

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

* fixed validation-modules for plugins/modules/cloud/scaleway/scaleway_lb.py

* fixed validation-modules for plugins/modules/cloud/scaleway/scaleway_compute.py

* fixed validation-modules for plugins/modules/remote_management/oneview/oneview_network_set_info.py

* fixed validation-modules for plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py

* fixed validation-modules for plugins/modules/remote_management/oneview/oneview_datacenter_info.py

* fixed validation-modules for plugins/modules/remote_management/oneview/oneview_enclosure_info.py

* Tidy up sanity checks ignore lines modules (batch 7)

* added changelog fragment

* Missed a couple of lines in ingnore-2.11.txt

* fixed validation-modules for plugins/modules/cloud/packet/packet_volume_attachment.py

* Adjusted ignore files and changelog for packet_volume_attachment.py

* Rolled back ignore line for linode module

* Update plugins/modules/cloud/opennebula/one_image_info.py

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

* fixes from the PR

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-03-08 08:58:07 +01:00
patchback[bot]
1ae57fc5dd ini_file - allows adding empty string as a value (#1972) (#1981)
* Added integration test and fixed bug

* added changelog fragment

* Update changelogs/fragments/1972-ini_file-empty-str-value.yml

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

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

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-03-08 07:31:47 +01:00
patchback[bot]
1e5e0824d2 Extending manageiq modules with parameter resource_id (#719) (#1980)
* Extending modules with resource_id

* Added documentation

* Fixed syntax
Changed resource_type back to required true
Added description identifier

* Added changelog fragment.

* fixed syntax

* Improved changelog fragment content.

* Updated description

* Changed if statement

* Changed changelog fragement filename

* version bump

* removed duplicate type

* Apply suggestions from code review

* Update plugins/modules/remote_management/manageiq/manageiq_tags.py

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

Co-authored-by: phospi <phoffmann@spirit21.com>
2021-03-08 07:15:51 +01:00
Felix Fontein
7eaf795774 Prepare 2.2.0 release. 2021-03-08 06:59:10 +01:00
Felix Fontein
3dc25edeac Remove part of shippable config that's not needed for bot.
(cherry picked from commit ff4e4c055c)
2021-03-06 14:06:13 +01:00
patchback[bot]
a67ee6cead Added new module github_repo (#1683) (#1974)
* Added new module github_repo

* Fixed sanity errors

* Fixed sanity errors

* Unit tests for github_repo module

* Fixed import-before-documentation

* Added PyGithub dependency for unit tests

* Fixed errata

* Require Python >= 2.7

* Support for check_mode and other improvements

* Fixed import-before-documentation

* Improved module parameter requirements, check mode and docs

* Code improvements

* Fixed version tag

(cherry picked from commit 53c6b49673)

Co-authored-by: Álvaro Torres Cogollo <atorrescogollo@gmail.com>
2021-03-06 13:51:43 +01:00
patchback[bot]
9c5461dc12 Deprecation of parameters triggering the parameter-invalid sanity-check (#1927) (#1971)
* fixed validation-modules for plugins/modules/packaging/language/composer.py

* fixed validation-modules for plugins/modules/packaging/os/apt_rpm.py

* fixed validation-modules for plugins/modules/packaging/os/homebrew.py

* fixed validation-modules for plugins/modules/packaging/os/homebrew_cask.py

* fixed validation-modules for plugins/modules/packaging/os/opkg.py

* fixed validation-modules for plugins/modules/packaging/os/pacman.py

* fixed validation-modules for plugins/modules/packaging/os/slackpkg.py

* fixed validation-modules for plugins/modules/packaging/os/urpmi.py

* fixed validation-modules for plugins/modules/packaging/os/xbps.py

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

* fixed validation-modules for plugins/modules/system/puppet.py

* added changelog fragment

* adjustments from PR + fixes in changelog frag

* fixed deprecation of param "show_diff" in module "puppet"

* Update changelogs/fragments/1927-removed-parameter-invalid.yml

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

* Update plugins/modules/system/puppet.py

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

* removed unnecessary ignore lines, adjustment in changelog frag

* no need to explicitly call deprecate() when param marked for removal

* Update changelogs/fragments/1927-removed-parameter-invalid.yml

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

* Adjustments in changelog fragment, per PR

* bumping deprecation to 7.0.0

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-03-05 08:41:55 +01:00
patchback[bot]
0b59a71ae7 Bugfix/manageiq inventory (#720) (#1963)
* Extending modules with resource_id

* Added documentation

* Revert previous PR

* Added filter for active vm's

* Added changelog fragment

* Update changelogs/fragments/720-cloudforms_inventory.yml

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

Co-authored-by: phospi <phoffmann@spirit21.com>
2021-03-04 08:29:21 +01:00
patchback[bot]
720de141b5 Fix: nmcli - Ensure slave-type for bond-slave (#1882) (#1961)
* Fix: nmcli - Ensure slave-type for bond-slave

Hello 🙂 

When using bond-slave type, by default command sent to nmcl is:

['/usr/bin/nmcli', 'con', 'add', 'type', 'bond-slave', 'con-name', 'enp129s0f0', 'connection.interface-name', 'enp129s0f0', 'connection.autoconnect', 'yes', 'connection.master', 'bond0']

Which is not enough, nmcli will complain that connection.slave-type is missing. This small fix solve this issue.

If this change is approved, I will add the changelog fragment.

* Fix: nmcli - Adding changelog fragment for 1882

* Update changelogs/fragments/1882-fix-nmcli-ensure-slave-type-for-bond-slave.yml

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

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

Co-authored-by: Ox <oxedions@gmail.com>
2021-03-04 08:27:40 +01:00
patchback[bot]
7ec6025690 zfs: avoid errors with creation-only properties (#1833) (#1959)
* avoid errors with creation-only properties

* add changelog fragment

* Apply suggestion to changelog fragment

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

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

Co-authored-by: sam-lunt <samuel.j.lunt@gmail.com>
2021-03-04 08:27:27 +01:00
patchback[bot]
53a5cdaed7 consul_io inventory script: fixes awx and python 3 kv_group (#620) (#1956)
* feat(env): extending configuration options by env variables

* feat(env): extending config option docs

* feat(consul_io): fix byte chain decoding for python3

* fix(pep8): E128

* changelog added

* Update changelogs/fragments/620-consul_io-env-variables-conf-based.yml

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

* Update changelogs/fragments/620-consul_io-env-variables-conf-based.yml

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

* Update changelogs/fragments/620-consul_io-env-variables-conf-based.yml

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

* fix(typo): adding dots

Co-authored-by: Davy Bondeau <davy.bondeau@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3f882ee6a2)

Co-authored-by: atbore-phx <atbore-phx@users.noreply.github.com>
2021-03-04 08:27:19 +01:00
patchback[bot]
693efb35b3 Jenkins build module (#745) (#1957)
* Jenkins build module

A module for queuing and deleting jenkins builds.

* CI fixes

* More CI fixes.

* Even more CI fixes

* Fixing symlink

* Update plugins/modules/web_infrastructure/jenkins_build.py

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

* removed ansible meta section

* Added unit tests.

* fix tests

* more test fixes.

* Completed tests.

Mocked jenkins api calls.
Fixed some logging.

* Update plugins/modules/web_infrastructure/jenkins_build.py

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

* Update plugins/modules/web_infrastructure/jenkins_build.py

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

* Update plugins/modules/web_infrastructure/jenkins_build.py

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

* Update plugins/modules/web_infrastructure/jenkins_build.py

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

* Cleaned up default items

And removed supports check mode flag.

* setting name param required

* Update plugins/modules/web_infrastructure/jenkins_build.py

Co-authored-by: Brett Milford <brettmilford@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit ad8aa1b1e6)

Co-authored-by: Brett <19863984+brettmilford@users.noreply.github.com>
2021-03-04 08:27:10 +01:00
patchback[bot]
07cd51a33b Adding another example for tss lookup (#1945) (#1948)
* Adding another example for tss lookup

A more detailed example using self-hosted secrets server as investigated in #1943

* Update plugins/lookup/tss.py

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

* Better line breaking

* Update plugins/lookup/tss.py

Seconded!

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

* Remove newline to pass tests

* Update plugins/lookup/tss.py

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

Co-authored-by: Jim Speir <jimbo80982@gmail.com>
2021-03-02 22:23:28 +01:00
patchback[bot]
c80416164b Feat: nmcli - Add method4 and method6 (#1894) (#1944)
* Feat: nmcli - Add method4 and method6

Allows to manipulate ipv4.method and ipv6.method.

Is mandatory to manage Bond interfaces with no native vlans but only tagged vlans.

* Fix: nmcli - Add changelog fragment for 1894

* Fix: nmcli - Add choices for method4 and method6

* Update plugins/modules/net_tools/nmcli.py

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

* Update changelogs/fragments/1894-feat-nmcli-add-method4-and-method6.yml

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

* Update plugins/modules/net_tools/nmcli.py

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

* Fix: nmcli - Update documentation

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Fix: nmcli - Simplify code

* Update plugins/modules/net_tools/nmcli.py

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

* Fix: nmcli - Update ip6 documentation

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

Co-authored-by: Ox <oxedions@gmail.com>
2021-03-02 13:09:38 +01:00
Felix Fontein
a61bc5ab34 Also mention plugins/modules added in 1.1.0, 1.2.0 and 1.3.0 in 2.0.0 changelog, as it claims to contain all changes since 1.0.0. (#1934) 2021-03-01 13:02:08 +01:00
patchback[bot]
8ac8fa0aa9 Improved ModuleHelper.run_command() (#1867) (#1938)
* Improved run_command signature and behaviour

- extra_params has been removed from the signature
- params now can be either str or dict (containing the param value)

* Reverted the removal of the method parameter, and added changelog fragment

* Update changelogs/fragments/1867-modhelper-cmdmixin-dict-params.yml

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

* Update plugins/module_utils/module_helper.py

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

* adjustement per PR

* Update plugins/module_utils/module_helper.py

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-28 15:34:46 +01:00
patchback[bot]
b76994ee6e grove: message -> message_content (#1929) (#1936)
* grove: message -> message_content

* Remove no longer needed ignore.txt lines.

(cherry picked from commit bec43041a9)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-27 23:11:44 +01:00
patchback[bot]
746bd3ea5d Actually use option. (#1928) (#1937)
(cherry picked from commit b4c136125e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-27 23:11:37 +01:00
patchback[bot]
68baf56ea6 Add version_sort filter to properly sort list of versions (#1916) (#1932)
* Add version_sort filter to properly sort list of versions

* Fix all comments from Felix

- add changelog fragment
- fix test by removing runme.sh/yml and renaming to filter_version_sort
- use fully qualified name of filter in test case

* Remove wrong plugin.test changelog fragment

Ups...

* Properly name the file version_sort.py

* Update changelogs/fragments/1916-add-version-sort-filter.yml

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

Co-authored-by: Eric L <ewl+git@lavar.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4a8d6cf7cc)

Co-authored-by: Eric L <ericzolf@users.noreply.github.com>
2021-02-27 19:54:39 +01:00
patchback[bot]
87377dd23f Proxmox inventory: Add some sanitization to url parameter (#1914) (#1931)
* Added rstrip to the URL field to prevent issues when users add a trailing / in the config of this module

* Added changelog fragment

* Sorry Mr. Linter, I have removed the empty line :-)

* Fixed punctuation

* Fixed punctuation

(cherry picked from commit 20bd065e77)

Co-authored-by: Jeffrey van Pelt <jeff@vanpelt.one>
2021-02-27 17:23:02 +01:00
patchback[bot]
29f028e33b bugfix: xfs_quota feedback on projects not initialized has changed (#1596) (#1923)
* bugfix: xfs_quota feedback on projects not initialized has changed

* changelog fragment

* Update changelogs/fragments/1596-xfs_quota-feedback_on_projects_not_initialized_has_changed.yml

Thanks for this, felixfontein

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

* xfs_quota is not necessarily in PATH

* pep8 and formatting

* Test was wrong. It needs to be changed

* formatting

* pep8 and formatting

* xfs_quota is not necessarily in PATH

* pep8 and formatting

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

Co-authored-by: William Leemans <bushvin@users.noreply.github.com>
2021-02-27 09:57:58 +01:00
patchback[bot]
196e8fe4e3 yum_versionlock: do lock/unlock concurrently (#1912) (#1920)
* Change all packages at once in yum_versionlock module

* Re-enable tests

* Convert package list to packages string

* Fix module

* Change variable name to make it appropriate

* Fix module check_mode

* Revert "Fix module" and apply felixfontein suggestion

This reverts commit 5936da3198.

* Rename package to packages

* Only change packages which are needed

* Ignore if list is empty

* Add changelog

(cherry picked from commit 811b609b05)

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-02-26 23:37:30 +01:00
Felix Fontein
83c6d18bc0 Improve meta/runtime.yml deprecation messages. (#1918) (#1919)
(cherry picked from commit 5447910a0b)
2021-02-26 23:05:56 +01:00
patchback[bot]
1314b0d7b2 Tidy up sanity checks (2021/Batch 3 - who's counting) (#1885) (#1910)
* fixed validation-modules for plugins/modules/packaging/language/pip_package_info.py

* fixed validation-modules for plugins/modules/packaging/language/maven_artifact.py

* fixed validation-modules for plugins/modules/packaging/language/bundler.py

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

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

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

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

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

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

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

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

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

* fixed validation-modules for plugins/modules/clustering/consul/consul_session.py

* fixed validation-modules for plugins/modules/clustering/consul/consul_kv.py

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

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

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

* fixed validation-modules for plugins/modules/cloud/packet/packet_sshkey.py

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

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

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

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

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

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_app.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_db.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_domain.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_mailbox.py

* fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_site.py

* fixed validation-modules for plugins/modules/remote_management/lxca/lxca_cmms.py

* fixed validation-modules for plugins/modules/remote_management/lxca/lxca_nodes.py

* missed one "elements" in sensu_handler

* Tidy up batch of sanity checks ignore lines

* missed lines in ignore-2.9.txt

* fixed validation-modules for plugins/modules/clustering/consul/consul_acl.py

* Update ignore-2.9.txt

Removed consul_acl.py from ignore-2.9.txt

* Apply suggestions from code review

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

* Update plugins/modules/notification/pushbullet.py

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

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

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

* added changelog fragment

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

* Update changelogs/fragments/1885-sanity-check-fixes-batch3.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-26 11:57:51 +01:00
patchback[bot]
be94a014c8 Disable way too slow yum_versionlock tests. (#1907) (#1909)
(cherry picked from commit afe9d0fdb3)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-26 11:37:15 +01:00
patchback[bot]
039c3da7dc BOTMETA.yml: Remove vfauth as etcd3 maintainer (#1900) (#1904)
(cherry picked from commit 71706031c7)

Co-authored-by: Victor Fauth <victor@fauth.pro>
2021-02-25 15:52:30 +01:00
patchback[bot]
2480250f1b cobbler_sync cobbler_system fix TLS check when validate_certs (#1880) (#1902)
Ref: https://www.python.org/dev/peps/pep-0476/
Issue #1878
add changelog fragment

Co-authored-by: Nicolas Marcq <nicolas.marcq@hpe.com>
(cherry picked from commit 36dea9ab97)

Co-authored-by: Nicolas Marcq <nico.marcq@gmail.com>
2021-02-25 15:17:44 +01:00
patchback[bot]
860f0e12c0 proxmox_kvm: trivial patch for github issue #1875 (#1895) (#1899)
* proxmox_kvm: trivial patch for Github issue #1875

* proxmox_kvm: add a changelog fragment

* Update changelogs/fragments/1895-proxmox-kvm-fix-issue-1875.yml

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

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

Co-authored-by: Tristan Le Guern <tristan.leguern-presta@deveryware.com>
2021-02-25 13:07:40 +01:00
patchback[bot]
2f56fd7b2a Tidy up sanity checks ignore lines for source_control/* modules (#1893) (#1896)
* fixed validation-modules for plugins/modules/source_control/git*

* Tidy up sanity checks ignore lines for source_control/* modules

* removed unnecessary ignore lines from 2.9 and 2.11

(cherry picked from commit cf5e9bf44c)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-25 10:05:46 +01:00
patchback[bot]
084879632a fixed Python 3 keys() usage (#1861) (#1891)
* fixed python3 keys()

* added changelog fragment

* Update plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

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

* Update plugins/cache/redis.py

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

* rolledback redis.py per PR

* Update plugins/modules/monitoring/sensu/sensu_check.py

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

* removed unnecessary ignore lines

* adding memcached and one case in redis is indeed necessary

* Update changelogs/fragments/1861-python3-keys.yml

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

* Update changelogs/fragments/1861-python3-keys.yml

* Update changelogs/fragments/1861-python3-keys.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-24 19:36:37 +01:00
patchback[bot]
4eef56b7b3 Remove unneeded fields (with typos). (#1887) (#1888)
(cherry picked from commit e353390e6c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-23 23:48:34 +01:00
patchback[bot]
13929acf02 Since gitlab_project_members is a copy if gitlab_group_members with small modifications, it needs to contain the copyright notices of that module as well as the authors. (#1874) (#1884)
(cherry picked from commit 0b9893959f)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-23 10:55:40 +01:00
patchback[bot]
070bcf80c4 New module proxmox_storage_info (#1844) (#1879)
* proxmox_storage_info: new module

Simple info module dedicated to the retrieval of information about the
storages available on a Proxmox VE cluster.

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

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

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

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

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

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

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

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

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

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

Co-authored-by: Tristan Le Guern <tristan.leguern-presta@deveryware.com>
2021-02-22 18:36:23 +01:00
patchback[bot]
0cf2a5ad05 deploy_helper: fix a bug when not defining release on state=clean (#1859) (#1877)
* Fix a bug when not defining release on state=clean

* Add changelog fragment

(cherry picked from commit abfbe2a48d)

Co-authored-by: Ramon de la Fuente <ramon@future500.nl>
2021-02-22 09:29:36 +01:00
patchback[bot]
76a64ea733 Improve infoblox inventory script dependencies. (#1871) (#1873)
(cherry picked from commit c0f3a63e18)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-21 22:30:51 +01:00
patchback[bot]
115eab2cfa added gitlab_project_members (#1829) (#1870)
* added gitlab_project_members

* fix code style

* added some arg to doc

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

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

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

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

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

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

* integration test for gitlab_project_members module

Co-authored-by: Sergey Mikhaltsov <s.mikhaltsov@leadgid.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 389b004879)

Co-authored-by: Sergey Mikhaltsov <metanovii@gmail.com>
2021-02-21 18:19:10 +01:00
patchback[bot]
dbba813e23 Fixed imc_rest session logout (#1743) (#1869)
* Fixed imc_rest session logout

* Update plugins/modules/remote_management/imc/imc_rest.py

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

* Update changelogs/fragments/1735-imc-sessions.yml

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

* Trying with try/finally

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-21 18:16:39 +01:00
patchback[bot]
7daf78962b Disable flatpack_remote test due to expired key. (#1862) (#1865)
(cherry picked from commit 57f56b02d8)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-20 10:51:34 +01:00
patchback[bot]
cf9fff5238 proxmox_kvm: add integration tests (#1849) (#1854)
(cherry picked from commit 682674dd5f)

Co-authored-by: Tristan Le Guern <tristan.leguern-presta@deveryware.com>
2021-02-18 12:15:24 +01:00
Felix Fontein
d8d68babe4 Revert "Revert new feature so that we can make a bugfix release. Will re-revert this afterwards."
This reverts commit afba9a11af.
2021-02-17 22:59:37 +01:00
Felix Fontein
3f46cdc588 Release 2.1.1. 2021-02-17 21:49:42 +01:00
Felix Fontein
ea530784b8 Adjust version. 2021-02-17 21:46:40 +01:00
patchback[bot]
dc2fa05b1f proxmox_kvm: fix undefined local variable status (#1847) (#1851)
* proxmox_kvm: undefined local variable status

* proxmox_kvm: Add a changelog fragment

* Update changelogs/fragments/1847-proxmox-kvm-fix-status.yml

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

* proxmox_kvm: fix the RETURN document

* proxmox_kvm: fix name variable when state=current

The variable name is not always defined as the module can be called with
just a vmid.

Before:

> "msg": "VM None with vmid = 118 is stopped"

After:

> "msg": "VM test-instance with vmid = 118 is stopped"

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

Co-authored-by: Tristan Le Guern <tristan.leguern-presta@deveryware.com>
2021-02-17 21:44:02 +01:00
Felix Fontein
b2e51272ad Prepare 2.1.0 release. 2021-02-17 21:33:57 +01:00
Felix Fontein
afba9a11af Revert new feature so that we can make a bugfix release. Will re-revert this afterwards.
Revert "runit - deprecate param dist (#1838) (#1845)"

This reverts commit c3ac479ae2.
2021-02-17 21:32:16 +01:00
patchback[bot]
c3ac479ae2 runit - deprecate param dist (#1838) (#1845)
* Deprecate param dist

* added changelog fragment

* added changelog fragment

* Removed ignore lines for runit

(cherry picked from commit e0dd4b240f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-17 08:01:13 +01:00
Felix Fontein
7e367244f7 Next expected release is 2.2.0. 2021-02-16 13:36:12 +01:00
Felix Fontein
331d2c7651 Release 2.1.0. 2021-02-16 12:13:27 +01:00
patchback[bot]
b35a262378 StatsD Module (#1793) (#1842)
* Pushing my WIP

* Update DOCUMENTATION

* Update EXAMPLES

* More friendly name

* Finish up the counter and gauge logic

* Cleanup DOCUMENTATION and add metric_type

* Apply autopep8

* Fixup the exits

* Stubbing out unit tests

* Whitespace

* Whitespace

* Removing unused modules

* Remove unused modules

* Might have have a prefix

* Rearrange imported modules

* Cleanup the if/elif blob

* Require python >= 2.7

* Update DOCUMENTATION

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

* Update DOCUMENTATION

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

* Add import guarding on statsd

* Add missing future import

* Include missing_required_lib

* Fixing sanity tests

* Fixing delta default and choices

* Formatting

* Close tcp connection

* Refactoring and unit tests

* Fix pep8 sanity tests

* Putting requirements.txt back to main

* Apply suggestions from code review

Co-authored-by: Mark Mercado <mmercado@digitalocean.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6165438689)

Co-authored-by: Mark Mercado <mamercad@gmail.com>
2021-02-16 12:09:58 +01:00
patchback[bot]
7d400663b6 Previously LXD profiles were overwritten, now these are merged. (#1813) (#1836)
* added ``merge_profile`` parameter to merge configurations from the play to an existing profile

* add fragment

* cosmetic changes

Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
(cherry picked from commit 6dd4cd0eb7)

Co-authored-by: Frank Dornheim <524257+conloos@users.noreply.github.com>
2021-02-16 10:58:34 +01:00
patchback[bot]
0d0884b069 Tidy up validations + bug fixes + deprecations (#1830) (#1841)
* fixed validation-modules for plugins/modules/database/misc/elasticsearch_plugin.py

* fixed validation-modules for plugins/modules/database/misc/kibana_plugin.py

* fixed validation-modules for plugins/modules/database/misc/riak.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_info.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_role.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_schema.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_user.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_domain.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host_ports.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_pool.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_vol.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_vol_map.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host_ports.py

* fixed validation-modules for plugins/modules/system/runit.py

* fixed validation-modules for plugins/modules/source_control/bzr.py

* fixed validation-modules for plugins/modules/source_control/hg.py

* fixed validation-modules for plugins/modules/storage/emc/emc_vnx_sg_member.py

* fixed validation-modules for plugins/modules/identity/opendj/opendj_backendprop.py

* fixed validation-modules for plugins/modules/files/iso_extract.py

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

* fixed validation-modules for plugins/modules/database/aerospike/aerospike_migrations.py

* Tidy up a number of sanity checks for some modules

* added changelog fragment

* Some parameters in vertica_* had their aliases documented as the name, and sometimes vice-versa as well

* Adjustments per PR

* Rolled back sanity ignores for runit

* Update changelogs/fragments/1830-valmod_docmissingtype_batch1.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-16 09:10:13 +00:00
patchback[bot]
dd400e8c21 Tidy up all pylint:blacklisted-name ignore lines (#1819) (#1839)
* fixed validation-modules for plugins/callback/hipchat.py

* fixed validation-modules for plugins/connection/lxc.py

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

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

* fixed validation-modules for plugins/modules/system/alternatives.py

* fixed validation-modules for plugins/modules/system/beadm.py

* fixed validation-modules for plugins/modules/system/cronvar.py

* fixed validation-modules for plugins/modules/system/dconf.py

* fixed validation-modules for plugins/modules/system/interfaces_file.py

* fixed validation-modules for plugins/modules/system/java_cert.py

* fixed validation-modules for plugins/modules/system/lvg.py

* fixed validation-modules for plugins/modules/system/lvol.py

* fixed validation-modules for plugins/modules/system/parted.py

* fixed validation-modules for plugins/modules/system/timezone.py

* fixed validation-modules for plugins/modules/web_infrastructure/rundeck_acl_policy.py

* Tidy up all pylint:blacklisted-name sanity checks ignore lines

* Missed one in statusio_maintenace.py

* fixed validation-modules for plugins/modules/system/filesystem.py

* Missed one in gconftool2.py

* Missed one in alternatives.py

* Using dummies now

* fixed indentation

* Made all the changes about replacing _ with dummy

* Rollback bug fixed

* Rollback bug fixed, part II

* added changelog fragment

* Improved changelog frag message per PR

(cherry picked from commit 03b7b39424)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-16 08:46:20 +01:00
patchback[bot]
a60f9bc78b dnsimple: Add support for CAA records (#1814) (#1835)
(cherry picked from commit 03fd6bd008)

Co-authored-by: Craig Roberts <github@craig.craig0990.co.uk>
2021-02-16 07:55:35 +01:00
Felix Fontein
47714ecf79 Add release summary for 1.2.0. 2021-02-16 07:48:13 +01:00
patchback[bot]
d15ed4135b Tidy up validate-modules:parameter-list-no-elements (batch 1) (#1795) (#1834)
* fixed validation-modules for plugins/modules/storage/netapp/na_ontap_gather_facts.py

* fixed validation-modules for plugins/modules/source_control/gitlab/gitlab_runner.py

* fixed validation-modules for plugins/modules/packaging/os/redhat_subscription.py

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

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

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

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

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

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

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

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

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

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

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

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

* fixed validation-modules for plugins/modules/identity/onepassword_info.py

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

* fixed validation-modules for plugins/modules/files/xml.py

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

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

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

* fixed validation-modules for plugins/modules/cloud/packet/packet_device.py

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

* fixed validation-modules for plugins/module_utils/oracle/oci_utils.py

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

* Tidy up validate-modules:parameter-list-no-elements for some modules

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

* Fixed pending issues from CI validation

* Fixed xml module elements for add_children & set_children

* added changelog fragment

* typo

* fix wording in changelog frag

(cherry picked from commit f33323ca89)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-16 07:38:50 +01:00
patchback[bot]
bd61228e40 proxmox_kvm: 500 error args parameter (#1783) (#1832)
* don't add args if set to 'no_defaults'

* never add force even if false, will require archive parameter other which is not implemented

* remove trailing whitespace

* add changelog fragment

* Update changelogs/fragments/1783-proxmox-kvm-fix-args-500-error.yaml

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

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

Co-authored-by: almdudler777 <43605831+almdudler777@users.noreply.github.com>
2021-02-16 07:10:40 +01:00
patchback[bot]
26d7c28b33 ease limitation for nios_host_record DNS Bypass (#1788) (#1826)
* ease limitation for nios_host_record DNS Bypass, the bypass should be allowed when configure_dns is disabled and view is set other than default

* add changelog fragment

Co-authored-by: Nils <ext-nils.haglund@elisa.fi>
(cherry picked from commit 8fae693d9c)

Co-authored-by: shieni <shieni@users.noreply.github.com>
2021-02-15 09:10:18 +01:00
patchback[bot]
2e533daffa Fix undeclared result for nomad_job_info module (#1721) (#1823)
* Fix unassigned variable

* Create 1721-fix-nomad_job_info-no-jobs-failure.yml

* refactor usage of variables in nomad_job_info

* Update changelogs/fragments/1721-fix-nomad_job_info-no-jobs-failure.yml

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

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

Co-authored-by: Víctor Suárez Fernández <15276132+vicsufer@users.noreply.github.com>
2021-02-15 09:04:44 +01:00
patchback[bot]
6c50119eab Added VMID to all returns (#1715) (#1824)
* Added VMID to all returns

Also added in the docs promised return of MAC and devices when state ==
current.

Fixes: #1641

* Revert devices and mac as get_vminfo works differently then I expected

* Added status output to a few more calls

* Update RETURNS docs

* Remove vmid where it is not available

* Added changelog fragment

* Update changelogs/fragments/1715-proxmox_kvm-add-vmid-to-returns.yml

You're right, this message is way better then mine.. :-)

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

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

Co-authored-by: Jeffrey van Pelt <jeff@vanpelt.one>
2021-02-15 08:57:38 +01:00
patchback[bot]
bc3435b993 Tidy up validation for storage/zfs modules (#1766) (#1821)
* fixed validation-modules for plugins/modules/storage/zfs/zfs.py

* fixed validation-modules for plugins/modules/storage/zfs/zfs_delegate_admin.py

* fixed validation-modules for plugins/modules/storage/zfs/zfs_facts.py

* fixed validation-modules for plugins/modules/storage/zfs/zpool_facts.py

* Tidy up validate-modules ignores for storage/zfs modules

* removed ignore lines in 2.11 files as well

* added changelog fragment per PR

* Update changelogs/fragments/1766-zfs-fixed-sanity.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-15 07:27:23 +00:00
patchback[bot]
370f5d8082 Implemented fix pointed in issue (#1760) (#1818)
(cherry picked from commit 41bc7816f3)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-14 16:05:59 +01:00
patchback[bot]
e77c5413c9 Adjusted django_manage integration test files to reduce ignore lines in sanity tests (#1805) (#1810)
(cherry picked from commit e247300523)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-13 12:49:36 +01:00
patchback[bot]
800ee1bae0 Tidy up validate-modules ignores for cloud/centurylink modules (#1771) (#1811)
* fixed validation-modules for plugins/modules/cloud/centurylink/clc_alert_policy.py

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

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

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

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

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

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

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

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

* added changelog fragment per PR

(cherry picked from commit 865acdd4cf)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-13 12:35:18 +01:00
patchback[bot]
8de8d21062 Make selective callback work with ansible-core 2.11. (#1807) (#1809)
(cherry picked from commit 367c3c43ff)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-13 12:24:10 +01:00
patchback[bot]
81e71b5034 Improved parameter handling on proxmox modules (#1765) (#1801)
* Improved parameter handling on proxmox modules

* removed unused imports

* rollback change in plugins/modules/cloud/misc/proxmox_user_info.py

* added changelog fragment

* Update changelogs/fragments/1765-proxmox-params.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-12 17:08:14 +01:00
patchback[bot]
44ce63ed85 Change type str -> path in argspec. (#1741) (#1800)
(cherry picked from commit f12df1d21b)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-12 08:23:40 +01:00
patchback[bot]
a3c9c688b9 Removed parameter-list-no-elements validation errors from redfish modules (#1761) (#1799)
* Removed parameter-list-no-elements validation errors from redfish modules

* added changelog fragment per PR

* Update changelogs/fragments/1761-redfish-tidy-up-validation.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-12 07:14:07 +01:00
patchback[bot]
a332ed4429 Prevented the expansion of parameters in run_command() (#1794) (#1796)
(cherry picked from commit 436bbb0077)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-12 06:38:37 +01:00
patchback[bot]
91571f8bff Update CI (#1782) (#1787)
* Update targets for CI for devel branch; move some targets to stable-2.10.

* Skipping test on RHEL 8.3 (it is already skipped on RHEL 8.2).

* Linting.

* Shut 2.9/2.10 pylint complaints up.

(cherry picked from commit e9551df5ed)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-11 11:10:42 +01:00
patchback[bot]
43856eaa6f Fix typo in aerospike_migration module. (#1740) (#1785)
(cherry picked from commit 9a6031ab4e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-11 07:31:05 +01:00
patchback[bot]
ae87b5479a only set param features when variable is not empty (#1763) (#1781)
* only set param features when variable is not empty

* Apply suggestions from code review

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

Co-authored-by: Topper Harly <topperharly@gmx.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 562ff7efb7)

Co-authored-by: topperharly <topperharly@users.noreply.github.com>
2021-02-10 22:32:01 +01:00
patchback[bot]
42cd462780 redfish module_utils: case insesitive search for situations where the hostname/FQDN on iLO is in caps (#1744) (#1780)
* case insesitive search for situations where the hostname/FQDN on iLO is in caps

* handle explicit and implicit nic_addr variable, added changelog fragment

* changelog linter fix

* changelog typo fix

Co-authored-by: Łukasz Kurdziel <Lukasz.Kurdziel@GAINCapital.com>
(cherry picked from commit 93e0aa7557)

Co-authored-by: lukurde <47138492+lukurde@users.noreply.github.com>
2021-02-10 20:37:49 +01:00
patchback[bot]
d871378574 xfconf: feature flag to disable facts and deprecation warning (#1747) (#1778)
* Added feature flag to disable facts and its associated deprecatoin warning

* added changelog fragment

* Update plugins/modules/system/xfconf.py

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

* Update plugins/modules/system/xfconf.py

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

* Update plugins/modules/system/xfconf.py

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

* Fixed deprecation message

* Fixed changelog frag

* Update changelogs/fragments/1475-xfconf-facts.yml

* Update plugins/modules/system/xfconf.py

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-10 20:37:31 +01:00
patchback[bot]
983b292399 timezone: add gentoo and alpine linux support (#1722) (#1779)
* add alpine linux as NosystemdTimezone

* syntax error fix and more self variables, so it works now...

* use timezone name instead of timezone path for setup-timezone command

* alpine linux zoneinfo links to /etc/zoneinfo instead of /usr/share/zoneinfo, so correct re.search() pattern

* add changelog fragment

* add gentoo linux support

* Update 1722_timezone.yml

* refactor code

(cherry picked from commit 9aef0ed17e)

Co-authored-by: Anatoly Pugachev <matorola@gmail.com>
2021-02-10 20:37:15 +01:00
patchback[bot]
6831aa5501 document what filesystem types are supported by 'resizefs' option (#1753) (#1775)
* document what filesystem types are supported by 'resizefs' option

* add changelog fragment

* remove info about lvol documentation changes in changelog fragment

(cherry picked from commit d1e54d2fd1)

Co-authored-by: quidame <quidame@poivron.org>
2021-02-10 13:09:33 +01:00
patchback[bot]
2d8a94a459 azure-pipelines: update container version (#1770) (#1773)
(cherry picked from commit e898e52d1b)

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-02-10 10:12:56 +01:00
patchback[bot]
f721e76fdc Tidy up validate-modules ignores for remote_management/ipmi modules (#1767) (#1769)
* fixed validation-modules for plugins/modules/remote_management/ipmi/ipmi_boot.py

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

* Tidy up validate-modules ignores for remote_management/ipmi modules

(cherry picked from commit 89ffb04dff)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-02-10 08:24:33 +01:00
Felix Fontein
3eadb9d637 Revert "Revert new features since the 2.0.0 release so we can release 2.0.1 from this branch."
This reverts commit 1d90e91528.
2021-02-09 15:42:39 +01:00
Felix Fontein
033582b696 Next expected release is 2.1.0. 2021-02-09 15:42:39 +01:00
Felix Fontein
974997594f Release 2.0.1. 2021-02-09 13:34:53 +01:00
Felix Fontein
fa8ce6dea8 Add 2.0.1 relesae summary. 2021-02-09 13:32:06 +01:00
Felix Fontein
1d90e91528 Revert new features since the 2.0.0 release so we can release 2.0.1 from this branch.
Revert "datadog_monitor: Add missing monitor types query alert, trace-analytics alert, rum alert (#1723) (#1733)"
Revert "homebrew_tap: Add support for brew search path (#1708) (#1709)"

This reverts commits f613983cb4 and 646ca74810.
2021-02-09 13:30:39 +01:00
patchback[bot]
a90e2c8002 Various fixes for updating existing gitlab users (#1724) (#1757)
* fixes various issues related to updating an ...

... existing gitlab user, in detail:

  - fixes updating admin status not working
  - fixes user passwords not updated
  - fixes confirmation skipping param ignored for user updates
  - added tests for code changes

* fixing sanity issues

* fixing sanity issues 02

* fixing sanity issues 03

* fixing sanity issues 04

* fixing unit test failures

* fixing unit test failures 02

* add changelog fragment

* fixing unit test failures 03

* forgot to add changelog fragment

* fix changelog sanity issues

* fix changelog sanity issues 02

* incorporate review suggestions

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
(cherry picked from commit c03ae754d2)

Co-authored-by: morco <thegreatwiper@web.de>
2021-02-09 12:02:03 +01:00
patchback[bot]
c506375f2a Fix CI (#1752) (#1754)
* Limit cryptography to < 3.4 for Python < 3.6.

* Work around old pip versions.

* Use constraints file when installing stormssh.

* Work around old pip in RHEL8.2, CentOS 8, Ubuntu 18.04, and OpenSuSE 15

(cherry picked from commit 909ac92fe2)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-09 10:28:39 +01:00
patchback[bot]
4def9439bd Fix a bunch of potential security issues (secret leaking) (#1736) (#1751)
* Fix a bunch of potential security issues (secret leaking).

* oneandone_server was already ok.

* Add more parameters for pagerduty_alert.

* Add more no_log=True.

(cherry picked from commit 29bd5a9486)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-08 17:04:38 +01:00
patchback[bot]
023654473b Make sure mercurial is also installed on OpenSuSE. (#1734) (#1738)
(cherry picked from commit 701a89eb1c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-05 08:29:28 +01:00
patchback[bot]
a216f15dd9 parted: fix regex for version match and partition size output (#1695) (#1732)
* Fix 2 regex in parted related to parted version string and to parsing partition size output.

* Added changelog fragment.

* Updated changelog as per recommendation.

* Fix the regex matching the parted version. The space character at the end of the string may or may not be always present

* provided sample version output and corrected regex to match

* add/correct changelog fragment

* split parted_version function to allow creating a test unit

* test unit for parted version info

* ansible-test sanity fixes

* review fix

* Update changelogs/fragments/1695-parted-updatedregex.yaml

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

* comment fixes

* better function name

* Update plugins/modules/system/parted.py

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

* comment fixes

Co-authored-by: Claude Robitaille <claude@cbcr.me>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 43da5b88db)

Co-authored-by: Anatoly Pugachev <matorola@gmail.com>
2021-02-05 07:51:43 +01:00
patchback[bot]
f613983cb4 datadog_monitor: Add missing monitor types query alert, trace-analytics alert, rum alert (#1723) (#1733)
* Add missing Datadog monitor types
This commit adds the following monitor types: query alert, trace-analytics alert, rum alert

* changelog PR1723 datadog_monitor types

* datadog_monitor 1723 Apply suggestions from code review

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

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

Co-authored-by: Rick Sherman <rick@shermdog.com>
2021-02-05 06:51:27 +00:00
patchback[bot]
c22199794d Add no_log to some module arguments (#1725) (#1730)
* Add no_log to some module arguments

This will prevent potentially sensitive information from being printed to
the console.

See: CVE-2021-20191

* Update changelogs/fragments/CVE-2021-20191_no_log.yml

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

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

Co-authored-by: David Moreau Simard <dmsimard@redhat.com>
2021-02-04 21:54:11 +01:00
patchback[bot]
24b1d92e84 module filesystem: partially fix idempotency issue #1457 (resizefs) (#1478) (#1720)
* Use 'xfs_info' to query fs size, that doesn't always require the device be
  mounted. Although still query mountpoint first for backward compatibility.
* Do not fail whith fstype=xfs and resizefs=yes if filesystem already fills
  its underlying device.
* Include xfs in the tasks that test idempotency of resizefs option
* Add changelogs/fragments/1478-filesystem-fix-1457-resizefs-idempotency.yml

(cherry picked from commit aa95d8a5b7)

Co-authored-by: quidame <quidame@poivron.org>
2021-02-03 10:42:29 +01:00
patchback[bot]
4bc44e4062 sensu-silence: fix json parsing of sensu API response (#1703) (#1718)
* sensu-silence: fix json parsing of sensu API response

* use ansible helper function to decode bytestream

* add changelog fragment

* Update changelogs, link to PR

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

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

Co-authored-by: Stefan Walluhn <stefan.walluhn@aboutsource.net>
2021-02-03 07:52:59 +01:00
patchback[bot]
06fd6d8742 Fedora 30 and 31 are EOL and will eventually be removed from devel. (#1705) (#1711)
(cherry picked from commit 6af3c96d8e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-01 18:30:45 +01:00
Felix Fontein
dd0ae4a003 Announce DellEMC migration. (#1706) 2021-02-01 18:29:56 +01:00
patchback[bot]
646ca74810 homebrew_tap: Add support for brew search path (#1708) (#1709)
* homebrew_tap: Add support for brew search path

User can specify search path for brew executable.

Fixes: #1702

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

* Change version

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

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-02-01 11:32:50 +01:00
patchback[bot]
d60c107818 BOTMETA.yml: add logstash plugin maintainer (#1700) (#1701)
Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
(cherry picked from commit 9c648c8e3a)

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-29 11:01:21 +01:00
patchback[bot]
ef2d14f24e Add Name and/or Id properties to resource inventory output (#1691) (#1698)
* add Name and/or Id properties to resource inventory output

* add changelog fragment

(cherry picked from commit 00f5f7dfe7)

Co-authored-by: Bill Dodd <billdodd@gmail.com>
2021-01-29 07:40:22 +01:00
Felix Fontein
b3cde9b8a4 Next expected release is 2.1.0. 2021-01-28 15:01:39 +01:00
270 changed files with 5150 additions and 1583 deletions

View File

@@ -36,7 +36,7 @@ variables:
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:1.7.1
image: quay.io/ansible/azure-pipelines-test-container:1.8.0
pool: Standard
@@ -140,16 +140,12 @@ stages:
parameters:
testFormat: devel/{0}
targets:
- name: OS X 10.11
test: osx/10.11
- name: macOS 10.15
test: macos/10.15
- name: macOS 11.1
test: macos/11.1
- name: RHEL 7.8
test: rhel/7.8
- name: RHEL 8.2
test: rhel/8.2
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.3
test: rhel/8.3
- name: FreeBSD 11.4
test: freebsd/11.4
- name: FreeBSD 12.2
@@ -166,8 +162,14 @@ stages:
parameters:
testFormat: 2.10/{0}
targets:
- name: OS X 10.11
test: osx/10.11
- name: macOS 10.15
test: macos/10.15
- name: macOS 11.1
test: macos/11.1
- name: RHEL 7.8
test: rhel/7.8
- name: RHEL 8.2
test: rhel/8.2
- name: FreeBSD 12.1
@@ -206,16 +208,14 @@ stages:
test: centos7
- name: CentOS 8
test: centos8
- name: Fedora 31
test: fedora31
- name: Fedora 32
test: fedora32
- name: Fedora 33
test: fedora33
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 16.04
test: ubuntu1604
- name: Ubuntu 18.04
test: ubuntu1804
- name: Ubuntu 20.04
@@ -238,6 +238,8 @@ stages:
test: fedora32
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 16.04
test: ubuntu1604
groups:
- 2
- 3

7
.github/BOTMETA.yml vendored
View File

@@ -15,6 +15,8 @@ files:
labels: become
$callbacks/:
labels: callbacks
$callbacks/logstash.py:
maintainers: ujenmr
$callbacks/say.py:
notify: chris-short
maintainers: $team_macos
@@ -293,7 +295,8 @@ files:
$modules/clustering/consul/:
maintainers: $team_consul
$modules/clustering/etcd3.py:
maintainers: evrardjp vfauth
maintainers: evrardjp
ignore: vfauth
$modules/clustering/nomad/:
maintainers: chris93111
$modules/clustering/pacemaker_cluster.py:
@@ -417,6 +420,8 @@ files:
maintainers: orgito
$modules/monitoring/stackdriver.py:
maintainers: bwhaley
$modules/monitoring/statsd.py:
maintainers: mamercad
$modules/monitoring/statusio_maintenance.py:
maintainers: bhcopeland
$modules/monitoring/uptimerobot.py:

View File

@@ -6,6 +6,327 @@ Community General Release Notes
This changelog describes changes after version 1.0.0.
v2.2.0
======
Release Summary
---------------
Regular feature and bugfix release.
Minor Changes
-------------
- bundler - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- consul - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- consul_acl - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- consul_io inventory script - conf options - allow custom configuration options via env variables (https://github.com/ansible-collections/community.general/pull/620).
- consul_session - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- datadog_monitor - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- grove - the option ``message`` has been renamed to ``message_content``. The old name ``message`` is kept as an alias and will be removed for community.general 4.0.0. This was done because ``message`` is used internally by Ansible (https://github.com/ansible-collections/community.general/pull/1929).
- heroku_collaborator - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- linode_v4 - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- manageiq_alert_profiles - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- manageiq_policies - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- manageiq_tags - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- manageiq_tags and manageiq_policies - added new parameter ``resource_id``. This parameter can be used instead of parameter ``resource_name`` (https://github.com/ansible-collections/community.general/pull/719).
- module_helper module utils - ``CmdMixin.run_command()`` now accepts ``dict`` command arguments, providing the parameter and its value (https://github.com/ansible-collections/community.general/pull/1867).
- one_host - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- one_image_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- one_vm - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- oneandone_firewall_policy - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- oneandone_load_balancer - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- oneandone_monitoring_policy - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- oneandone_private_network - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- oneandone_server - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- oneview_datacenter_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- oneview_enclosure_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- oneview_ethernet_network_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- oneview_network_set_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- profitbricks - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- profitbricks_volume - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- scaleway_compute - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- scaleway_lb - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- sensu_check - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- sensu_client - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- sensu_handler - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- webfaction_domain - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- webfaction_site - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- yum_versionlock - Do the lock/unlock concurrently to speed up (https://github.com/ansible-collections/community.general/pull/1912).
Deprecated Features
-------------------
- apt_rpm - deprecated invalid parameter alias ``update-cache``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- composer - deprecated invalid parameter aliases ``working-dir``, ``global-command``, ``prefer-source``, ``prefer-dist``, ``no-dev``, ``no-scripts``, ``no-plugins``, ``optimize-autoloader``, ``classmap-authoritative``, ``apcu-autoloader``, ``ignore-platform-reqs``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- github_deploy_key - deprecated invalid parameter alias ``2fa_token``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- grove - the option ``message`` will be removed in community.general 4.0.0. Use the new option ``message_content`` instead (https://github.com/ansible-collections/community.general/pull/1929).
- homebrew - deprecated invalid parameter alias ``update-brew``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- homebrew_cask - deprecated invalid parameter alias ``update-brew``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- opkg - deprecated invalid parameter alias ``update-cache``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- pacman - deprecated invalid parameter alias ``update-cache``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- puppet - deprecated undocumented parameter ``show_diff``, will be removed in 7.0.0. (https://github.com/ansible-collections/community.general/pull/1927).
- runit - unused parameter ``dist`` marked for deprecation (https://github.com/ansible-collections/community.general/pull/1830).
- slackpkg - deprecated invalid parameter alias ``update-cache``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- urmpi - deprecated invalid parameter aliases ``update-cache`` and ``no-recommends``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- xbps - deprecated invalid parameter alias ``update-cache``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
Bugfixes
--------
- bigpanda - actually use the ``deployment_message`` option (https://github.com/ansible-collections/community.general/pull/1928).
- chef_databag lookup plugin - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- cloudforms inventory - fixed issue that non-existing (archived) VMs were synced (https://github.com/ansible-collections/community.general/pull/720).
- cobbler_sync, cobbler_system - fix SSL/TLS certificate check when ``validate_certs`` set to ``false`` (https://github.com/ansible-collections/community.general/pull/1880).
- consul_io inventory script - kv_groups - fix byte chain decoding for Python 3 (https://github.com/ansible-collections/community.general/pull/620).
- deploy_helper - allow ``state=clean`` to be used without defining a ``release`` (https://github.com/ansible-collections/community.general/issues/1852).
- diy callback plugin - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- idrac_redfish_command - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- idrac_redfish_config - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- idrac_redfish_info - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- imc_rest - explicitly logging out instead of registering the call in ```atexit``` (https://github.com/ansible-collections/community.general/issues/1735).
- infoblox inventory script - make sure that the script also works with Ansible 2.9, and returns a more helpful error when community.general is not installed as part of Ansible 2.10/3 (https://github.com/ansible-collections/community.general/pull/1871).
- ini_file - allows an empty string as a value for an option (https://github.com/ansible-collections/community.general/pull/1972).
- lxc_container - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- lxd_container - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- manageiq_provider - wrapped ``dict.keys()`` with ``list`` for use in ``choices`` setting (https://github.com/ansible-collections/community.general/pull/1970).
- memcached cache plugin - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- meta/runtime.yml - improve deprecation messages (https://github.com/ansible-collections/community.general/pull/1918).
- net_tools.nios.api module_utils - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- nmcli - add ``method4`` and ``method6`` options (https://github.com/ansible-collections/community.general/pull/1894).
- nmcli - ensure the ``slave-type`` option is passed to ``nmcli`` for type ``bond-slave`` (https://github.com/ansible-collections/community.general/pull/1882).
- nsot inventory script - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- oci_vcn - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- oneandone_monitoring_policy - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- packet_volume_attachment - removed extraneous ``print`` call - old debug? (https://github.com/ansible-collections/community.general/pull/1970).
- proxmox inventory - added handling of extra trailing slashes in the URL (https://github.com/ansible-collections/community.general/pull/1914).
- proxmox_kvm - fix parameter ``vmid`` passed twice to ``exit_json`` while creating a virtual machine without cloning (https://github.com/ansible-collections/community.general/issues/1875, https://github.com/ansible-collections/community.general/pull/1895).
- redfish_command - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- redfish_config - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- redhat_subscription - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- redis cache plugin - wrapped usages of ``keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- selective callback plugin - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- sensu_check - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- spotinst_aws_elastigroup - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- utm_utils module_utils - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- vdo - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- xfs_quota - the feedback for initializing project quota using xfs_quota binary from ``xfsprogs`` has changed since the version it was written for (https://github.com/ansible-collections/community.general/pull/1596).
- zfs - some ZFS properties could be passed when the dataset/volume did not exist, but would fail if the dataset already existed, even if the property matched what was specified in the ansible task (https://github.com/ansible-collections/community.general/issues/868, https://github.com/ansible-collections/community.general/pull/1833).
New Plugins
-----------
Filter
~~~~~~
- version_sort - Sort a list according to version order instead of pure alphabetical one
New Modules
-----------
Cloud
~~~~~
misc
^^^^
- proxmox_storage_info - Retrieve information about one or more Proxmox VE storages
Source Control
~~~~~~~~~~~~~~
github
^^^^^^
- github_repo - Manage your repositories on Github
gitlab
^^^^^^
- gitlab_project_members - Manage project members on GitLab Server
Web Infrastructure
~~~~~~~~~~~~~~~~~~
- jenkins_build - Manage jenkins builds
v2.1.1
======
Release Summary
---------------
Extraordinary bugfix release to fix a fatal bug in ``proxmox_kvm``.
Bugfixes
--------
- proxmox_kvm - fix undefined local variable ``status`` when the parameter ``state`` is either ``stopped``, ``started``, ``restarted`` or ``absent`` (https://github.com/ansible-collections/community.general/pull/1847).
v2.1.0
======
Release Summary
---------------
Regular feature and bugfix release.
Minor Changes
-------------
- clc_* modules - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1771).
- datadog_monitor - add missing monitor types ``query alert``, ``trace-analytics alert``, ``rum alert`` (https://github.com/ansible-collections/community.general/pull/1723).
- dnsimple - add CAA records to the whitelist of valid record types (https://github.com/ansible-collections/community.general/pull/1814).
- dnsimple - elements of list parameters ``record_ids`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- gitlab_runner - elements of list parameters ``tag_list`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- homebrew_tap - add support to specify search path for ``brew`` executable (https://github.com/ansible-collections/community.general/issues/1702).
- keycloak_client - elements of list parameters ``default_roles``, ``redirect_uris``, ``web_origins`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- librato_annotation - elements of list parameters ``links`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- lxd_container - ``client_key`` and ``client_cert`` are now of type ``path`` and no longer ``str``. A side effect is that certain expansions are made, like ``~`` is replaced by the user's home directory, and environment variables like ``$HOME`` or ``$TEMP`` are evaluated (https://github.com/ansible-collections/community.general/pull/1741).
- lxd_container - elements of list parameter ``profiles`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- lxd_profile - ``client_key`` and ``client_cert`` are now of type ``path`` and no longer ``str``. A side effect is that certain expansions are made, like ``~`` is replaced by the user's home directory, and environment variables like ``$HOME`` or ``$TEMP`` are evaluated (https://github.com/ansible-collections/community.general/pull/1741).
- lxd_profile - added ``merge_profile`` parameter to merge configurations from the play to an existing profile (https://github.com/ansible-collections/community.general/pull/1813).
- mail - elements of list parameters ``to``, ``cc``, ``bcc``, ``attach``, ``headers`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- na_ontap_gather_facts - elements of list parameters ``gather_subset`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- nexmo - elements of list parameters ``dest`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- nsupdate - elements of list parameters ``value`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- oci_vcn - ``api_user_key_file`` is now of type ``path`` and no longer ``str``. A side effect is that certain expansions are made, like ``~`` is replaced by the user's home directory, and environment variables like ``$HOME`` or ``$TEMP`` are evaluated (https://github.com/ansible-collections/community.general/pull/1741).
- omapi_host - elements of list parameters ``statements`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- onepassword_info - elements of list parameters ``search_terms`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- packet_device - elements of list parameters ``device_ids``, ``hostnames`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- pagerduty - elements of list parameters ``service`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- plugins/module_utils/oracle/oci_utils.py - elements of list parameter ``key_by`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- proxmox_kvm module - actually implemented ``vmid`` and ``status`` return values. Updated documentation to reflect current situation (https://github.com/ansible-collections/community.general/issues/1410, https://github.com/ansible-collections/community.general/pull/1715).
- pubnub_blocks - elements of list parameters ``event_handlers`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- redfish modules - explicitly setting lists' elements to ``str`` (https://github.com/ansible-collections/community.general/pull/1761).
- redfish_config - case insensitive search for situations where the hostname/FQDN case on iLO doesn't match variable's case (https://github.com/ansible-collections/community.general/pull/1744).
- redhat_subscription - elements of list parameters ``pool_ids``, ``addons`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- rocketchat - elements of list parameters ``attachments`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- sendgrid - elements of list parameters ``to_addresses``, ``cc``, ``bcc``, ``attachments`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- sl_vm - elements of list parameters ``disks``, ``ssh_keys`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- slack - elements of list parameters ``attachments`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- statusio_maintenance - elements of list parameters ``components``, ``containers`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- timezone - add Gentoo and Alpine Linux support (https://github.com/ansible-collections/community.general/issues/781).
- twilio - elements of list parameters ``to_numbers`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- vmadm - elements of list parameters ``disks``, ``nics``, ``resolvers``, ``filesystems`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- xfconf - added option ``disable_facts`` to disable facts and its associated deprecation warning (https://github.com/ansible-collections/community.general/issues/1475).
- xml - elements of list parameters ``add_children``, ``set_children`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
Deprecated Features
-------------------
- xfconf - returning output as facts is deprecated, this will be removed in community.general 4.0.0. Please register the task output in a variable and use it instead. You can already switch to the new behavior now by using the new ``disable_facts`` option (https://github.com/ansible-collections/community.general/pull/1747).
Bugfixes
--------
- aerospike_migration - fix typo that caused ``migrate_tx_key`` instead of ``migrate_rx_key`` being used (https://github.com/ansible-collections/community.general/pull/1739).
- alternatives - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- beadm - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- cronvar - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- dconf - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- elasticsearch_plugin - ``state`` parameter choices must use ``list()`` in python3 (https://github.com/ansible-collections/community.general/pull/1830).
- filesystem - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- filesystem - remove ``swap`` from list of FS supported by ``resizefs=yes`` (https://github.com/ansible-collections/community.general/issues/790).
- git_config - prevent ``run_command`` from expanding values (https://github.com/ansible-collections/community.general/issues/1776).
- gitlab_runner - parameter ``registration_token`` was required but is used only when ``state`` is ``present`` (https://github.com/ansible-collections/community.general/issues/1714).
- hipchat - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- interfaces_file - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- iso_extract - use proper alias deprecation mechanism for ``thirsty`` alias of ``force`` (https://github.com/ansible-collections/community.general/pull/1830).
- java_cert - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- kibana_plugin - ``state`` parameter choices must use ``list()`` in python3 (https://github.com/ansible-collections/community.general/pull/1830).
- logstash_plugin - wrapped ``dict.keys()`` with ``list`` for use in ``choices`` setting (https://github.com/ansible-collections/community.general/pull/1830).
- lvg - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- lvol - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- lxc - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- lxc_container - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- nios_host_record - allow DNS Bypass for views other than default (https://github.com/ansible-collections/community.general/issues/1786).
- nomad_job_info - fix module failure when nomad client returns no jobs (https://github.com/ansible-collections/community.general/pull/1721).
- parted - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- proxmox lxc - only add the features flag when module parameter ``features`` is set. Before an empty string was send to proxmox in case the parameter was not used, which required to use ``root@pam`` for module execution (https://github.com/ansible-collections/community.general/pull/1763).
- proxmox* modules - refactored some parameter validation code into use of ``env_fallback``, ``required_if``, ``required_together``, ``required_one_of`` (https://github.com/ansible-collections/community.general/pull/1765).
- proxmox_kvm - do not add ``args`` if ``proxmox_default_behavior`` is set to no_defaults (https://github.com/ansible-collections/community.general/issues/1641).
- proxmox_kvm - stop implicitly adding ``force`` equal to ``false``. Proxmox API requires not implemented parameters otherwise, and assumes ``force`` to be ``false`` by default anyways (https://github.com/ansible-collections/community.general/pull/1783).
- redhat_subscription - ``mutually_exclusive`` was referring to parameter alias instead of name (https://github.com/ansible-collections/community.general/pull/1795).
- riak - parameters ``wait_for_handoffs`` and ``wait_for_ring`` are ``int`` but the default value was ``false`` (https://github.com/ansible-collections/community.general/pull/1830).
- rundeck_acl_policy - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- runit - removed unused code, and passing command as ``list`` instead of ``str`` to ``run_command()`` (https://github.com/ansible-collections/community.general/pull/1830).
- selective callback plugin - adjust import so that the plugin also works with ansible-core 2.11 (https://github.com/ansible-collections/community.general/pull/1807).
- statusio_maintenance - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- timezone - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).
- zfs_delegate_admin - the elements of ``users``, ``groups`` and ``permissions`` are now enforced to be strings (https://github.com/ansible-collections/community.general/pull/1766).
New Modules
-----------
Monitoring
~~~~~~~~~~
- statsd - Send metrics to StatsD
v2.0.1
======
Release Summary
---------------
Bugfix and security bugfix (potential information leaks in multiple modules, CVE-2021-20191) release.
Major Changes
-------------
- For community.general 3.0.0, the ``ome_device_info``, ``idrac_firmware`` and ``idrac_server_config_profile`` modules will be moved to the `dellemc.openmanage <https://galaxy.ansible.com/dellemc/openmanage>`_ collection.
A redirection will be inserted so that users using ansible-base 2.10 or newer do not have to change anything.
If you use Ansible 2.9 and explicitly use the DellEMC modules mentioned above from this collection, you will need to adjust your playbooks and roles to use FQCNs starting with ``dellemc.openmanage.`` instead of ``community.general.``,
for example replace ``community.general.ome_device_info`` in a task by ``dellemc.openmanage.ome_device_info``.
If you use ansible-base and installed ``community.general`` manually and rely on the DellEMC modules mentioned above, you have to make sure to install the ``dellemc.openmanage`` collection as well.
If you are using FQCNs, for example ``community.general.ome_device_info`` instead of ``ome_device_info``, it will continue working, but we still recommend to adjust the FQCNs as well.
Breaking Changes / Porting Guide
--------------------------------
- utm_proxy_auth_profile - the ``frontend_cookie_secret`` return value now contains a placeholder string instead of the module's ``frontend_cookie_secret`` parameter (https://github.com/ansible-collections/community.general/pull/1736).
Security Fixes
--------------
- dnsmadeeasy - mark the ``account_key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- gitlab_runner - mark the ``registration_token`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- hwc_ecs_instance - mark the ``admin_pass`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- ibm_sa_host - mark the ``iscsi_chap_secret`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- keycloak_* modules - mark the ``auth_client_secret`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- keycloak_client - mark the ``registration_access_token`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- librato_annotation - mark the ``api_key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- logentries_msg - mark the ``token`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- module_utils/_netapp, na_ontap_gather_facts - enabled ``no_log`` for the options ``api_key`` and ``secret_key`` to prevent accidental disclosure (CVE-2021-20191, https://github.com/ansible-collections/community.general/pull/1725).
- module_utils/identity/keycloak, keycloak_client, keycloak_clienttemplate, keycloak_group - enabled ``no_log`` for the option ``auth_client_secret`` to prevent accidental disclosure (CVE-2021-20191, https://github.com/ansible-collections/community.general/pull/1725).
- nios_nsgroup - mark the ``tsig_key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- oneandone_firewall_policy, oneandone_load_balancer, oneandone_monitoring_policy, oneandone_private_network, oneandone_public_ip - mark the ``auth_token`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- ovirt - mark the ``instance_key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- ovirt - mark the ``instance_rootpw`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- pagerduty_alert - mark the ``api_key``, ``service_key`` and ``integration_key`` parameters as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- pagerduty_change - mark the ``integration_key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- pingdom - mark the ``key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- pulp_repo - mark the ``feed_client_key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- rax_clb_ssl - mark the ``private_key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- redfish_command - mark the ``update_creds.password`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- rollbar_deployment - mark the ``token`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- spotinst_aws_elastigroup - mark the ``multai_token`` and ``token`` parameters as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- stackdriver - mark the ``key`` parameter as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- utm_proxy_auth_profile - enabled ``no_log`` for the option ``frontend_cookie_secret`` to prevent accidental disclosure (CVE-2021-20191, https://github.com/ansible-collections/community.general/pull/1725).
- utm_proxy_auth_profile - mark the ``frontend_cookie_secret`` parameter as ``no_log`` to avoid leakage of secrets. This causes the ``utm_proxy_auth_profile`` return value to no longer containing the correct value, but a placeholder (https://github.com/ansible-collections/community.general/pull/1736).
Bugfixes
--------
- filesystem - do not fail when ``resizefs=yes`` and ``fstype=xfs`` if there is nothing to do, even if the filesystem is not mounted. This only covers systems supporting access to unmounted XFS filesystems. Others will still fail (https://github.com/ansible-collections/community.general/issues/1457, https://github.com/ansible-collections/community.general/pull/1478).
- gitlab_user - make updates to the ``isadmin``, ``password`` and ``confirm`` options of an already existing GitLab user work (https://github.com/ansible-collections/community.general/pull/1724).
- parted - change the regex that decodes the partition size to better support different formats that parted uses. Change the regex that validates parted's version string (https://github.com/ansible-collections/community.general/pull/1695).
- redfish_info module, redfish_utils module utils - add ``Name`` and ``Id`` properties to output of Redfish inventory commands (https://github.com/ansible-collections/community.general/issues/1650).
- sensu-silence module - fix json parsing of sensu API responses on Python 3.5 (https://github.com/ansible-collections/community.general/pull/1703).
v2.0.0
======
@@ -434,6 +755,15 @@ Bugfixes
- zfs - fixed ``invalid character '@' in pool name"`` error when working with snapshots on a root zvol (https://github.com/ansible-collections/community.general/issues/932).
- zypper - force ``LANG=C`` to as zypper is looking in XML output where attribute could be translated (https://github.com/ansible-collections/community.general/issues/1175).
New Plugins
-----------
Inventory
~~~~~~~~~
- proxmox - Proxmox inventory source
- stackpath_compute - StackPath Edge Computing inventory source
New Modules
-----------
@@ -443,7 +773,24 @@ Cloud
misc
^^^^
- proxmox_domain_info - Retrieve information about one or more Proxmox VE domains
- proxmox_group_info - Retrieve information about one or more Proxmox VE groups
- proxmox_snap - Snapshot management of instances in Proxmox VE cluster
- proxmox_user_info - Retrieve information about one or more Proxmox VE users
scaleway
^^^^^^^^
- scaleway_database_backup - Scaleway database backups management module
Clustering
~~~~~~~~~~
nomad
^^^^^
- nomad_job - Launch a Nomad Job
- nomad_job_info - Get Nomad Jobs info
Identity
~~~~~~~~
@@ -456,6 +803,9 @@ ipa
Monitoring
~~~~~~~~~~
- pagerduty_change - Track a code or infrastructure change as a PagerDuty change event
- pagerduty_user - Manage a user account on PagerDuty
datadog
^^^^^^^
@@ -471,8 +821,20 @@ os
- rpm_ostree_pkg - Install or uninstall overlay additional packages
- yum_versionlock - Locks / unlocks a installed package(s) from being updated by yum package manager
Source Control
~~~~~~~~~~~~~~
gitlab
^^^^^^
- gitlab_group_members - Manage group members on GitLab Server
- gitlab_group_variable - Creates, updates, or deletes GitLab groups variables
System
~~~~~~
- iptables_state - Save iptables state into a file or restore it from a file
- shutdown - Shut down a machine
- ssh_config - Manage SSH config for user
- sysrc - Manage FreeBSD using sysrc
- sysupgrade - Manage OpenBSD system upgrades

View File

@@ -980,23 +980,567 @@ releases:
- description: Manages Datadog downtimes
name: datadog_downtime
namespace: monitoring.datadog
- description: Manage group members on GitLab Server
name: gitlab_group_members
namespace: source_control.gitlab
- description: Creates, updates, or deletes GitLab groups variables
name: gitlab_group_variable
namespace: source_control.gitlab
- description: Manage FreeIPA password policies
name: ipa_pwpolicy
namespace: identity.ipa
- description: Save iptables state into a file or restore it from a file
name: iptables_state
namespace: system
- description: Launch a Nomad Job
name: nomad_job
namespace: clustering.nomad
- description: Get Nomad Jobs info
name: nomad_job_info
namespace: clustering.nomad
- description: Track a code or infrastructure change as a PagerDuty change event
name: pagerduty_change
namespace: monitoring
- description: Manage a user account on PagerDuty
name: pagerduty_user
namespace: monitoring
- description: Retrieve information about one or more Proxmox VE domains
name: proxmox_domain_info
namespace: cloud.misc
- description: Retrieve information about one or more Proxmox VE groups
name: proxmox_group_info
namespace: cloud.misc
- description: Snapshot management of instances in Proxmox VE cluster
name: proxmox_snap
namespace: cloud.misc
- description: Retrieve information about one or more Proxmox VE users
name: proxmox_user_info
namespace: cloud.misc
- description: Install or uninstall overlay additional packages
name: rpm_ostree_pkg
namespace: packaging.os
- description: Scaleway database backups management module
name: scaleway_database_backup
namespace: cloud.scaleway
- description: Shut down a machine
name: shutdown
namespace: system
- description: Manage SSH config for user
name: ssh_config
namespace: system
- description: Manage FreeBSD using sysrc
name: sysrc
namespace: system
- description: Manage OpenBSD system upgrades
name: sysupgrade
namespace: system
- description: Locks / unlocks a installed package(s) from being updated by yum
package manager
name: yum_versionlock
namespace: packaging.os
plugins:
inventory:
- description: Proxmox inventory source
name: proxmox
namespace: null
- description: StackPath Edge Computing inventory source
name: stackpath_compute
namespace: null
release_date: '2021-01-28'
2.0.1:
changes:
breaking_changes:
- utm_proxy_auth_profile - the ``frontend_cookie_secret`` return value now contains
a placeholder string instead of the module's ``frontend_cookie_secret`` parameter
(https://github.com/ansible-collections/community.general/pull/1736).
bugfixes:
- filesystem - do not fail when ``resizefs=yes`` and ``fstype=xfs`` if there
is nothing to do, even if the filesystem is not mounted. This only covers
systems supporting access to unmounted XFS filesystems. Others will still
fail (https://github.com/ansible-collections/community.general/issues/1457,
https://github.com/ansible-collections/community.general/pull/1478).
- gitlab_user - make updates to the ``isadmin``, ``password`` and ``confirm``
options of an already existing GitLab user work (https://github.com/ansible-collections/community.general/pull/1724).
- parted - change the regex that decodes the partition size to better support
different formats that parted uses. Change the regex that validates parted's
version string (https://github.com/ansible-collections/community.general/pull/1695).
- redfish_info module, redfish_utils module utils - add ``Name`` and ``Id``
properties to output of Redfish inventory commands (https://github.com/ansible-collections/community.general/issues/1650).
- sensu-silence module - fix json parsing of sensu API responses on Python 3.5
(https://github.com/ansible-collections/community.general/pull/1703).
major_changes:
- 'For community.general 3.0.0, the ``ome_device_info``, ``idrac_firmware``
and ``idrac_server_config_profile`` modules will be moved to the `dellemc.openmanage
<https://galaxy.ansible.com/dellemc/openmanage>`_ collection.
A redirection will be inserted so that users using ansible-base 2.10 or newer
do not have to change anything.
If you use Ansible 2.9 and explicitly use the DellEMC modules mentioned above
from this collection, you will need to adjust your playbooks and roles to
use FQCNs starting with ``dellemc.openmanage.`` instead of ``community.general.``,
for example replace ``community.general.ome_device_info`` in a task by ``dellemc.openmanage.ome_device_info``.
If you use ansible-base and installed ``community.general`` manually and rely
on the DellEMC modules mentioned above, you have to make sure to install the
``dellemc.openmanage`` collection as well.
If you are using FQCNs, for example ``community.general.ome_device_info``
instead of ``ome_device_info``, it will continue working, but we still recommend
to adjust the FQCNs as well.
'
release_summary: Bugfix and security bugfix (potential information leaks in
multiple modules, CVE-2021-20191) release.
security_fixes:
- dnsmadeeasy - mark the ``account_key`` parameter as ``no_log`` to avoid leakage
of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- gitlab_runner - mark the ``registration_token`` parameter as ``no_log`` to
avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- hwc_ecs_instance - mark the ``admin_pass`` parameter as ``no_log`` to avoid
leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- ibm_sa_host - mark the ``iscsi_chap_secret`` parameter as ``no_log`` to avoid
leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- keycloak_* modules - mark the ``auth_client_secret`` parameter as ``no_log``
to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- keycloak_client - mark the ``registration_access_token`` parameter as ``no_log``
to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- librato_annotation - mark the ``api_key`` parameter as ``no_log`` to avoid
leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- logentries_msg - mark the ``token`` parameter as ``no_log`` to avoid leakage
of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- module_utils/_netapp, na_ontap_gather_facts - enabled ``no_log`` for the options
``api_key`` and ``secret_key`` to prevent accidental disclosure (CVE-2021-20191,
https://github.com/ansible-collections/community.general/pull/1725).
- module_utils/identity/keycloak, keycloak_client, keycloak_clienttemplate,
keycloak_group - enabled ``no_log`` for the option ``auth_client_secret``
to prevent accidental disclosure (CVE-2021-20191, https://github.com/ansible-collections/community.general/pull/1725).
- nios_nsgroup - mark the ``tsig_key`` parameter as ``no_log`` to avoid leakage
of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- oneandone_firewall_policy, oneandone_load_balancer, oneandone_monitoring_policy,
oneandone_private_network, oneandone_public_ip - mark the ``auth_token`` parameter
as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- ovirt - mark the ``instance_key`` parameter as ``no_log`` to avoid leakage
of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- ovirt - mark the ``instance_rootpw`` parameter as ``no_log`` to avoid leakage
of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- pagerduty_alert - mark the ``api_key``, ``service_key`` and ``integration_key``
parameters as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- pagerduty_change - mark the ``integration_key`` parameter as ``no_log`` to
avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- pingdom - mark the ``key`` parameter as ``no_log`` to avoid leakage of secrets
(https://github.com/ansible-collections/community.general/pull/1736).
- pulp_repo - mark the ``feed_client_key`` parameter as ``no_log`` to avoid
leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- rax_clb_ssl - mark the ``private_key`` parameter as ``no_log`` to avoid leakage
of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- redfish_command - mark the ``update_creds.password`` parameter as ``no_log``
to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- rollbar_deployment - mark the ``token`` parameter as ``no_log`` to avoid leakage
of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- spotinst_aws_elastigroup - mark the ``multai_token`` and ``token`` parameters
as ``no_log`` to avoid leakage of secrets (https://github.com/ansible-collections/community.general/pull/1736).
- stackdriver - mark the ``key`` parameter as ``no_log`` to avoid leakage of
secrets (https://github.com/ansible-collections/community.general/pull/1736).
- utm_proxy_auth_profile - enabled ``no_log`` for the option ``frontend_cookie_secret``
to prevent accidental disclosure (CVE-2021-20191, https://github.com/ansible-collections/community.general/pull/1725).
- utm_proxy_auth_profile - mark the ``frontend_cookie_secret`` parameter as
``no_log`` to avoid leakage of secrets. This causes the ``utm_proxy_auth_profile``
return value to no longer containing the correct value, but a placeholder
(https://github.com/ansible-collections/community.general/pull/1736).
fragments:
- 1478-filesystem-fix-1457-resizefs-idempotency.yml
- 1691-add-name-and-id-props-to-redfish-inventory-output.yml
- 1695-parted-updatedregex.yaml
- 1703-sensu_silence-fix_json_parsing.yml
- 1724-various-fixes-for-updating-existing-gitlab-user.yml
- 2.0.1.yml
- CVE-2021-20191_no_log.yml
- dellemc-migration.yml
- no_log-fixes.yml
release_date: '2021-02-09'
2.1.0:
changes:
bugfixes:
- aerospike_migration - fix typo that caused ``migrate_tx_key`` instead of ``migrate_rx_key``
being used (https://github.com/ansible-collections/community.general/pull/1739).
- 'alternatives - internal refactoring: replaced uses of ``_`` with ``dummy``
(https://github.com/ansible-collections/community.general/pull/1819).'
- 'beadm - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- 'cronvar - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- 'dconf - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- elasticsearch_plugin - ``state`` parameter choices must use ``list()`` in
python3 (https://github.com/ansible-collections/community.general/pull/1830).
- 'filesystem - internal refactoring: replaced uses of ``_`` with ``dummy``
(https://github.com/ansible-collections/community.general/pull/1819).'
- filesystem - remove ``swap`` from list of FS supported by ``resizefs=yes``
(https://github.com/ansible-collections/community.general/issues/790).
- git_config - prevent ``run_command`` from expanding values (https://github.com/ansible-collections/community.general/issues/1776).
- gitlab_runner - parameter ``registration_token`` was required but is used
only when ``state`` is ``present`` (https://github.com/ansible-collections/community.general/issues/1714).
- 'hipchat - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- 'interfaces_file - internal refactoring: replaced uses of ``_`` with ``dummy``
(https://github.com/ansible-collections/community.general/pull/1819).'
- iso_extract - use proper alias deprecation mechanism for ``thirsty`` alias
of ``force`` (https://github.com/ansible-collections/community.general/pull/1830).
- 'java_cert - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- kibana_plugin - ``state`` parameter choices must use ``list()`` in python3
(https://github.com/ansible-collections/community.general/pull/1830).
- logstash_plugin - wrapped ``dict.keys()`` with ``list`` for use in ``choices``
setting (https://github.com/ansible-collections/community.general/pull/1830).
- 'lvg - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- 'lvol - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- 'lxc - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- 'lxc_container - internal refactoring: replaced uses of ``_`` with ``dummy``
(https://github.com/ansible-collections/community.general/pull/1819).'
- nios_host_record - allow DNS Bypass for views other than default (https://github.com/ansible-collections/community.general/issues/1786).
- nomad_job_info - fix module failure when nomad client returns no jobs (https://github.com/ansible-collections/community.general/pull/1721).
- 'parted - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- proxmox lxc - only add the features flag when module parameter ``features``
is set. Before an empty string was send to proxmox in case the parameter was
not used, which required to use ``root@pam`` for module execution (https://github.com/ansible-collections/community.general/pull/1763).
- proxmox* modules - refactored some parameter validation code into use of ``env_fallback``,
``required_if``, ``required_together``, ``required_one_of`` (https://github.com/ansible-collections/community.general/pull/1765).
- proxmox_kvm - do not add ``args`` if ``proxmox_default_behavior`` is set to
no_defaults (https://github.com/ansible-collections/community.general/issues/1641).
- proxmox_kvm - stop implicitly adding ``force`` equal to ``false``. Proxmox
API requires not implemented parameters otherwise, and assumes ``force`` to
be ``false`` by default anyways (https://github.com/ansible-collections/community.general/pull/1783).
- redhat_subscription - ``mutually_exclusive`` was referring to parameter alias
instead of name (https://github.com/ansible-collections/community.general/pull/1795).
- riak - parameters ``wait_for_handoffs`` and ``wait_for_ring`` are ``int``
but the default value was ``false`` (https://github.com/ansible-collections/community.general/pull/1830).
- 'rundeck_acl_policy - internal refactoring: replaced uses of ``_`` with ``dummy``
(https://github.com/ansible-collections/community.general/pull/1819).'
- runit - removed unused code, and passing command as ``list`` instead of ``str``
to ``run_command()`` (https://github.com/ansible-collections/community.general/pull/1830).
- selective callback plugin - adjust import so that the plugin also works with
ansible-core 2.11 (https://github.com/ansible-collections/community.general/pull/1807).
- 'statusio_maintenance - internal refactoring: replaced uses of ``_`` with
``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- 'timezone - internal refactoring: replaced uses of ``_`` with ``dummy`` (https://github.com/ansible-collections/community.general/pull/1819).'
- zfs_delegate_admin - the elements of ``users``, ``groups`` and ``permissions``
are now enforced to be strings (https://github.com/ansible-collections/community.general/pull/1766).
deprecated_features:
- xfconf - returning output as facts is deprecated, this will be removed in
community.general 4.0.0. Please register the task output in a variable and
use it instead. You can already switch to the new behavior now by using the
new ``disable_facts`` option (https://github.com/ansible-collections/community.general/pull/1747).
minor_changes:
- clc_* modules - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1771).
- datadog_monitor - add missing monitor types ``query alert``, ``trace-analytics
alert``, ``rum alert`` (https://github.com/ansible-collections/community.general/pull/1723).
- dnsimple - add CAA records to the whitelist of valid record types (https://github.com/ansible-collections/community.general/pull/1814).
- dnsimple - elements of list parameters ``record_ids`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- gitlab_runner - elements of list parameters ``tag_list`` are now validated
(https://github.com/ansible-collections/community.general/pull/1795).
- homebrew_tap - add support to specify search path for ``brew`` executable
(https://github.com/ansible-collections/community.general/issues/1702).
- keycloak_client - elements of list parameters ``default_roles``, ``redirect_uris``,
``web_origins`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- librato_annotation - elements of list parameters ``links`` are now validated
(https://github.com/ansible-collections/community.general/pull/1795).
- lxd_container - ``client_key`` and ``client_cert`` are now of type ``path``
and no longer ``str``. A side effect is that certain expansions are made,
like ``~`` is replaced by the user's home directory, and environment variables
like ``$HOME`` or ``$TEMP`` are evaluated (https://github.com/ansible-collections/community.general/pull/1741).
- lxd_container - elements of list parameter ``profiles`` are now validated
(https://github.com/ansible-collections/community.general/pull/1795).
- lxd_profile - ``client_key`` and ``client_cert`` are now of type ``path``
and no longer ``str``. A side effect is that certain expansions are made,
like ``~`` is replaced by the user's home directory, and environment variables
like ``$HOME`` or ``$TEMP`` are evaluated (https://github.com/ansible-collections/community.general/pull/1741).
- lxd_profile - added ``merge_profile`` parameter to merge configurations from
the play to an existing profile (https://github.com/ansible-collections/community.general/pull/1813).
- mail - elements of list parameters ``to``, ``cc``, ``bcc``, ``attach``, ``headers``
are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- na_ontap_gather_facts - elements of list parameters ``gather_subset`` are
now validated (https://github.com/ansible-collections/community.general/pull/1795).
- nexmo - elements of list parameters ``dest`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- nsupdate - elements of list parameters ``value`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- oci_vcn - ``api_user_key_file`` is now of type ``path`` and no longer ``str``.
A side effect is that certain expansions are made, like ``~`` is replaced
by the user's home directory, and environment variables like ``$HOME`` or
``$TEMP`` are evaluated (https://github.com/ansible-collections/community.general/pull/1741).
- omapi_host - elements of list parameters ``statements`` are now validated
(https://github.com/ansible-collections/community.general/pull/1795).
- onepassword_info - elements of list parameters ``search_terms`` are now validated
(https://github.com/ansible-collections/community.general/pull/1795).
- packet_device - elements of list parameters ``device_ids``, ``hostnames``
are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- pagerduty - elements of list parameters ``service`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- plugins/module_utils/oracle/oci_utils.py - elements of list parameter ``key_by``
are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- proxmox_kvm module - actually implemented ``vmid`` and ``status`` return values.
Updated documentation to reflect current situation (https://github.com/ansible-collections/community.general/issues/1410,
https://github.com/ansible-collections/community.general/pull/1715).
- pubnub_blocks - elements of list parameters ``event_handlers`` are now validated
(https://github.com/ansible-collections/community.general/pull/1795).
- redfish modules - explicitly setting lists' elements to ``str`` (https://github.com/ansible-collections/community.general/pull/1761).
- redfish_config - case insensitive search for situations where the hostname/FQDN
case on iLO doesn't match variable's case (https://github.com/ansible-collections/community.general/pull/1744).
- redhat_subscription - elements of list parameters ``pool_ids``, ``addons``
are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- rocketchat - elements of list parameters ``attachments`` are now validated
(https://github.com/ansible-collections/community.general/pull/1795).
- sendgrid - elements of list parameters ``to_addresses``, ``cc``, ``bcc``,
``attachments`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- sl_vm - elements of list parameters ``disks``, ``ssh_keys`` are now validated
(https://github.com/ansible-collections/community.general/pull/1795).
- slack - elements of list parameters ``attachments`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- statusio_maintenance - elements of list parameters ``components``, ``containers``
are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- timezone - add Gentoo and Alpine Linux support (https://github.com/ansible-collections/community.general/issues/781).
- twilio - elements of list parameters ``to_numbers`` are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- vmadm - elements of list parameters ``disks``, ``nics``, ``resolvers``, ``filesystems``
are now validated (https://github.com/ansible-collections/community.general/pull/1795).
- xfconf - added option ``disable_facts`` to disable facts and its associated
deprecation warning (https://github.com/ansible-collections/community.general/issues/1475).
- xml - elements of list parameters ``add_children``, ``set_children`` are now
validated (https://github.com/ansible-collections/community.general/pull/1795).
release_summary: Regular feature and bugfix release.
fragments:
- 1475-xfconf-facts.yml
- 1702_homebrew_tap.yml
- 1714-gitlab_runner-required-reg-token.yml
- 1715-proxmox_kvm-add-vmid-to-returns.yml
- 1721-fix-nomad_job_info-no-jobs-failure.yml
- 1722_timezone.yml
- 1723-datadog_monitor-add-missing-monitor-types.yml
- 1740-aerospike_migration.yml
- 1741-use-path-argspec.yml
- 1744-case-insensitive-hostname-fqdn-matching.yml
- 1753-document-fstypes-supported-by-resizefs.yml
- 1761-redfish-tidy-up-validation.yml
- 1765-proxmox-params.yml
- 1766-zfs-fixed-sanity.yml
- 1771-centurylink-validation-elements.yml
- 1776-git_config-tilde_value.yml
- 1783-proxmox-kvm-fix-args-500-error.yaml
- 1788-ease-nios_host_record-dns-bypass-check.yml
- 1795-list-elements-batch1.yml
- 1813-lxd_profile-merge-profiles.yml
- 1814-dnsimple-add-support-for-caa-records.yml
- 1819-tidyup-pylint-blacklistnames.yml
- 1830-valmod_docmissingtype_batch1.yml
- 2.1.0.yml
- 816-only-invocate-feature-when-variable-is-set.yml
- selective-core-2.11.yml
modules:
- description: Send metrics to StatsD
name: statsd
namespace: monitoring
release_date: '2021-02-16'
2.1.1:
changes:
bugfixes:
- proxmox_kvm - fix undefined local variable ``status`` when the parameter ``state``
is either ``stopped``, ``started``, ``restarted`` or ``absent`` (https://github.com/ansible-collections/community.general/pull/1847).
release_summary: Extraordinary bugfix release to fix a fatal bug in ``proxmox_kvm``.
fragments:
- 1847-proxmox-kvm-fix-status.yml
- 2.1.0.yml
release_date: '2021-02-17'
2.2.0:
changes:
bugfixes:
- bigpanda - actually use the ``deployment_message`` option (https://github.com/ansible-collections/community.general/pull/1928).
- chef_databag lookup plugin - wrapped usages of ``dict.keys()`` in ``list()``
for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- cloudforms inventory - fixed issue that non-existing (archived) VMs were synced
(https://github.com/ansible-collections/community.general/pull/720).
- cobbler_sync, cobbler_system - fix SSL/TLS certificate check when ``validate_certs``
set to ``false`` (https://github.com/ansible-collections/community.general/pull/1880).
- consul_io inventory script - kv_groups - fix byte chain decoding for Python
3 (https://github.com/ansible-collections/community.general/pull/620).
- deploy_helper - allow ``state=clean`` to be used without defining a ``release``
(https://github.com/ansible-collections/community.general/issues/1852).
- diy callback plugin - wrapped usages of ``dict.keys()`` in ``list()`` for
Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- idrac_redfish_command - wrapped usages of ``dict.keys()`` in ``list()`` for
Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- idrac_redfish_config - wrapped usages of ``dict.keys()`` in ``list()`` for
Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- idrac_redfish_info - wrapped usages of ``dict.keys()`` in ``list()`` for Python
3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- imc_rest - explicitly logging out instead of registering the call in ```atexit```
(https://github.com/ansible-collections/community.general/issues/1735).
- infoblox inventory script - make sure that the script also works with Ansible
2.9, and returns a more helpful error when community.general is not installed
as part of Ansible 2.10/3 (https://github.com/ansible-collections/community.general/pull/1871).
- ini_file - allows an empty string as a value for an option (https://github.com/ansible-collections/community.general/pull/1972).
- lxc_container - wrapped usages of ``dict.keys()`` in ``list()`` for Python
3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- lxd_container - wrapped usages of ``dict.keys()`` in ``list()`` for Python
3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- manageiq_provider - wrapped ``dict.keys()`` with ``list`` for use in ``choices``
setting (https://github.com/ansible-collections/community.general/pull/1970).
- memcached cache plugin - wrapped usages of ``dict.keys()`` in ``list()`` for
Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- meta/runtime.yml - improve deprecation messages (https://github.com/ansible-collections/community.general/pull/1918).
- net_tools.nios.api module_utils - wrapped usages of ``dict.keys()`` in ``list()``
for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- nmcli - add ``method4`` and ``method6`` options (https://github.com/ansible-collections/community.general/pull/1894).
- nmcli - ensure the ``slave-type`` option is passed to ``nmcli`` for type ``bond-slave``
(https://github.com/ansible-collections/community.general/pull/1882).
- nsot inventory script - wrapped usages of ``dict.keys()`` in ``list()`` for
Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- oci_vcn - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility
(https://github.com/ansible-collections/community.general/pull/1861).
- oneandone_monitoring_policy - wrapped usages of ``dict.keys()`` in ``list()``
for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- packet_volume_attachment - removed extraneous ``print`` call - old debug?
(https://github.com/ansible-collections/community.general/pull/1970).
- proxmox inventory - added handling of extra trailing slashes in the URL (https://github.com/ansible-collections/community.general/pull/1914).
- proxmox_kvm - fix parameter ``vmid`` passed twice to ``exit_json`` while creating
a virtual machine without cloning (https://github.com/ansible-collections/community.general/issues/1875,
https://github.com/ansible-collections/community.general/pull/1895).
- redfish_command - wrapped usages of ``dict.keys()`` in ``list()`` for Python
3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- redfish_config - wrapped usages of ``dict.keys()`` in ``list()`` for Python
3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- redhat_subscription - wrapped usages of ``dict.keys()`` in ``list()`` for
Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- redis cache plugin - wrapped usages of ``keys()`` in ``list()`` for Python
3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- selective callback plugin - wrapped usages of ``dict.keys()`` in ``list()``
for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- sensu_check - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3
compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- spotinst_aws_elastigroup - wrapped usages of ``dict.keys()`` in ``list()``
for Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- utm_utils module_utils - wrapped usages of ``dict.keys()`` in ``list()`` for
Python 3 compatibility (https://github.com/ansible-collections/community.general/pull/1861).
- vdo - wrapped usages of ``dict.keys()`` in ``list()`` for Python 3 compatibility
(https://github.com/ansible-collections/community.general/pull/1861).
- xfs_quota - the feedback for initializing project quota using xfs_quota binary
from ``xfsprogs`` has changed since the version it was written for (https://github.com/ansible-collections/community.general/pull/1596).
- zfs - some ZFS properties could be passed when the dataset/volume did not
exist, but would fail if the dataset already existed, even if the property
matched what was specified in the ansible task (https://github.com/ansible-collections/community.general/issues/868,
https://github.com/ansible-collections/community.general/pull/1833).
deprecated_features:
- apt_rpm - deprecated invalid parameter alias ``update-cache``, will be removed
in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- composer - deprecated invalid parameter aliases ``working-dir``, ``global-command``,
``prefer-source``, ``prefer-dist``, ``no-dev``, ``no-scripts``, ``no-plugins``,
``optimize-autoloader``, ``classmap-authoritative``, ``apcu-autoloader``,
``ignore-platform-reqs``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- github_deploy_key - deprecated invalid parameter alias ``2fa_token``, will
be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- grove - the option ``message`` will be removed in community.general 4.0.0.
Use the new option ``message_content`` instead (https://github.com/ansible-collections/community.general/pull/1929).
- homebrew - deprecated invalid parameter alias ``update-brew``, will be removed
in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- homebrew_cask - deprecated invalid parameter alias ``update-brew``, will be
removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- opkg - deprecated invalid parameter alias ``update-cache``, will be removed
in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- pacman - deprecated invalid parameter alias ``update-cache``, will be removed
in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- puppet - deprecated undocumented parameter ``show_diff``, will be removed
in 7.0.0. (https://github.com/ansible-collections/community.general/pull/1927).
- runit - unused parameter ``dist`` marked for deprecation (https://github.com/ansible-collections/community.general/pull/1830).
- slackpkg - deprecated invalid parameter alias ``update-cache``, will be removed
in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- urmpi - deprecated invalid parameter aliases ``update-cache`` and ``no-recommends``,
will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
- xbps - deprecated invalid parameter alias ``update-cache``, will be removed
in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
minor_changes:
- bundler - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- consul - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- consul_acl - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- consul_io inventory script - conf options - allow custom configuration options
via env variables (https://github.com/ansible-collections/community.general/pull/620).
- consul_session - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- datadog_monitor - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- grove - the option ``message`` has been renamed to ``message_content``. The
old name ``message`` is kept as an alias and will be removed for community.general
4.0.0. This was done because ``message`` is used internally by Ansible (https://github.com/ansible-collections/community.general/pull/1929).
- heroku_collaborator - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- linode_v4 - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- manageiq_alert_profiles - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- manageiq_policies - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- manageiq_tags - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- manageiq_tags and manageiq_policies - added new parameter ``resource_id``.
This parameter can be used instead of parameter ``resource_name`` (https://github.com/ansible-collections/community.general/pull/719).
- module_helper module utils - ``CmdMixin.run_command()`` now accepts ``dict``
command arguments, providing the parameter and its value (https://github.com/ansible-collections/community.general/pull/1867).
- one_host - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- one_image_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- one_vm - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- oneandone_firewall_policy - elements of list parameters are now validated
(https://github.com/ansible-collections/community.general/pull/1885).
- oneandone_load_balancer - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- oneandone_monitoring_policy - elements of list parameters are now validated
(https://github.com/ansible-collections/community.general/pull/1885).
- oneandone_private_network - elements of list parameters are now validated
(https://github.com/ansible-collections/community.general/pull/1885).
- oneandone_server - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- oneview_datacenter_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- oneview_enclosure_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- oneview_ethernet_network_info - elements of list parameters are now validated
(https://github.com/ansible-collections/community.general/pull/1970).
- oneview_network_set_info - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- profitbricks - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- profitbricks_volume - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- scaleway_compute - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- scaleway_lb - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1970).
- sensu_check - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- sensu_client - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- sensu_handler - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- webfaction_domain - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- webfaction_site - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/1885).
- yum_versionlock - Do the lock/unlock concurrently to speed up (https://github.com/ansible-collections/community.general/pull/1912).
release_summary: Regular feature and bugfix release.
fragments:
- 1596-xfs_quota-feedback_on_projects_not_initialized_has_changed.yml
- 1735-imc-sessions.yml
- 1833-zfs-creation-only-properties.yaml
- 1838-runit-deprecate-param-dist.yml
- 1852-deploy-helper-fix-state-is-clean-without-release.yaml
- 1861-python3-keys.yml
- 1867-modhelper-cmdmixin-dict-params.yml
- 1871-infoblox-inventory.yml
- 1880-fix_cobbler_system_ssl.yml
- 1882-fix-nmcli-ensure-slave-type-for-bond-slave.yml
- 1885-sanity-check-fixes-batch3.yml
- 1894-feat-nmcli-add-method4-and-method6.yml
- 1895-proxmox-kvm-fix-issue-1875.yml
- 1912-yum_versionlock-lock_unlock_concurrently.yml
- 1914-add-sanitization-to-url.yml
- 1916-add-version-sort-filter.yml
- 1927-removed-parameter-invalid.yml
- 1928-bigpanda-message.yml
- 1929-grove-message.yml
- 1970-valmod-batch7.yml
- 1972-ini_file-empty-str-value.yml
- 2.2.0.yml
- 620-consul_io-env-variables-conf-based.yml
- 719-manageiq-resource_id.yml
- 720-cloudforms_inventory.yml
- meta-runtime-deprecations.yml
modules:
- description: Manage your repositories on Github
name: github_repo
namespace: source_control.github
- description: Manage project members on GitLab Server
name: gitlab_project_members
namespace: source_control.gitlab
- description: Manage jenkins builds
name: jenkins_build
namespace: web_infrastructure
- description: Retrieve information about one or more Proxmox VE storages
name: proxmox_storage_info
namespace: cloud.misc
plugins:
filter:
- description: Sort a list according to version order instead of pure alphabetical
one
name: version_sort
namespace: null
release_date: '2021-03-08'

View File

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

View File

@@ -41,7 +41,7 @@ plugin_routing:
ali_instance_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.ali_instance_info instead.
docker_compose:
redirect: community.docker.docker_compose
docker_config:
@@ -198,15 +198,15 @@ plugin_routing:
hpilo_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.hpilo_info instead.
idrac_redfish_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.idrac_redfish_info instead.
jenkins_job_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.jenkins_job_info instead.
katello:
tombstone:
removal_version: 2.0.0
@@ -226,7 +226,7 @@ plugin_routing:
ldap_attr:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.ldap_attrs instead.
logicmonitor:
tombstone:
removal_version: 1.0.0
@@ -238,11 +238,11 @@ plugin_routing:
memset_memstore_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.memset_memstore_info instead.
memset_server_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.memset_server_info instead.
na_cdot_aggregate:
tombstone:
removal_version: 2.0.0
@@ -278,159 +278,159 @@ plugin_routing:
na_ontap_gather_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use netapp.ontap.na_ontap_info instead.
nginx_status_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.nginx_status_info instead.
one_image_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.one_image_info instead.
onepassword_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.onepassword_info instead.
oneview_datacenter_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.oneview_datacenter_info instead.
oneview_enclosure_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.oneview_enclosure_info instead.
oneview_ethernet_network_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.oneview_ethernet_network_info instead.
oneview_fc_network_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.oneview_fc_network_info instead.
oneview_fcoe_network_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.oneview_fcoe_network_info instead.
oneview_logical_interconnect_group_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.oneview_logical_interconnect_group_info instead.
oneview_network_set_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.oneview_network_set_info instead.
oneview_san_manager_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.oneview_san_manager_info instead.
online_server_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.online_server_info instead.
online_user_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.online_user_info instead.
ovirt:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_vm instead.
ovirt_affinity_label_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_affinity_label_info instead.
ovirt_api_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_api_info instead.
ovirt_cluster_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_cluster_info instead.
ovirt_datacenter_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_datacenter_info instead.
ovirt_disk_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_disk_info instead.
ovirt_event_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_event_info instead.
ovirt_external_provider_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_external_provider_info instead.
ovirt_group_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_group_info instead.
ovirt_host_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_host_info instead.
ovirt_host_storage_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_host_storage_info instead.
ovirt_network_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_network_info instead.
ovirt_nic_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_nic_info instead.
ovirt_permission_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_permission_info instead.
ovirt_quota_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_quota_info instead.
ovirt_scheduling_policy_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_scheduling_policy_info instead.
ovirt_snapshot_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_snapshot_info instead.
ovirt_storage_domain_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_storage_domain_info instead.
ovirt_storage_template_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_storage_template_info instead.
ovirt_storage_vm_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_storage_vm_info instead.
ovirt_tag_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_tag_info instead.
ovirt_template_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_template_info instead.
ovirt_user_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_user_info instead.
ovirt_vm_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_vm_info instead.
ovirt_vmpool_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use ovirt.ovirt.ovirt_vmpool_info instead.
postgresql_copy:
redirect: community.postgresql.postgresql_copy
postgresql_db:
@@ -478,47 +478,47 @@ plugin_routing:
purefa_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use purestorage.flasharray.purefa_info instead.
purefb_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use purestorage.flashblade.purefb_info instead.
python_requirements_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.python_requirements_info instead.
redfish_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.redfish_info instead.
scaleway_image_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.scaleway_image_info instead.
scaleway_ip_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.scaleway_ip_info instead.
scaleway_organization_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.scaleway_organization_info instead.
scaleway_security_group_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.scaleway_security_group_info instead.
scaleway_server_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.scaleway_server_info instead.
scaleway_snapshot_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.scaleway_snapshot_info instead.
scaleway_volume_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.scaleway_volume_info instead.
sf_account_manager:
tombstone:
removal_version: 2.0.0
@@ -542,15 +542,15 @@ plugin_routing:
smartos_image_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.smartos_image_info instead.
vertica_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.vertica_info instead.
xenserver_guest_facts:
deprecation:
removal_version: 3.0.0
warning_text: see plugin documentation for details
warning_text: Use community.general.xenserver_guest_info instead.
doc_fragments:
_gcp:
redirect: community.google._gcp

View File

@@ -162,7 +162,7 @@ class CacheModuleKeys(MutableSet):
self._cache.set(self.PREFIX, self._keyset)
def remove_by_timerange(self, s_min, s_max):
for k in self._keyset.keys():
for k in list(self._keyset.keys()):
t = self._keyset[k]
if s_min < t < s_max:
del self._keyset[k]

View File

@@ -217,14 +217,12 @@ class CacheModule(BaseCacheModule):
self._db.zrem(self._keys_set, key)
def flush(self):
for key in self.keys():
for key in list(self.keys()):
self.delete(key)
def copy(self):
# TODO: there is probably a better way to do this in redis
ret = dict()
for key in self.keys():
ret[key] = self.get(key)
ret = dict([(k, self.get(k)) for k in self.keys()])
return ret
def __getstate__(self):

View File

@@ -1013,7 +1013,7 @@ class CallbackModule(Default):
for attr in _stats_attributes:
_ret[self.DIY_NS]['stats'].update({attr: _get_value(obj=stats, attr=attr)})
_ret[self.DIY_NS].update({'top_level_var_names': _ret.keys()})
_ret[self.DIY_NS].update({'top_level_var_names': list(_ret.keys())})
return _ret

View File

@@ -173,8 +173,7 @@ class CallbackModule(CallbackBase):
# Displays info about playbook being started by a person on an
# inventory, as well as Tags, Skip Tags and Limits
if not self.printed_playbook:
self.playbook_name, _ = os.path.splitext(
os.path.basename(self.play.playbook.filename))
self.playbook_name, dummy = os.path.splitext(os.path.basename(self.play.playbook.filename))
host_list = self.play.playbook.inventory.host_list
inventory = os.path.basename(os.path.realpath(host_list))
self.send_msg("%s: Playbook initiated by %s against %s" %

View File

@@ -41,7 +41,16 @@ import difflib
from ansible import constants as C
from ansible.plugins.callback import CallbackBase
from ansible.module_utils._text import to_text
from ansible.utils.color import codeCodes
try:
codeCodes = C.COLOR_CODES
except AttributeError:
# This constant was moved to ansible.constants in
# https://github.com/ansible/ansible/commit/1202dd000f10b0e8959019484f1c3b3f9628fc67
# (will be included in ansible-core 2.11.0). For older Ansible/ansible-base versions,
# we include from the original location.
from ansible.utils.color import codeCodes
DONT_COLORIZE = False
COLORS = {
@@ -58,7 +67,7 @@ COLORS = {
def dict_diff(prv, nxt):
"""Return a dict of keys that differ with another config object."""
keys = set(prv.keys() + nxt.keys())
keys = set(list(prv.keys()) + list(nxt.keys()))
result = {}
for k in keys:
if prv.get(k) != nxt.get(k):

View File

@@ -86,7 +86,7 @@ class Connection(ConnectionBase):
write_fds = []
while len(read_fds) > 0 or len(write_fds) > 0:
try:
ready_reads, ready_writes, _ = select.select(read_fds, write_fds, [])
ready_reads, ready_writes, dummy = select.select(read_fds, write_fds, [])
except select.error as e:
if e.args[0] == errno.EINTR:
continue

View File

@@ -47,7 +47,7 @@ class ModuleDocFragment(object):
OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is
not specified through a configuration file (See C(config_file_location)). If the key is encrypted
with a pass-phrase, the C(api_user_key_pass_phrase) option must also be provided.
type: str
type: path
api_user_key_pass_phrase:
description:
- Passphrase used by the key referenced in C(api_user_key_file), if it is encrypted. If not set, then

View File

@@ -20,4 +20,5 @@ class ModuleDocFragment(object):
identify an instance of the resource. By default, all the attributes of a resource except
I(freeform_tags) are used to uniquely identify a resource.
type: list
elements: str
"""

View File

@@ -0,0 +1,21 @@
# Copyright (C) 2021 Eric Lavarde <elavarde@redhat.com>
# 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
from distutils.version import LooseVersion
def version_sort(value, reverse=False):
'''Sort a list according to loose versions so that e.g. 2.9 is smaller than 2.10'''
return sorted(value, key=LooseVersion, reverse=reverse)
class FilterModule(object):
''' Version sort filter '''
def filters(self):
return {
'version_sort': version_sort
}

View File

@@ -34,18 +34,15 @@ DOCUMENTATION = r'''
description: Populate inventory with instances in this region.
default: []
type: list
required: false
tags:
description: Populate inventory only with instances which have at least one of the tags listed here.
default: []
type: list
reqired: false
version_added: 2.0.0
types:
description: Populate inventory with instances with this type.
default: []
type: list
required: false
strict:
version_added: 2.0.0
compose:

View File

@@ -226,10 +226,8 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
if config == 'rootfs' or config.startswith(('virtio', 'sata', 'ide', 'scsi')):
value = ('disk_image=' + value)
if isinstance(value, int) or ',' not in value:
value = value
# split off strings with commas to a dict
else:
if not (isinstance(value, int) or ',' not in value):
# split off strings with commas to a dict
# skip over any keys that cannot be processed
try:
value = dict(key.split("=") for key in value.split(","))
@@ -354,7 +352,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
self._read_config_data(path)
# get connection host
self.proxmox_url = self.get_option('url')
self.proxmox_url = self.get_option('url').rstrip('/')
self.proxmox_user = self.get_option('user')
self.proxmox_password = self.get_option('password')
self.cache_key = self.get_cache_key(path)

View File

@@ -216,7 +216,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
yield host not in v
yield True
return all([found_host for found_host in find_host(host, inventory)])
return all(find_host(host, inventory))
def verify_file(self, path):

View File

@@ -81,7 +81,7 @@ class LookupModule(LookupBase):
)
if args:
raise AnsibleError(
"unrecognized arguments to with_sequence: %r" % args.keys()
"unrecognized arguments to with_sequence: %r" % list(args.keys())
)
def run(self, terms, variables=None, **kwargs):

View File

@@ -82,6 +82,27 @@ EXAMPLES = r"""
| items2dict(key_name='slug',
value_name='itemValue'))['password']
}}
- hosts: localhost
vars:
secret: >-
{{
lookup(
'community.general.tss',
102,
base_url='https://secretserver.domain.com/SecretServer/',
username='user.name',
password='password'
)
}}
tasks:
- ansible.builtin.debug:
msg: >
the password is {{
(secret['items']
| items2dict(key_name='slug',
value_name='itemValue'))['password']
}}
"""
from ansible.errors import AnsibleError, AnsibleOptionsError

View File

@@ -142,8 +142,8 @@ def aws_cvs_host_argument_spec():
return dict(
api_url=dict(required=True, type='str'),
validate_certs=dict(required=False, type='bool', default=True),
api_key=dict(required=True, type='str'),
secret_key=dict(required=True, type='str')
api_key=dict(required=True, type='str', no_log=True),
secret_key=dict(required=True, type='str', no_log=True)
)

View File

@@ -130,7 +130,7 @@ class CloudRetry(object):
try:
return f(*args, **kwargs)
except Exception as e:
if isinstance(e, cls.base_class):
if isinstance(e, cls.base_class): # pylint: disable=isinstance-second-argument-not-valid-type
response_code = cls.status_code_from_exception(e)
if cls.found(response_code, catch_extra_error_codes):
msg = "{0}: Retrying in {1} seconds...".format(str(e), delay)

View File

@@ -58,7 +58,7 @@ def keycloak_argument_spec():
auth_keycloak_url=dict(type='str', aliases=['url'], required=True),
auth_client_id=dict(type='str', default='admin-cli'),
auth_realm=dict(type='str', required=True),
auth_client_secret=dict(type='str', default=None),
auth_client_secret=dict(type='str', default=None, no_log=True),
auth_username=dict(type='str', aliases=['username'], required=True),
auth_password=dict(type='str', aliases=['password'], required=True, no_log=True),
validate_certs=dict(type='bool', default=True)

View File

@@ -284,7 +284,7 @@ class CmdMixin(object):
def _calculate_args(self, extra_params=None, params=None):
def add_arg_formatted_param(_cmd_args, arg_format, _value):
args = [x for x in arg_format.to_text(_value)]
args = list(arg_format.to_text(_value))
return _cmd_args + args
def find_format(_param):
@@ -296,17 +296,28 @@ class CmdMixin(object):
param_list = params if params else self.module.params.keys()
for param in param_list:
if param in self.module.argument_spec:
if param not in self.module.params:
if isinstance(param, dict):
if len(param) != 1:
raise ModuleHelperException("run_command parameter as a dict must "
"contain only one key: {0}".format(param))
_param = list(param.keys())[0]
fmt = find_format(_param)
value = param[_param]
elif isinstance(param, str):
if param in self.module.argument_spec:
fmt = find_format(param)
value = self.module.params[param]
elif param in extra_params:
fmt = find_format(param)
value = extra_params[param]
else:
self.module.deprecate("Cannot determine value for parameter: {0}. "
"From version 4.0.0 onwards this will generate an exception".format(param),
version="4.0.0", collection_name="community.general")
continue
fmt = find_format(param)
value = self.module.params[param]
else:
if param not in extra_params:
continue
fmt = find_format(param)
value = extra_params[param]
self.cmd_args = cmd_args
raise ModuleHelperException("run_command parameter must be either a str or a dict: {0}".format(param))
cmd_args = add_arg_formatted_param(cmd_args, fmt, value)
return cmd_args

View File

@@ -260,13 +260,10 @@ class WapiModule(WapiBase):
else:
proposed_object[key] = self.module.params[key]
# If configure_by_dns is set to False, then delete the default dns set in the param else throw exception
# If configure_by_dns is set to False and view is 'default', then delete the default dns
if not proposed_object.get('configure_for_dns') and proposed_object.get('view') == 'default'\
and ib_obj_type == NIOS_HOST_RECORD:
del proposed_object['view']
elif not proposed_object.get('configure_for_dns') and proposed_object.get('view') != 'default'\
and ib_obj_type == NIOS_HOST_RECORD:
self.module.fail_json(msg='DNS Bypass is not allowed if DNS view is set other than \'default\'')
if ib_obj_ref:
if len(ib_obj_ref) > 1:
@@ -502,12 +499,12 @@ class WapiModule(WapiBase):
else:
test_obj_filter = dict([('name', old_name)])
# get the object reference
ib_obj = self.get_object(ib_obj_type, test_obj_filter, return_fields=ib_spec.keys())
ib_obj = self.get_object(ib_obj_type, test_obj_filter, return_fields=list(ib_spec.keys()))
if ib_obj:
obj_filter['name'] = new_name
else:
test_obj_filter['name'] = new_name
ib_obj = self.get_object(ib_obj_type, test_obj_filter, return_fields=ib_spec.keys())
ib_obj = self.get_object(ib_obj_type, test_obj_filter, return_fields=list(ib_spec.keys()))
update = True
return ib_obj, update, new_name
if (ib_obj_type == NIOS_HOST_RECORD):
@@ -541,7 +538,7 @@ class WapiModule(WapiBase):
# check if test_obj_filter is empty copy passed obj_filter
else:
test_obj_filter = obj_filter
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=ib_spec.keys())
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=list(ib_spec.keys()))
elif (ib_obj_type == NIOS_A_RECORD):
# resolves issue where multiple a_records with same name and different IP address
test_obj_filter = obj_filter
@@ -551,7 +548,7 @@ class WapiModule(WapiBase):
except TypeError:
ipaddr = obj_filter['ipv4addr']
test_obj_filter['ipv4addr'] = ipaddr
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=ib_spec.keys())
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=list(ib_spec.keys()))
elif (ib_obj_type == NIOS_TXT_RECORD):
# resolves issue where multiple txt_records with same name and different text
test_obj_filter = obj_filter
@@ -561,12 +558,12 @@ class WapiModule(WapiBase):
except TypeError:
txt = obj_filter['text']
test_obj_filter['text'] = txt
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=ib_spec.keys())
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=list(ib_spec.keys()))
elif (ib_obj_type == NIOS_ZONE):
# del key 'restart_if_needed' as nios_zone get_object fails with the key present
temp = ib_spec['restart_if_needed']
del ib_spec['restart_if_needed']
ib_obj = self.get_object(ib_obj_type, obj_filter.copy(), return_fields=ib_spec.keys())
ib_obj = self.get_object(ib_obj_type, obj_filter.copy(), return_fields=list(ib_spec.keys()))
# reinstate restart_if_needed if ib_obj is none, meaning there's no existing nios_zone ref
if not ib_obj:
ib_spec['restart_if_needed'] = temp
@@ -574,12 +571,12 @@ class WapiModule(WapiBase):
# del key 'create_token' as nios_member get_object fails with the key present
temp = ib_spec['create_token']
del ib_spec['create_token']
ib_obj = self.get_object(ib_obj_type, obj_filter.copy(), return_fields=ib_spec.keys())
ib_obj = self.get_object(ib_obj_type, obj_filter.copy(), return_fields=list(ib_spec.keys()))
if temp:
# reinstate 'create_token' key
ib_spec['create_token'] = temp
else:
ib_obj = self.get_object(ib_obj_type, obj_filter.copy(), return_fields=ib_spec.keys())
ib_obj = self.get_object(ib_obj_type, obj_filter.copy(), return_fields=list(ib_spec.keys()))
return ib_obj, update, new_name
def on_update(self, proposed_object, ib_spec):

View File

@@ -90,7 +90,7 @@ def get_common_arg_spec(supports_create=False, supports_wait=False):
config_profile_name=dict(type="str", default="DEFAULT"),
api_user=dict(type="str"),
api_user_fingerprint=dict(type="str", no_log=True),
api_user_key_file=dict(type="str"),
api_user_key_file=dict(type="path"),
api_user_key_pass_phrase=dict(type="str", no_log=True),
auth_type=dict(
type="str",
@@ -104,7 +104,7 @@ def get_common_arg_spec(supports_create=False, supports_wait=False):
if supports_create:
common_args.update(
key_by=dict(type="list"),
key_by=dict(type="list", elements="str"),
force_create=dict(type="bool", default=False),
)

View File

@@ -469,7 +469,7 @@ class RedfishUtils(object):
controller_results = []
# Get these entries, but does not fail if not found
properties = ['CacheSummary', 'FirmwareVersion', 'Identifiers',
'Location', 'Manufacturer', 'Model', 'Name',
'Location', 'Manufacturer', 'Model', 'Name', 'Id',
'PartNumber', 'SerialNumber', 'SpeedGbps', 'Status']
key = "StorageControllers"
@@ -1700,7 +1700,7 @@ class RedfishUtils(object):
chassis_results = []
# Get these entries, but does not fail if not found
properties = ['ChassisType', 'PartNumber', 'AssetTag',
properties = ['Name', 'Id', 'ChassisType', 'PartNumber', 'AssetTag',
'Manufacturer', 'IndicatorLED', 'SerialNumber', 'Model']
# Go through list
@@ -1724,7 +1724,7 @@ class RedfishUtils(object):
fan_results = []
key = "Thermal"
# Get these entries, but does not fail if not found
properties = ['FanName', 'Reading', 'ReadingUnits', 'Status']
properties = ['Name', 'FanName', 'Reading', 'ReadingUnits', 'Status']
# Go through list
for chassis_uri in self.chassis_uris:
@@ -1836,8 +1836,8 @@ class RedfishUtils(object):
cpu_results = []
key = "Processors"
# Get these entries, but does not fail if not found
properties = ['Id', 'Manufacturer', 'Model', 'MaxSpeedMHz', 'TotalCores',
'TotalThreads', 'Status']
properties = ['Id', 'Name', 'Manufacturer', 'Model', 'MaxSpeedMHz',
'TotalCores', 'TotalThreads', 'Status']
# Search for 'key' entry and extract URI from it
response = self.get_request(self.root_uri + systems_uri)
@@ -1886,7 +1886,7 @@ class RedfishUtils(object):
memory_results = []
key = "Memory"
# Get these entries, but does not fail if not found
properties = ['SerialNumber', 'MemoryDeviceType', 'PartNumber',
properties = ['Id', 'SerialNumber', 'MemoryDeviceType', 'PartNumber',
'MemoryLocation', 'RankCount', 'CapacityMiB', 'OperatingMemoryModes', 'Status', 'Manufacturer', 'Name']
# Search for 'key' entry and extract URI from it
@@ -1943,7 +1943,7 @@ class RedfishUtils(object):
nic_results = []
key = "EthernetInterfaces"
# Get these entries, but does not fail if not found
properties = ['Description', 'FQDN', 'IPv4Addresses', 'IPv6Addresses',
properties = ['Name', 'Id', 'Description', 'FQDN', 'IPv4Addresses', 'IPv6Addresses',
'NameServers', 'MACAddress', 'PermanentMACAddress',
'SpeedMbps', 'MTUSize', 'AutoNeg', 'Status']
@@ -2368,7 +2368,7 @@ class RedfishUtils(object):
properties = ['Status', 'HostName', 'PowerState', 'Model', 'Manufacturer',
'PartNumber', 'SystemType', 'AssetTag', 'ServiceTag',
'SerialNumber', 'SKU', 'BiosVersion', 'MemorySummary',
'ProcessorSummary', 'TrustedModules']
'ProcessorSummary', 'TrustedModules', 'Name', 'Id']
response = self.get_request(self.root_uri + systems_uri)
if response['ret'] is False:
@@ -2632,7 +2632,7 @@ class RedfishUtils(object):
if response['ret'] is False:
return response
data = response['data']
if '"' + nic_addr + '"' in str(data) or "'" + nic_addr + "'" in str(data):
if '"' + nic_addr.lower() + '"' in str(data).lower() or "'" + nic_addr.lower() + "'" in str(data).lower():
target_ethernet_uri = uri
target_ethernet_current_setting = data
break

View File

@@ -84,7 +84,7 @@ class UTM:
raise UTMModuleConfigurationError(
"The keys " + to_native(
self.change_relevant_keys) + " to check are not in the modules keys:\n" + to_native(
module.params.keys()))
list(module.params.keys())))
def execute(self):
try:

View File

@@ -32,6 +32,7 @@ options:
- A list of recipient email ids to notify the alert.
This is required for state 'present'
type: list
elements: str
metric:
description:
- The metric on which to measure the condition that will trigger the alert.
@@ -220,7 +221,7 @@ class ClcAlertPolicy:
name=dict(),
id=dict(),
alias=dict(required=True),
alert_recipients=dict(type='list'),
alert_recipients=dict(type='list', elements='str'),
metric=dict(
choices=[
'cpu',

View File

@@ -18,6 +18,7 @@ options:
- A list of server Ids to deploy the blue print package.
type: list
required: True
elements: str
package_id:
description:
- The package id of the blue print.
@@ -164,7 +165,7 @@ class ClcBlueprintPackage:
:return: the package dictionary object
"""
argument_spec = dict(
server_ids=dict(type='list', required=True),
server_ids=dict(type='list', elements='str', required=True),
package_id=dict(required=True),
package_params=dict(type='dict', default={}),
wait=dict(default=True), # @FIXME should be bool?

View File

@@ -29,17 +29,20 @@ options:
- The list of source addresses for traffic on the originating firewall.
This is required when state is 'present'
type: list
elements: str
destination:
description:
- The list of destination addresses for traffic on the terminating firewall.
This is required when state is 'present'
type: list
elements: str
ports:
description:
- The list of ports associated with the policy.
TCP and UDP can take in single ports or port ranges.
- "Example: C(['any', 'icmp', 'TCP/123', 'UDP/123', 'TCP/123-456', 'UDP/123-456'])."
type: list
elements: str
firewall_policy_id:
description:
- Id of the firewall policy. This is required to update or delete an existing firewall policy
@@ -217,9 +220,9 @@ class ClcFirewallPolicy:
source_account_alias=dict(required=True),
destination_account_alias=dict(),
firewall_policy_id=dict(),
ports=dict(type='list'),
source=dict(type='list'),
destination=dict(type='list'),
ports=dict(type='list', elements='str'),
source=dict(type='list', elements='str'),
destination=dict(type='list', elements='str'),
wait=dict(default=True), # @FIXME type=bool
state=dict(default='present', choices=['present', 'absent']),
enabled=dict(default=True, choices=[True, False])

View File

@@ -53,6 +53,7 @@ options:
- A list of nodes that needs to be added to the load balancer pool
type: list
default: []
elements: dict
status:
description:
- The status of the loadbalancer
@@ -869,7 +870,7 @@ class ClcLoadBalancer:
port=dict(choices=[80, 443]),
method=dict(choices=['leastConnection', 'roundRobin']),
persistence=dict(choices=['standard', 'sticky']),
nodes=dict(type='list', default=[]),
nodes=dict(type='list', default=[], elements='dict'),
status=dict(default='enabled', choices=['enabled', 'disabled']),
state=dict(
default='present',

View File

@@ -18,6 +18,7 @@ options:
- A list of server Ids to modify.
type: list
required: True
elements: str
cpu:
description:
- How many CPUs to update on the server
@@ -396,7 +397,7 @@ class ClcModifyServer:
:return: argument spec dictionary
"""
argument_spec = dict(
server_ids=dict(type='list', required=True),
server_ids=dict(type='list', required=True, elements='str'),
state=dict(default='present', choices=['present', 'absent']),
cpu=dict(),
memory=dict(),

View File

@@ -23,11 +23,13 @@ options:
description:
- A list of ports to expose. This is required when state is 'present'
type: list
elements: int
server_ids:
description:
- A list of servers to create public ips on.
type: list
required: True
elements: str
state:
description:
- Determine whether to create or delete public IPs. If present module will not create a second public ip if one
@@ -193,9 +195,9 @@ class ClcPublicIp(object):
:return: argument spec dictionary
"""
argument_spec = dict(
server_ids=dict(type='list', required=True),
server_ids=dict(type='list', required=True, elements='str'),
protocol=dict(default='TCP', choices=['TCP', 'UDP', 'ICMP']),
ports=dict(type='list'),
ports=dict(type='list', elements='int'),
wait=dict(type='bool', default=True),
state=dict(default='present', choices=['present', 'absent']),
)

View File

@@ -17,6 +17,7 @@ options:
description:
- The list of additional disks for the server
type: list
elements: dict
default: []
add_public_ip:
description:
@@ -66,6 +67,7 @@ options:
- The list of custom fields to set on the server.
type: list
default: []
elements: dict
description:
description:
- The description to set for the server.
@@ -111,6 +113,7 @@ options:
description:
- The list of blue print packages to run on the server after its created.
type: list
elements: dict
default: []
password:
description:
@@ -130,6 +133,7 @@ options:
description:
- A list of ports to allow on the firewall to the servers public ip, if add_public_ip is set to True.
type: list
elements: dict
default: []
secondary_dns:
description:
@@ -141,6 +145,7 @@ options:
A list of server Ids to insure are started, stopped, or absent.
type: list
default: []
elements: str
source_server_password:
description:
- The password for the source server if a clone is specified.
@@ -575,8 +580,8 @@ class ClcServer:
type=dict(default='standard', choices=['standard', 'hyperscale', 'bareMetal']),
primary_dns=dict(default=None),
secondary_dns=dict(default=None),
additional_disks=dict(type='list', default=[]),
custom_fields=dict(type='list', default=[]),
additional_disks=dict(type='list', default=[], elements='dict'),
custom_fields=dict(type='list', default=[], elements='dict'),
ttl=dict(default=None),
managed_os=dict(type='bool', default=False),
description=dict(default=None),
@@ -586,7 +591,7 @@ class ClcServer:
anti_affinity_policy_name=dict(default=None),
alert_policy_id=dict(default=None),
alert_policy_name=dict(default=None),
packages=dict(type='list', default=[]),
packages=dict(type='list', default=[], elements='dict'),
state=dict(
default='present',
choices=[
@@ -597,7 +602,7 @@ class ClcServer:
count=dict(type='int', default=1),
exact_count=dict(type='int', default=None),
count_group=dict(),
server_ids=dict(type='list', default=[]),
server_ids=dict(type='list', default=[], elements='str'),
add_public_ip=dict(type='bool', default=False),
public_ip_protocol=dict(
default='TCP',
@@ -605,7 +610,7 @@ class ClcServer:
'TCP',
'UDP',
'ICMP']),
public_ip_ports=dict(type='list', default=[]),
public_ip_ports=dict(type='list', default=[], elements='dict'),
configuration_id=dict(default=None),
os_type=dict(default=None,
choices=[

View File

@@ -18,6 +18,7 @@ options:
- The list of CLC server Ids.
type: list
required: True
elements: str
expiration_days:
description:
- The number of days to keep the server snapshot before it expires.
@@ -330,7 +331,7 @@ class ClcSnapshot:
:return: the package dictionary object
"""
argument_spec = dict(
server_ids=dict(type='list', required=True),
server_ids=dict(type='list', required=True, elements='str'),
expiration_days=dict(default=7, type='int'),
wait=dict(default=True),
state=dict(

View File

@@ -26,6 +26,7 @@ options:
- Heroku API key
apps:
type: list
elements: str
description:
- List of Heroku App names
required: true
@@ -109,7 +110,7 @@ def main():
argument_spec = HerokuHelper.heroku_argument_spec()
argument_spec.update(
user=dict(required=True, type='str'),
apps=dict(required=True, type='list'),
apps=dict(required=True, type='list', elements='str'),
suppress_invitation=dict(default=False, type='bool'),
state=dict(default='present', type='str', choices=['present', 'absent']),
)

View File

@@ -543,7 +543,7 @@ def build_module():
snapshot_id=dict(type='str')
)),
vpc_id=dict(type='str', required=True),
admin_pass=dict(type='str'),
admin_pass=dict(type='str', no_log=True),
data_volumes=dict(type='list', elements='dict', options=dict(
volume_id=dict(type='str', required=True),
device=dict(type='str')

View File

@@ -63,6 +63,7 @@ options:
U(https://www.linode.com/docs/api/tags/).
required: false
type: list
elements: str
root_pass:
description:
- The password for the root user. If not specified, one will be
@@ -75,6 +76,7 @@ options:
- A list of SSH public key parts to deploy for the root user.
required: false
type: list
elements: str
state:
description:
- The desired instance state.
@@ -240,12 +242,12 @@ def initialise_module():
no_log=True,
fallback=(env_fallback, ['LINODE_ACCESS_TOKEN']),
),
authorized_keys=dict(type='list', required=False),
authorized_keys=dict(type='list', elements='str', required=False),
group=dict(type='str', required=False),
image=dict(type='str', required=False),
region=dict(type='str', required=False),
root_pass=dict(type='str', required=False, no_log=True),
tags=dict(type='list', required=False),
tags=dict(type='list', elements='str', required=False),
type=dict(type='str', required=False),
stackscript_id=dict(type='int', required=False),
stackscript_data=dict(type='dict', required=False),

View File

@@ -730,7 +730,7 @@ class LxcContainerManagement(object):
for option_line in container_config:
# Look for key in config
if keyre.match(option_line):
_, _value = option_line.split('=', 1)
dummy, _value = option_line.split('=', 1)
config_value = ' '.join(_value.split())
line_index = container_config.index(option_line)
# If the sanitized values don't match replace them
@@ -953,7 +953,7 @@ class LxcContainerManagement(object):
"""
self.container = self.get_container_bind()
for _ in xrange(timeout):
for dummy in xrange(timeout):
if self._get_state() != 'running':
self.container.start()
self.state_change = True
@@ -1006,7 +1006,7 @@ class LxcContainerManagement(object):
:type timeout: ``int``
"""
for _ in xrange(timeout):
for dummy in xrange(timeout):
if not self._container_exists(container_name=self.container_name, lxc_path=self.lxc_path):
break
@@ -1662,7 +1662,7 @@ def main():
),
backing_store=dict(
type='str',
choices=LXC_BACKING_STORE.keys(),
choices=list(LXC_BACKING_STORE.keys()),
default='dir'
),
template_options=dict(
@@ -1699,7 +1699,7 @@ def main():
type='path'
),
state=dict(
choices=LXC_ANSIBLE_STATES.keys(),
choices=list(LXC_ANSIBLE_STATES.keys()),
default='started'
),
container_command=dict(
@@ -1733,7 +1733,7 @@ def main():
type='path',
),
archive_compression=dict(
choices=LXC_COMPRESSION_MAP.keys(),
choices=list(LXC_COMPRESSION_MAP.keys()),
default='gzip'
)
),

View File

@@ -45,6 +45,7 @@ options:
description:
- Profile to be used by the container
type: list
elements: str
devices:
description:
- 'The devices for the container
@@ -132,14 +133,14 @@ options:
- If not specified, it defaults to C(${HOME}/.config/lxc/client.key).
required: false
aliases: [ key_file ]
type: str
type: path
client_cert:
description:
- The client certificate file path.
- If not specified, it defaults to C(${HOME}/.config/lxc/client.crt).
required: false
aliases: [ cert_file ]
type: str
type: path
trust_password:
description:
- The client trusted password.
@@ -658,12 +659,13 @@ def main():
),
profiles=dict(
type='list',
elements='str',
),
source=dict(
type='dict',
),
state=dict(
choices=LXD_ANSIBLE_STATES.keys(),
choices=list(LXD_ANSIBLE_STATES.keys()),
default='started'
),
target=dict(
@@ -690,11 +692,11 @@ def main():
default='unix:/var/snap/lxd/common/lxd/unix.socket'
),
client_key=dict(
type='str',
type='path',
aliases=['key_file']
),
client_cert=dict(
type='str',
type='path',
aliases=['cert_file']
),
trust_password=dict(type='str', no_log=True)

View File

@@ -2,12 +2,12 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Hiroaki Nakamura <hnakamur@gmail.com>
# Copyright: (c) 2020, Frank Dornheim <dornheim@posteo.de>
# 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 = '''
---
module: lxd_profile
@@ -52,6 +52,14 @@ options:
See U(https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-11)
required: false
type: str
merge_profile:
description:
- Merge the configuration of the present profile with the new desired configuration,
instead of replacing it.
required: false
default: false
type: bool
version_added: 2.1.0
state:
choices:
- present
@@ -79,14 +87,14 @@ options:
- If not specified, it defaults to C($HOME/.config/lxc/client.key).
required: false
aliases: [ key_file ]
type: str
type: path
client_cert:
description:
- The client certificate file path.
- If not specified, it defaults to C($HOME/.config/lxc/client.crt).
required: false
aliases: [ cert_file ]
type: str
type: path
trust_password:
description:
- The client trusted password.
@@ -142,6 +150,23 @@ EXAMPLES = '''
parent: br0
type: nic
# An example for modify/merge a profile
- hosts: localhost
connection: local
tasks:
- name: Merge a profile
community.general.lxd_profile:
merge_profile: true
name: macvlan
state: present
config: {}
description: my macvlan profile
devices:
eth0:
nictype: macvlan
parent: br0
type: nic
# An example for deleting a profile
- hosts: localhost
connection: local
@@ -181,7 +206,6 @@ actions:
'''
import os
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.lxd import LXDClient, LXDClientException
@@ -266,7 +290,7 @@ class LXDProfileManagement(object):
self._create_profile()
else:
self.module.fail_json(
msg='new_name must not be set when the profile does not exist and the specified state is present',
msg='new_name must not be set when the profile does not exist and the state is present',
changed=False)
else:
if self.new_name is not None and self.new_name != self.name:
@@ -307,10 +331,96 @@ class LXDProfileManagement(object):
self._needs_to_change_profile_config('devices')
)
def _apply_profile_configs(self):
config = self.old_profile_json.copy()
def _merge_dicts(self, source, destination):
"""Merge Dictionarys
Get a list of filehandle numbers from logger to be handed to
DaemonContext.files_preserve
Args:
dict(source): source dict
dict(destination): destination dict
Kwargs:
None
Raises:
None
Returns:
dict(destination): merged dict"""
for key, value in source.items():
if isinstance(value, dict):
# get node or create one
node = destination.setdefault(key, {})
self._merge_dicts(value, node)
else:
destination[key] = value
return destination
def _merge_config(self, config):
""" merge profile
Merge Configuration of the present profile and the new desired configitems
Args:
dict(config): Dict with the old config in 'metadata' and new config in 'config'
Kwargs:
None
Raises:
None
Returns:
dict(config): new config"""
# merge or copy the sections from the existing profile to 'config'
for item in ['config', 'description', 'devices', 'name', 'used_by']:
if item in config:
config[item] = self._merge_dicts(config['metadata'][item], config[item])
else:
config[item] = config['metadata'][item]
# merge or copy the sections from the ansible-task to 'config'
return self._merge_dicts(self.config, config)
def _generate_new_config(self, config):
""" rebuild profile
Rebuild the Profile by the configuration provided in the play.
Existing configurations are discarded.
This ist the default behavior.
Args:
dict(config): Dict with the old config in 'metadata' and new config in 'config'
Kwargs:
None
Raises:
None
Returns:
dict(config): new config"""
for k, v in self.config.items():
config[k] = v
return config
def _apply_profile_configs(self):
""" Selection of the procedure: rebuild or merge
The standard behavior is that all information not contained
in the play is discarded.
If "merge_profile" is provides in the play and "True", then existing
configurations from the profile and new ones defined are merged.
Args:
None
Kwargs:
None
Raises:
None
Returns:
None"""
config = self.old_profile_json.copy()
if self.module.params['merge_profile']:
config = self._merge_config(config)
else:
config = self._generate_new_config(config)
# upload config to lxd
self.client.do('PUT', '/1.0/profiles/{0}'.format(self.name), config)
self.actions.append('apply_profile_configs')
@@ -371,6 +481,10 @@ def main():
devices=dict(
type='dict',
),
merge_profile=dict(
type='bool',
default=False
),
state=dict(
choices=PROFILES_STATES,
default='present'
@@ -384,11 +498,11 @@ def main():
default='unix:/var/snap/lxd/common/lxd/unix.socket'
),
client_key=dict(
type='str',
type='path',
aliases=['key_file']
),
client_cert=dict(
type='str',
type='path',
aliases=['cert_file']
),
trust_password=dict(type='str', no_log=True)

View File

@@ -405,8 +405,8 @@ def main():
instance_gateway=dict(type='str', aliases=['gateway']),
instance_domain=dict(type='str', aliases=['domain']),
instance_dns=dict(type='str', aliases=['dns']),
instance_rootpw=dict(type='str', aliases=['rootpw']),
instance_key=dict(type='str', aliases=['key']),
instance_rootpw=dict(type='str', aliases=['rootpw'], no_log=True),
instance_key=dict(type='str', aliases=['key'], no_log=True),
sdomain=dict(type='str'),
region=dict(type='str'),
),

View File

@@ -345,7 +345,6 @@ EXAMPLES = r'''
state: absent
'''
import os
import time
import traceback
from distutils.version import LooseVersion
@@ -356,7 +355,7 @@ try:
except ImportError:
HAS_PROXMOXER = False
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils._text import to_native
@@ -481,7 +480,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
api_host=dict(required=True),
api_password=dict(no_log=True),
api_password=dict(no_log=True, fallback=(env_fallback, ['PROXMOX_PASSWORD'])),
api_token_id=dict(no_log=True),
api_token_secret=dict(no_log=True),
api_user=dict(required=True),
@@ -514,7 +513,10 @@ def main():
description=dict(type='str'),
hookscript=dict(type='str'),
proxmox_default_behavior=dict(type='str', choices=['compatibility', 'no_defaults']),
)
),
required_if=[('state', 'present', ['node', 'hostname', 'password', 'ostemplate'])],
required_together=[('api_token_id', 'api_token_secret')],
required_one_of=[('api_password', 'api_token_id')],
)
if not HAS_PROXMOXER:
@@ -561,13 +563,7 @@ def main():
module.params[param] = value
auth_args = {'user': api_user}
if not (api_token_id and api_token_secret):
# If password not set get it from PROXMOX_PASSWORD env
if not api_password:
try:
api_password = os.environ['PROXMOX_PASSWORD']
except KeyError as e:
module.fail_json(msg='You should set api_password param or use PROXMOX_PASSWORD environment variable')
if not api_token_id:
auth_args['password'] = api_password
else:
auth_args['token_name'] = api_token_id
@@ -599,8 +595,6 @@ def main():
# If no vmid was passed, there cannot be another VM named 'hostname'
if not module.params['vmid'] and get_vmid(proxmox, hostname) and not module.params['force']:
module.exit_json(changed=False, msg="VM with hostname %s already exists and has ID number %s" % (hostname, get_vmid(proxmox, hostname)[0]))
elif not (node, module.params['hostname'] and module.params['password'] and module.params['ostemplate']):
module.fail_json(msg='node, hostname, password and ostemplate are mandatory for creating vm')
elif not node_check(proxmox, node):
module.fail_json(msg="node '%s' not exists in cluster" % node)
elif not content_check(proxmox, node, module.params['ostemplate'], template_store):
@@ -622,7 +616,7 @@ def main():
searchdomain=module.params['searchdomain'],
force=int(module.params['force']),
pubkey=module.params['pubkey'],
features=",".join(module.params['features'] or []),
features=",".join(module.params['features']) if module.params['features'] is not None else None,
unprivileged=int(module.params['unprivileged']),
description=module.params['description'],
hookscript=module.params['hookscript'])

View File

@@ -31,6 +31,9 @@ options:
description:
- Pass arbitrary arguments to kvm.
- This option is for experts only!
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(-serial unix:/var/run/qemu-server/<vmid>.serial,server,nowait).
Note that the default value of I(proxmox_default_behavior) changes in community.general 4.0.0.
type: str
autostart:
description:
@@ -730,46 +733,23 @@ EXAMPLES = '''
'''
RETURN = '''
devices:
description: The list of devices created or used.
returned: success
type: dict
sample: '
{
"ide0": "VMS_LVM:vm-115-disk-1",
"ide1": "VMs:115/vm-115-disk-3.raw",
"virtio0": "VMS_LVM:vm-115-disk-2",
"virtio1": "VMs:115/vm-115-disk-1.qcow2",
"virtio2": "VMs:115/vm-115-disk-2.raw"
}'
mac:
description: List of mac address created and net[n] attached. Useful when you want to use provision systems like Foreman via PXE.
returned: success
type: dict
sample: '
{
"net0": "3E:6E:97:D2:31:9F",
"net1": "B6:A1:FC:EF:78:A4"
}'
vmid:
description: The VM vmid.
returned: success
type: int
sample: 115
description: The VM vmid.
returned: success
type: int
sample: 115
status:
description:
- The current virtual machine status.
- Returned only when C(state=current)
returned: success
type: dict
sample: '{
"changed": false,
"msg": "VM kropta with vmid = 110 is running",
"status": "running"
}'
description: The current virtual machine status.
returned: success, not clone, not absent, not update
type: str
sample: running
msg:
description: A short message
returned: always
type: str
sample: "VM kropta with vmid = 110 is running"
'''
import os
import re
import time
import traceback
@@ -782,7 +762,7 @@ try:
except ImportError:
HAS_PROXMOXER = False
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils._text import to_native
@@ -948,9 +928,9 @@ def create_vm(module, proxmox, vmid, newid, node, name, memory, cpu, cores, sock
if searchdomains:
kwargs['searchdomain'] = ' '.join(searchdomains)
# -args and skiplock require root@pam user
# -args and skiplock require root@pam user - but can not use api tokens
if module.params['api_user'] == "root@pam" and module.params['args'] is None:
if not update:
if not update and module.params['proxmox_default_behavior'] == 'compatibility':
kwargs['args'] = vm_args
elif module.params['api_user'] == "root@pam" and module.params['args'] is not None:
kwargs['args'] = module.params['args']
@@ -1015,7 +995,7 @@ def main():
agent=dict(type='bool'),
args=dict(type='str'),
api_host=dict(required=True),
api_password=dict(no_log=True),
api_password=dict(no_log=True, fallback=(env_fallback, ['PROXMOX_PASSWORD'])),
api_token_id=dict(no_log=True),
api_token_secret=dict(no_log=True),
api_user=dict(required=True),
@@ -1028,12 +1008,12 @@ def main():
cipassword=dict(type='str', no_log=True),
citype=dict(type='str', choices=['nocloud', 'configdrive2']),
ciuser=dict(type='str'),
clone=dict(type='str', default=None),
clone=dict(type='str'),
cores=dict(type='int'),
cpu=dict(type='str'),
cpulimit=dict(type='int'),
cpuunits=dict(type='int'),
delete=dict(type='str', default=None),
delete=dict(type='str'),
description=dict(type='str'),
digest=dict(type='str'),
force=dict(type='bool'),
@@ -1056,7 +1036,7 @@ def main():
name=dict(type='str'),
nameservers=dict(type='list', elements='str'),
net=dict(type='dict'),
newid=dict(type='int', default=None),
newid=dict(type='int'),
node=dict(),
numa=dict(type='dict'),
numa_enabled=dict(type='bool'),
@@ -1092,13 +1072,14 @@ def main():
vcpus=dict(type='int'),
vga=dict(choices=['std', 'cirrus', 'vmware', 'qxl', 'serial0', 'serial1', 'serial2', 'serial3', 'qxl2', 'qxl3', 'qxl4']),
virtio=dict(type='dict'),
vmid=dict(type='int', default=None),
vmid=dict(type='int'),
watchdog=dict(),
proxmox_default_behavior=dict(type='str', choices=['compatibility', 'no_defaults']),
),
mutually_exclusive=[('delete', 'revert'), ('delete', 'update'), ('revert', 'update'), ('clone', 'update'), ('clone', 'delete'), ('clone', 'revert')],
required_one_of=[('name', 'vmid',)],
required_if=[('state', 'present', ['node'])]
required_together=[('api_token_id', 'api_token_secret')],
required_one_of=[('name', 'vmid'), ('api_password', 'api_token_id')],
required_if=[('state', 'present', ['node'])],
)
if not HAS_PROXMOXER:
@@ -1140,7 +1121,6 @@ def main():
cores=1,
cpu='kvm64',
cpuunits=1000,
force=False,
format='qcow2',
kvm=True,
memory=512,
@@ -1159,12 +1139,6 @@ def main():
auth_args = {'user': api_user}
if not (api_token_id and api_token_secret):
# If password not set get it from PROXMOX_PASSWORD env
if not api_password:
try:
api_password = os.environ['PROXMOX_PASSWORD']
except KeyError:
module.fail_json(msg='You should set api_password param or use PROXMOX_PASSWORD environment variable')
auth_args['password'] = api_password
else:
auth_args['token_name'] = api_token_id
@@ -1207,36 +1181,36 @@ def main():
# Ensure source VM id exists when cloning
if not get_vm(proxmox, vmid):
module.fail_json(msg='VM with vmid = %s does not exist in cluster' % vmid)
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, msg="VM with name <%s> already exists" % name)
module.exit_json(changed=False, vmid=vmid, msg="VM with name <%s> already exists" % name)
# Ensure the choosen VM id doesn't already exist when cloning
if get_vm(proxmox, newid):
module.exit_json(changed=False, msg="vmid %s with VM name %s already exists" % (newid, name))
module.exit_json(changed=False, vmid=vmid, msg="vmid %s with VM name %s already exists" % (newid, name))
if delete is not None:
try:
settings(module, proxmox, vmid, node, name, delete=delete)
module.exit_json(changed=True, msg="Settings has deleted on VM {0} with vmid {1}".format(name, vmid))
module.exit_json(changed=True, vmid=vmid, msg="Settings has deleted on VM {0} with vmid {1}".format(name, vmid))
except Exception as e:
module.fail_json(msg='Unable to delete settings on VM {0} with vmid {1}: '.format(name, vmid) + str(e))
module.fail_json(vmid=vmid, msg='Unable to delete settings on VM {0} with vmid {1}: '.format(name, vmid) + str(e))
if revert is not None:
try:
settings(module, proxmox, vmid, node, name, revert=revert)
module.exit_json(changed=True, msg="Settings has reverted on VM {0} with vmid {1}".format(name, vmid))
module.exit_json(changed=True, vmid=vmid, msg="Settings has reverted on VM {0} with vmid {1}".format(name, vmid))
except Exception as e:
module.fail_json(msg='Unable to revert settings on VM {0} with vmid {1}: Maybe is not a pending task... '.format(name, vmid) + str(e))
module.fail_json(vmid=vmid, msg='Unable to revert settings on VM {0} with vmid {1}: Maybe is not a pending task... '.format(name, vmid) + str(e))
if state == 'present':
try:
if get_vm(proxmox, vmid) and not (update or clone):
module.exit_json(changed=False, msg="VM with vmid <%s> already exists" % vmid)
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, msg="VM with name <%s> already exists" % name)
module.exit_json(changed=False, vmid=vmid, 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):
@@ -1309,85 +1283,93 @@ def main():
scsi=module.params['scsi'],
virtio=module.params['virtio'])
if update:
module.exit_json(changed=True, msg="VM %s with vmid %s updated" % (name, vmid))
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, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid))
module.exit_json(changed=True, vmid=vmid, 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:
if update:
module.fail_json(msg="Unable to update vm {0} with vmid {1}=".format(name, vmid) + str(e))
module.fail_json(vmid=vmid, msg="Unable to update vm {0} with vmid {1}=".format(name, vmid) + str(e))
elif clone is not None:
module.fail_json(msg="Unable to clone vm {0} from vmid {1}=".format(name, vmid) + str(e))
module.fail_json(vmid=vmid, msg="Unable to clone vm {0} from vmid {1}=".format(name, vmid) + str(e))
else:
module.fail_json(msg="creation of qemu VM %s with vmid %s failed with exception=%s" % (name, vmid, e))
module.fail_json(vmid=vmid, msg="creation of qemu VM %s with vmid %s failed with exception=%s" % (name, vmid, e))
elif state == 'started':
status = {}
try:
if -1 == vmid:
module.fail_json(msg='VM with name = %s does not exist in cluster' % name)
vm = get_vm(proxmox, vmid)
if not vm:
module.fail_json(msg='VM with vmid <%s> does not exist in cluster' % vmid)
module.fail_json(vmid=vmid, msg='VM with vmid <%s> does not exist in cluster' % vmid)
status['status'] = vm[0]['status']
if vm[0]['status'] == 'running':
module.exit_json(changed=False, msg="VM %s is already running" % vmid)
module.exit_json(changed=False, vmid=vmid, msg="VM %s is already running" % vmid, **status)
if start_vm(module, proxmox, vm):
module.exit_json(changed=True, msg="VM %s started" % vmid)
module.exit_json(changed=True, vmid=vmid, msg="VM %s started" % vmid, **status)
except Exception as e:
module.fail_json(msg="starting of VM %s failed with exception: %s" % (vmid, e))
module.fail_json(vmid=vmid, msg="starting of VM %s failed with exception: %s" % (vmid, e), **status)
elif state == 'stopped':
status = {}
try:
if -1 == vmid:
module.fail_json(msg='VM with name = %s does not exist in cluster' % name)
vm = get_vm(proxmox, vmid)
if not vm:
module.fail_json(msg='VM with vmid = %s does not exist in cluster' % vmid)
module.fail_json(vmid=vmid, msg='VM with vmid = %s does not exist in cluster' % vmid)
status['status'] = vm[0]['status']
if vm[0]['status'] == 'stopped':
module.exit_json(changed=False, msg="VM %s is already stopped" % vmid)
module.exit_json(changed=False, vmid=vmid, msg="VM %s is already stopped" % vmid, **status)
if stop_vm(module, proxmox, vm, force=module.params['force']):
module.exit_json(changed=True, msg="VM %s is shutting down" % vmid)
module.exit_json(changed=True, vmid=vmid, msg="VM %s is shutting down" % vmid, **status)
except Exception as e:
module.fail_json(msg="stopping of VM %s failed with exception: %s" % (vmid, e))
module.fail_json(vmid=vmid, msg="stopping of VM %s failed with exception: %s" % (vmid, e), **status)
elif state == 'restarted':
status = {}
try:
if -1 == vmid:
module.fail_json(msg='VM with name = %s does not exist in cluster' % name)
vm = get_vm(proxmox, vmid)
if not vm:
module.fail_json(msg='VM with vmid = %s does not exist in cluster' % vmid)
module.fail_json(vmid=vmid, msg='VM with vmid = %s does not exist in cluster' % vmid)
status['status'] = vm[0]['status']
if vm[0]['status'] == 'stopped':
module.exit_json(changed=False, msg="VM %s is not running" % vmid)
module.exit_json(changed=False, vmid=vmid, msg="VM %s is not running" % vmid, **status)
if stop_vm(module, proxmox, vm, force=module.params['force']) and start_vm(module, proxmox, vm):
module.exit_json(changed=True, msg="VM %s is restarted" % vmid)
module.exit_json(changed=True, vmid=vmid, msg="VM %s is restarted" % vmid, **status)
except Exception as e:
module.fail_json(msg="restarting of VM %s failed with exception: %s" % (vmid, e))
module.fail_json(vmid=vmid, msg="restarting of VM %s failed with exception: %s" % (vmid, e), **status)
elif state == 'absent':
status = {}
try:
vm = get_vm(proxmox, vmid)
if not vm:
module.exit_json(changed=False)
module.exit_json(changed=False, vmid=vmid)
proxmox_node = proxmox.nodes(vm[0]['node'])
status['status'] = vm[0]['status']
if vm[0]['status'] == 'running':
if module.params['force']:
stop_vm(module, proxmox, vm, True)
else:
module.exit_json(changed=False, msg="VM %s is running. Stop it before deletion or use force=yes." % vmid)
module.exit_json(changed=False, vmid=vmid, msg="VM %s is running. Stop it before deletion or use force=yes." % vmid)
taskid = proxmox_node.qemu.delete(vmid)
if not wait_for_task(module, proxmox, vm[0]['node'], taskid):
module.fail_json(msg='Reached timeout while waiting for removing VM. Last line in task before timeout: %s' %
proxmox_node.tasks(taskid).log.get()[:1])
else:
module.exit_json(changed=True, msg="VM %s removed" % vmid)
module.exit_json(changed=True, vmid=vmid, msg="VM %s removed" % vmid)
except Exception as e:
module.fail_json(msg="deletion of VM %s failed with exception: %s" % (vmid, e))
@@ -1398,10 +1380,12 @@ def main():
vm = get_vm(proxmox, vmid)
if not vm:
module.fail_json(msg='VM with vmid = %s does not exist in cluster' % vmid)
if not name:
name = vm[0]['name']
current = proxmox.nodes(vm[0]['node']).qemu(vmid).status.current.get()['status']
status['status'] = current
if status:
module.exit_json(changed=False, msg="VM %s with vmid = %s is %s" % (name, vmid, current), **status)
module.exit_json(changed=False, vmid=vmid, msg="VM %s with vmid = %s is %s" % (name, vmid, current), **status)
if __name__ == '__main__':

View File

@@ -31,6 +31,7 @@ options:
- The password to authenticate with.
- You can use PROXMOX_PASSWORD environment variable.
type: str
required: yes
hostname:
description:
- The instance name.
@@ -106,7 +107,6 @@ EXAMPLES = r'''
RETURN = r'''#'''
import os
import time
import traceback
@@ -118,7 +118,7 @@ except ImportError:
PROXMOXER_IMP_ERR = traceback.format_exc()
HAS_PROXMOXER = False
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils.basic import AnsibleModule, missing_required_lib, env_fallback
from ansible.module_utils._text import to_native
@@ -182,7 +182,7 @@ def main():
argument_spec=dict(
api_host=dict(required=True),
api_user=dict(required=True),
api_password=dict(no_log=True),
api_password=dict(no_log=True, required=True, fallback=(env_fallback, ['PROXMOX_PASSWORD'])),
vmid=dict(required=False),
validate_certs=dict(type='bool', default='no'),
hostname=dict(),
@@ -213,13 +213,6 @@ def main():
force = module.params['force']
vmstate = module.params['vmstate']
# If password not set get it from PROXMOX_PASSWORD env
if not api_password:
try:
api_password = os.environ['PROXMOX_PASSWORD']
except KeyError as e:
module.fail_json(msg='You should set api_password param or use PROXMOX_PASSWORD environment variable' % to_native(e))
try:
proxmox = setup_api(api_host, api_user, api_password, validate_certs)

View File

@@ -0,0 +1,190 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: Tristan Le Guern (@Aversiste) <tleguern at bouledef.eu>
# 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 = '''
---
module: proxmox_storage_info
short_description: Retrieve information about one or more Proxmox VE storages
version_added: 2.2.0
description:
- Retrieve information about one or more Proxmox VE storages.
options:
storage:
description:
- Only return informations on a specific storage.
aliases: ['name']
type: str
type:
description:
- Filter on a specifc storage type.
type: str
author: Tristan Le Guern (@Aversiste)
extends_documentation_fragment: community.general.proxmox.documentation
notes:
- Storage specific options can be returned by this module, please look at the documentation at U(https://pve.proxmox.com/wiki/Storage).
'''
EXAMPLES = '''
- name: List existing storages
community.general.proxmox_storage_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
register: proxmox_storages
- name: List NFS storages only
community.general.proxmox_storage_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
type: nfs
register: proxmox_storages_nfs
- name: Retrieve information about the lvm2 storage
community.general.proxmox_storage_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
storage: lvm2
register: proxmox_storage_lvm
'''
RETURN = '''
proxmox_storages:
description: List of storage pools.
returned: on success
type: list
elements: dict
contains:
content:
description: Proxmox content types available in this storage
returned: on success
type: list
elements: str
digest:
description: Storage's digest
returned: on success
type: str
nodes:
description: List of nodes associated to this storage
returned: on success, if storage is not local
type: list
elements: str
path:
description: Physical path to this storage
returned: on success
type: str
prune-backups:
description: Backup retention options
returned: on success
type: list
elements: dict
shared:
description: Is this storage shared
returned: on success
type: bool
storage:
description: Storage name
returned: on success
type: str
type:
description: Storage type
returned: on success
type: str
'''
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible_collections.community.general.plugins.module_utils.proxmox import (
proxmox_auth_argument_spec, ProxmoxAnsible, HAS_PROXMOXER, PROXMOXER_IMP_ERR, proxmox_to_ansible_bool)
class ProxmoxStorageInfoAnsible(ProxmoxAnsible):
def get_storage(self, storage):
try:
storage = self.proxmox_api.storage.get(storage)
except Exception:
self.module.fail_json(msg="Storage '%s' does not exist" % storage)
return ProxmoxStorage(storage)
def get_storages(self, type=None):
storages = self.proxmox_api.storage.get(type=type)
storages = [ProxmoxStorage(storage) for storage in storages]
return storages
class ProxmoxStorage:
def __init__(self, storage):
self.storage = storage
# Convert proxmox representation of lists, dicts and boolean for easier
# manipulation within ansible.
if 'shared' in self.storage:
self.storage['shared'] = proxmox_to_ansible_bool(self.storage['shared'])
if 'content' in self.storage:
self.storage['content'] = self.storage['content'].split(',')
if 'nodes' in self.storage:
self.storage['nodes'] = self.storage['nodes'].split(',')
if 'prune-backups' in storage:
options = storage['prune-backups'].split(',')
self.storage['prune-backups'] = dict()
for option in options:
k, v = option.split('=')
self.storage['prune-backups'][k] = v
def proxmox_storage_info_argument_spec():
return dict(
storage=dict(type='str', aliases=['name']),
type=dict(type='str'),
)
def main():
module_args = proxmox_auth_argument_spec()
storage_info_args = proxmox_storage_info_argument_spec()
module_args.update(storage_info_args)
module = AnsibleModule(
argument_spec=module_args,
required_one_of=[('api_password', 'api_token_id')],
required_together=[('api_token_id', 'api_token_secret')],
mutually_exclusive=[('storage', 'type')],
supports_check_mode=True
)
result = dict(
changed=False
)
if not HAS_PROXMOXER:
module.fail_json(msg=missing_required_lib('proxmoxer'), exception=PROXMOXER_IMP_ERR)
proxmox = ProxmoxStorageInfoAnsible(module)
storage = module.params['storage']
storagetype = module.params['type']
if storage:
storages = [proxmox.get_storage(storage)]
else:
storages = proxmox.get_storages(type=storagetype)
result['proxmox_storages'] = [storage.storage for storage in storages]
module.exit_json(**result)
if __name__ == '__main__':
main()

View File

@@ -122,7 +122,7 @@ try:
except ImportError:
HAS_PROXMOXER = False
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.basic import AnsibleModule, env_fallback
def get_template(proxmox, node, storage, content_type, template):
@@ -175,7 +175,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
api_host=dict(required=True),
api_password=dict(no_log=True),
api_password=dict(no_log=True, fallback=(env_fallback, ['PROXMOX_PASSWORD'])),
api_token_id=dict(no_log=True),
api_token_secret=dict(no_log=True),
api_user=dict(required=True),
@@ -188,7 +188,10 @@ def main():
timeout=dict(type='int', default=30),
force=dict(type='bool', default=False),
state=dict(default='present', choices=['present', 'absent']),
)
),
required_together=[('api_token_id', 'api_token_secret')],
required_one_of=[('api_password', 'api_token_id')],
required_if=[('state', 'absent', ['template'])]
)
if not HAS_PROXMOXER:
@@ -207,12 +210,6 @@ def main():
auth_args = {'user': api_user}
if not (api_token_id and api_token_secret):
# If password not set get it from PROXMOX_PASSWORD env
if not api_password:
try:
api_password = os.environ['PROXMOX_PASSWORD']
except KeyError as e:
module.fail_json(msg='You should set api_password param or use PROXMOX_PASSWORD environment variable')
auth_args['password'] = api_password
else:
auth_args['token_name'] = api_token_id
@@ -261,9 +258,7 @@ def main():
content_type = module.params['content_type']
template = module.params['template']
if not template:
module.fail_json(msg='template param is mandatory')
elif not get_template(proxmox, node, storage, content_type, template):
if not get_template(proxmox, node, storage, content_type, template):
module.exit_json(changed=False, msg='template with volid=%s:%s/%s is already deleted' % (storage, content_type, template))
if delete_template(module, proxmox, node, storage, content_type, template, timeout):

View File

@@ -57,27 +57,32 @@ options:
Each rule must contain protocol parameter, in addition to three optional parameters
(port_from, port_to, and source)
type: list
elements: dict
add_server_ips:
description:
- A list of server identifiers (id or name) to be assigned to a firewall policy.
Used in combination with update state.
type: list
elements: str
required: false
remove_server_ips:
description:
- A list of server IP ids to be unassigned from a firewall policy. Used in combination with update state.
type: list
elements: str
required: false
add_rules:
description:
- A list of rules that will be added to an existing firewall policy.
It is syntax is the same as the one used for rules parameter. Used in combination with update state.
type: list
elements: dict
required: false
remove_rules:
description:
- A list of rule ids that will be removed from an existing firewall policy. Used in combination with update state.
type: list
elements: str
required: false
description:
description:
@@ -500,7 +505,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
auth_token=dict(
type='str',
type='str', no_log=True,
default=os.environ.get('ONEANDONE_AUTH_TOKEN')),
api_url=dict(
type='str',
@@ -508,11 +513,11 @@ def main():
name=dict(type='str'),
firewall_policy=dict(type='str'),
description=dict(type='str'),
rules=dict(type='list', default=[]),
add_server_ips=dict(type='list', default=[]),
remove_server_ips=dict(type='list', default=[]),
add_rules=dict(type='list', default=[]),
remove_rules=dict(type='list', default=[]),
rules=dict(type='list', elements="dict", default=[]),
add_server_ips=dict(type='list', elements="str", default=[]),
remove_server_ips=dict(type='list', elements="str", default=[]),
add_rules=dict(type='list', elements="dict", default=[]),
remove_rules=dict(type='list', elements="str", default=[]),
wait=dict(type='bool', default=True),
wait_timeout=dict(type='int', default=600),
wait_interval=dict(type='int', default=5),

View File

@@ -95,6 +95,7 @@ options:
- A list of rule objects that will be set for the load balancer. Each rule must contain protocol,
port_balancer, and port_server parameters, in addition to source parameter, which is optional.
type: list
elements: dict
description:
description:
- Description of the load balancer. maxLength=256
@@ -105,22 +106,26 @@ options:
- A list of server identifiers (id or name) to be assigned to a load balancer.
Used in combination with update state.
type: list
elements: str
required: false
remove_server_ips:
description:
- A list of server IP ids to be unassigned from a load balancer. Used in combination with update state.
type: list
elements: str
required: false
add_rules:
description:
- A list of rules that will be added to an existing load balancer.
It is syntax is the same as the one used for rules parameter. Used in combination with update state.
type: list
elements: dict
required: false
remove_rules:
description:
- A list of rule ids that will be removed from an existing load balancer. Used in combination with update state.
type: list
elements: str
required: false
wait:
description:
@@ -594,7 +599,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
auth_token=dict(
type='str',
type='str', no_log=True,
default=os.environ.get('ONEANDONE_AUTH_TOKEN')),
api_url=dict(
type='str',
@@ -613,11 +618,11 @@ def main():
choices=METHODS),
datacenter=dict(
choices=DATACENTERS),
rules=dict(type='list', default=[]),
add_server_ips=dict(type='list', default=[]),
remove_server_ips=dict(type='list', default=[]),
add_rules=dict(type='list', default=[]),
remove_rules=dict(type='list', default=[]),
rules=dict(type='list', elements="dict", default=[]),
add_server_ips=dict(type='list', elements="str", default=[]),
remove_server_ips=dict(type='list', elements="str", default=[]),
add_rules=dict(type='list', elements="dict", default=[]),
remove_rules=dict(type='list', elements="str", default=[]),
wait=dict(type='bool', default=True),
wait_timeout=dict(type='int', default=600),
wait_interval=dict(type='int', default=5),

View File

@@ -71,6 +71,7 @@ options:
warning alerts, critical is used to set critical alerts. alert enables alert,
and value is used to advise when the value is exceeded.
type: list
elements: dict
suboptions:
cpu:
description:
@@ -96,6 +97,7 @@ options:
description:
- Array of ports that will be monitoring.
type: list
elements: dict
suboptions:
protocol:
description:
@@ -119,6 +121,7 @@ options:
description:
- Array of processes that will be monitoring.
type: list
elements: dict
suboptions:
process:
description:
@@ -133,41 +136,49 @@ options:
description:
- Ports to add to the monitoring policy.
type: list
elements: dict
required: false
add_processes:
description:
- Processes to add to the monitoring policy.
type: list
elements: dict
required: false
add_servers:
description:
- Servers to add to the monitoring policy.
type: list
elements: str
required: false
remove_ports:
description:
- Ports to remove from the monitoring policy.
type: list
elements: str
required: false
remove_processes:
description:
- Processes to remove from the monitoring policy.
type: list
elements: str
required: false
remove_servers:
description:
- Servers to remove from the monitoring policy.
type: list
elements: str
required: false
update_ports:
description:
- Ports to be updated on the monitoring policy.
type: list
elements: dict
required: false
update_processes:
description:
- Processes to be updated on the monitoring policy.
type: list
elements: dict
required: false
wait:
description:
@@ -197,7 +208,7 @@ author:
EXAMPLES = '''
- name: Create a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
name: ansible monitoring policy
description: Testing creation of a monitoring policy with ansible
@@ -258,13 +269,13 @@ EXAMPLES = '''
wait: true
- name: Destroy a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
state: absent
name: ansible monitoring policy
- name: Update a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy
name: ansible monitoring policy updated
@@ -315,7 +326,7 @@ EXAMPLES = '''
state: update
- name: Add a port to a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
add_ports:
@@ -328,7 +339,7 @@ EXAMPLES = '''
state: update
- name: Update existing ports of a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
update_ports:
@@ -348,7 +359,7 @@ EXAMPLES = '''
state: update
- name: Remove a port from a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
remove_ports:
@@ -356,7 +367,7 @@ EXAMPLES = '''
state: update
- name: Add a process to a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
add_processes:
@@ -368,7 +379,7 @@ EXAMPLES = '''
state: update
- name: Update existing processes of a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
update_processes:
@@ -386,7 +397,7 @@ EXAMPLES = '''
state: update
- name: Remove a process from a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
remove_processes:
@@ -395,7 +406,7 @@ EXAMPLES = '''
state: update
- name: Add server to a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
add_servers:
@@ -404,7 +415,7 @@ EXAMPLES = '''
state: update
- name: Remove server from a monitoring policy
oneandone_moitoring_policy:
community.general.oneandone_monitoring_policy:
auth_token: oneandone_private_api_key
monitoring_policy: ansible monitoring policy updated
remove_servers:
@@ -695,15 +706,15 @@ def update_monitoring_policy(module, oneandone_conn):
threshold_entities = ['cpu', 'ram', 'disk', 'internal_ping', 'transfer']
_thresholds = []
for treshold in thresholds:
key = treshold.keys()[0]
for threshold in thresholds:
key = list(threshold.keys())[0]
if key in threshold_entities:
_threshold = oneandone.client.Threshold(
entity=key,
warning_value=treshold[key]['warning']['value'],
warning_alert=str(treshold[key]['warning']['alert']).lower(),
critical_value=treshold[key]['critical']['value'],
critical_alert=str(treshold[key]['critical']['alert']).lower())
warning_value=threshold[key]['warning']['value'],
warning_alert=str(threshold[key]['warning']['alert']).lower(),
critical_value=threshold[key]['critical']['value'],
critical_alert=str(threshold[key]['critical']['alert']).lower())
_thresholds.append(_threshold)
if name or description or email or thresholds:
@@ -864,15 +875,15 @@ def create_monitoring_policy(module, oneandone_conn):
threshold_entities = ['cpu', 'ram', 'disk', 'internal_ping', 'transfer']
_thresholds = []
for treshold in thresholds:
key = treshold.keys()[0]
for threshold in thresholds:
key = list(threshold.keys())[0]
if key in threshold_entities:
_threshold = oneandone.client.Threshold(
entity=key,
warning_value=treshold[key]['warning']['value'],
warning_alert=str(treshold[key]['warning']['alert']).lower(),
critical_value=treshold[key]['critical']['value'],
critical_alert=str(treshold[key]['critical']['alert']).lower())
warning_value=threshold[key]['warning']['value'],
warning_alert=str(threshold[key]['warning']['alert']).lower(),
critical_value=threshold[key]['critical']['value'],
critical_alert=str(threshold[key]['critical']['alert']).lower())
_thresholds.append(_threshold)
_ports = []
@@ -947,7 +958,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
auth_token=dict(
type='str',
type='str', no_log=True,
default=os.environ.get('ONEANDONE_AUTH_TOKEN')),
api_url=dict(
type='str',
@@ -957,17 +968,17 @@ def main():
agent=dict(type='str'),
email=dict(type='str'),
description=dict(type='str'),
thresholds=dict(type='list', default=[]),
ports=dict(type='list', default=[]),
processes=dict(type='list', default=[]),
add_ports=dict(type='list', default=[]),
update_ports=dict(type='list', default=[]),
remove_ports=dict(type='list', default=[]),
add_processes=dict(type='list', default=[]),
update_processes=dict(type='list', default=[]),
remove_processes=dict(type='list', default=[]),
add_servers=dict(type='list', default=[]),
remove_servers=dict(type='list', default=[]),
thresholds=dict(type='list', elements="dict", default=[]),
ports=dict(type='list', elements="dict", default=[]),
processes=dict(type='list', elements="dict", default=[]),
add_ports=dict(type='list', elements="dict", default=[]),
update_ports=dict(type='list', elements="dict", default=[]),
remove_ports=dict(type='list', elements="str", default=[]),
add_processes=dict(type='list', elements="dict", default=[]),
update_processes=dict(type='list', elements="dict", default=[]),
remove_processes=dict(type='list', elements="str", default=[]),
add_servers=dict(type='list', elements="str", default=[]),
remove_servers=dict(type='list', elements="str", default=[]),
wait=dict(type='bool', default=True),
wait_timeout=dict(type='int', default=600),
wait_interval=dict(type='int', default=5),

View File

@@ -71,10 +71,12 @@ options:
description:
- List of server identifiers (name or id) to be added to the private network.
type: list
elements: str
remove_members:
description:
- List of server identifiers (name or id) to be removed from the private network.
type: list
elements: str
wait:
description:
- wait for the instance to be in state 'running' before returning
@@ -384,7 +386,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
auth_token=dict(
type='str',
type='str', no_log=True,
default=os.environ.get('ONEANDONE_AUTH_TOKEN')),
api_url=dict(
type='str',
@@ -394,8 +396,8 @@ def main():
description=dict(type='str'),
network_address=dict(type='str'),
subnet_mask=dict(type='str'),
add_members=dict(type='list', default=[]),
remove_members=dict(type='list', default=[]),
add_members=dict(type='list', elements="str", default=[]),
remove_members=dict(type='list', elements="str", default=[]),
datacenter=dict(
choices=DATACENTERS),
wait=dict(type='bool', default=True),

View File

@@ -274,7 +274,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
auth_token=dict(
type='str',
type='str', no_log=True,
default=os.environ.get('ONEANDONE_AUTH_TOKEN')),
api_url=dict(
type='str',

View File

@@ -87,6 +87,7 @@ options:
- A list of hard disks with nested "size" and "is_main" properties.
It must be provided with vcore, cores_per_processor, and ram parameters.
type: list
elements: dict
private_network:
description:
- The private network name or ID.
@@ -627,7 +628,7 @@ def main():
vcore=dict(type='int'),
cores_per_processor=dict(type='int'),
ram=dict(type='float'),
hdds=dict(type='list'),
hdds=dict(type='list', elements='dict'),
count=dict(type='int', default=1),
ssh_key=dict(type='raw'),
auto_increment=dict(type='bool', default=True),

View File

@@ -66,6 +66,7 @@ options:
description:
- The labels for this host.
type: list
elements: str
template:
description:
- The template or attribute changes to merge into the host template.
@@ -130,7 +131,7 @@ class HostModule(OpenNebulaModule):
vmm_mad_name=dict(type='str', default="kvm"),
cluster_id=dict(type='int', default=0),
cluster_name=dict(type='str'),
labels=dict(type='list'),
labels=dict(type='list', elements='str'),
template=dict(type='dict', aliases=['attributes']),
)

View File

@@ -56,6 +56,7 @@ options:
- A list of images ids whose facts you want to gather.
aliases: ['id']
type: list
elements: str
name:
description:
- A C(name) of the image whose facts will be gathered.
@@ -253,7 +254,7 @@ def main():
"api_url": {"required": False, "type": "str"},
"api_username": {"required": False, "type": "str"},
"api_password": {"required": False, "type": "str", "no_log": True},
"ids": {"required": False, "aliases": ['id'], "type": "list"},
"ids": {"required": False, "aliases": ['id'], "type": "list", "elements": "str"},
"name": {"required": False, "type": "str"},
}
@@ -273,9 +274,6 @@ def main():
name = params.get('name')
client = pyone.OneServer(auth.url, session=auth.username + ':' + auth.password)
result = {'images': []}
images = []
if ids:
images = get_images_by_ids(module, client, ids)
elif name:
@@ -283,8 +281,9 @@ def main():
else:
images = get_all_images(client).IMAGE
for image in images:
result['images'].append(get_image_info(image))
result = {
'images': [get_image_info(image) for image in images],
}
module.exit_json(**result)

View File

@@ -72,6 +72,7 @@ options:
- A list of instance ids used for states':' C(absent), C(running), C(rebooted), C(poweredoff)
aliases: ['ids']
type: list
elements: int
state:
description:
- C(present) - create instances from a template specified with C(template_id)/C(template_name).
@@ -120,6 +121,7 @@ options:
- C(state) of instances with these labels.
default: []
type: list
elements: str
count_attributes:
description:
- A dictionary of key/value attributes that can only be used with
@@ -134,6 +136,7 @@ options:
- This can be expressed in multiple ways and is shown in the EXAMPLES
- section.
type: list
elements: str
count:
description:
- Number of instances to launch
@@ -168,6 +171,7 @@ options:
- NOTE':' If The Template hats Multiple Disks the Order of the Sizes is
- matched against the order specified in C(template_id)/C(template_name).
type: list
elements: str
cpu:
description:
- Percentage of CPU divided by 100 required for the new instance. Half a
@@ -182,6 +186,7 @@ options:
- A list of dictionaries with network parameters. See examples for more details.
default: []
type: list
elements: dict
disk_saveas:
description:
- Creates an image from a VM disk.
@@ -1349,7 +1354,7 @@ def main():
"api_url": {"required": False, "type": "str"},
"api_username": {"required": False, "type": "str"},
"api_password": {"required": False, "type": "str", "no_log": True},
"instance_ids": {"required": False, "aliases": ['ids'], "type": "list"},
"instance_ids": {"required": False, "aliases": ['ids'], "type": "list", "elements": "int"},
"template_name": {"required": False, "type": "str"},
"template_id": {"required": False, "type": "int"},
"vm_start_on_hold": {"default": False, "type": "bool"},
@@ -1367,16 +1372,16 @@ def main():
"memory": {"required": False, "type": "str"},
"cpu": {"required": False, "type": "float"},
"vcpu": {"required": False, "type": "int"},
"disk_size": {"required": False, "type": "list"},
"disk_size": {"required": False, "type": "list", "elements": "str"},
"datastore_name": {"required": False, "type": "str"},
"datastore_id": {"required": False, "type": "int"},
"networks": {"default": [], "type": "list"},
"networks": {"default": [], "type": "list", "elements": "dict"},
"count": {"default": 1, "type": "int"},
"exact_count": {"required": False, "type": "int"},
"attributes": {"default": {}, "type": "dict"},
"count_attributes": {"required": False, "type": "dict"},
"labels": {"default": [], "type": "list"},
"count_labels": {"required": False, "type": "list"},
"labels": {"default": [], "type": "list", "elements": "str"},
"count_labels": {"required": False, "type": "list", "elements": "str"},
"disk_saveas": {"type": "dict"},
"persistent": {"default": False, "type": "bool"}
}

View File

@@ -128,7 +128,7 @@ def update_vcn(virtual_network_client, module):
primitive_params_update=["vcn_id"],
kwargs_non_primitive_update={UpdateVcnDetails: "update_vcn_details"},
module=module,
update_attributes=UpdateVcnDetails().attribute_map.keys(),
update_attributes=list(UpdateVcnDetails().attribute_map.keys()),
)
return result

View File

@@ -137,17 +137,13 @@ def main():
host = search_by_name(hosts_service, module.params['host'])
if host is None:
raise Exception("Host '%s' was not found." % module.params['host'])
tags.extend([
tag for tag in hosts_service.host_service(host.id).tags_service().list()
])
tags.extend(hosts_service.host_service(host.id).tags_service().list())
if module.params['vm']:
vms_service = connection.system_service().vms_service()
vm = search_by_name(vms_service, module.params['vm'])
if vm is None:
raise Exception("Vm '%s' was not found." % module.params['vm'])
tags.extend([
tag for tag in vms_service.vm_service(vm.id).tags_service().list()
])
tags.extend(vms_service.vm_service(vm.id).tags_service().list())
if not (module.params['vm'] or module.params['host'] or module.params['name']):
tags = all_tags

View File

@@ -31,20 +31,25 @@ options:
auth_token:
description:
- Packet API token. You can also supply it in env var C(PACKET_API_TOKEN).
type: str
count:
description:
- The number of devices to create. Count number can be included in hostname via the %d string formatter.
default: 1
type: int
count_offset:
description:
- From which number to start the count.
default: 1
type: int
device_ids:
description:
- List of device IDs on which to operate.
type: list
elements: str
tags:
description:
@@ -57,10 +62,12 @@ options:
facility:
description:
- Facility slug for device creation. See Packet API for current list - U(https://www.packet.net/developers/api/facilities/).
type: str
features:
description:
- Dict with "features" for device creation. See Packet API docs for details.
type: dict
hostnames:
description:
@@ -68,6 +75,8 @@ options:
- If given string or one-item list, you can use the C("%d") Python string format to expand numbers from I(count).
- If only one hostname, it might be expanded to list if I(count)>1.
aliases: [name]
type: list
elements: str
locked:
description:
@@ -79,15 +88,18 @@ options:
operating_system:
description:
- OS slug for device creation. See Packet API for current list - U(https://www.packet.net/developers/api/operatingsystems/).
type: str
plan:
description:
- Plan slug for device creation. See Packet API for current list - U(https://www.packet.net/developers/api/plans/).
type: str
project_id:
description:
- ID of project of the device.
required: true
type: str
state:
description:
@@ -96,10 +108,12 @@ options:
- If set to C(active), the module call will block until all the specified devices are in state active due to the Packet API, or until I(wait_timeout).
choices: [present, absent, active, inactive, rebooted]
default: present
type: str
user_data:
description:
- Userdata blob made available to the machine
type: str
wait_for_public_IPv:
description:
@@ -107,16 +121,21 @@ options:
- If set to 4, it will wait until IPv4 is assigned to the instance.
- If set to 6, wait until public IPv6 is assigned to the instance.
choices: [4,6]
type: int
wait_timeout:
description:
- How long (seconds) to wait either for automatic IP address assignment, or for the device to reach the C(active) I(state).
- If I(wait_for_public_IPv) is set and I(state) is C(active), the module will wait for both events consequently, applying the timeout twice.
default: 900
type: int
ipxe_script_url:
description:
- URL of custom iPXE script for provisioning.
- More about custom iPXE for Packet devices at U(https://help.packet.net/technical/infrastructure/custom-ipxe).
type: str
always_pxe:
description:
- Persist PXE as the first boot option.
@@ -601,10 +620,10 @@ def main():
no_log=True),
count=dict(type='int', default=1),
count_offset=dict(type='int', default=1),
device_ids=dict(type='list'),
device_ids=dict(type='list', elements='str'),
facility=dict(),
features=dict(type='dict'),
hostnames=dict(type='list', aliases=['name']),
hostnames=dict(type='list', elements='str', aliases=['name']),
tags=dict(type='list', elements='str'),
locked=dict(type='bool', default=False, aliases=['lock']),
operating_system=dict(),

View File

@@ -17,27 +17,35 @@ author: "Tomas Karasek (@t0mk) <tom.to.the.k@gmail.com>"
options:
state:
description:
- Indicate desired state of the target.
- Indicate desired state of the target.
default: present
choices: ['present', 'absent']
type: str
auth_token:
description:
- Packet API token. You can also supply it in env var C(PACKET_API_TOKEN).
- Packet API token. You can also supply it in env var C(PACKET_API_TOKEN).
type: str
label:
description:
- Label for the key. If you keep it empty, it will be read from key string.
description:
- Label for the key. If you keep it empty, it will be read from key string.
type: str
aliases: [name]
id:
description:
- UUID of the key which you want to remove.
- UUID of the key which you want to remove.
type: str
fingerprint:
description:
- Fingerprint of the key which you want to remove.
- Fingerprint of the key which you want to remove.
type: str
key:
description:
- Public Key string ({type} {base64 encoded key} {description}).
- Public Key string ({type} {base64 encoded key} {description}).
type: str
key_file:
description:
- File with the public key.
- File with the public key.
type: path
requirements:
- "python >= 2.6"

View File

@@ -181,7 +181,6 @@ def do_detach(packet_conn, vol, dev_id=None):
return (dev_id is None) or (a['device']['id'] == dev_id)
for a in vol['attachments']:
if dev_match(a):
print(a['href'])
packet_conn.call_api(a['href'], type="DELETE")

View File

@@ -35,6 +35,7 @@ options:
description:
- Public SSH keys allowing access to the virtual machine.
type: list
elements: str
datacenter:
description:
- The datacenter to provision this virtual machine.
@@ -70,6 +71,7 @@ options:
description:
- list of instance ids, currently only used when state='absent' to remove instances.
type: list
elements: str
count:
description:
- The number of virtual machines to create.
@@ -581,12 +583,12 @@ def main():
volume_size=dict(type='int', default=10),
disk_type=dict(choices=['HDD', 'SSD'], default='HDD'),
image_password=dict(default=None, no_log=True),
ssh_keys=dict(type='list', default=[]),
ssh_keys=dict(type='list', elements='str', default=[]),
bus=dict(choices=['VIRTIO', 'IDE'], default='VIRTIO'),
lan=dict(type='int', default=1),
count=dict(type='int', default=1),
auto_increment=dict(type='bool', default=True),
instance_ids=dict(type='list', default=[]),
instance_ids=dict(type='list', elements='str', default=[]),
subscription_user=dict(),
subscription_password=dict(no_log=True),
location=dict(choices=LOCATIONS, default='us/las'),

View File

@@ -47,6 +47,7 @@ options:
description:
- Public SSH keys allowing access to the virtual machine.
type: list
elements: str
required: false
disk_type:
description:
@@ -77,6 +78,7 @@ options:
description:
- list of instance ids, currently only used when state='absent' to remove instances.
type: list
elements: str
required: false
subscription_user:
description:
@@ -106,6 +108,10 @@ options:
type: str
required: false
default: 'present'
server:
description:
- Server name to attach the volume to.
type: str
requirements: [ "profitbricks" ]
author: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>
@@ -369,13 +375,13 @@ def main():
size=dict(type='int', default=10),
bus=dict(choices=['VIRTIO', 'IDE'], default='VIRTIO'),
image=dict(),
image_password=dict(default=None, no_log=True),
ssh_keys=dict(type='list', default=[]),
image_password=dict(no_log=True),
ssh_keys=dict(type='list', elements='str', default=[]),
disk_type=dict(choices=['HDD', 'SSD'], default='HDD'),
licence_type=dict(default='UNKNOWN'),
count=dict(type='int', default=1),
auto_increment=dict(type='bool', default=True),
instance_ids=dict(type='list', default=[]),
instance_ids=dict(type='list', elements='str', default=[]),
subscription_user=dict(),
subscription_password=dict(no_log=True),
wait=dict(type='bool', default=True),

View File

@@ -111,6 +111,7 @@ options:
required: false
default: []
type: list
elements: dict
changes:
description:
- "List of fields which should be changed by block itself (doesn't
@@ -552,7 +553,7 @@ def main():
state=dict(default='present', type='str',
choices=['started', 'stopped', 'present', 'absent']),
name=dict(required=True, type='str'), description=dict(type='str'),
event_handlers=dict(default=list(), type='list'),
event_handlers=dict(default=list(), type='list', elements='dict'),
changes=dict(default=dict(), type='dict'),
cache=dict(default=dict(), type='dict'),
validate_certs=dict(default=True, type='bool'))

View File

@@ -238,7 +238,7 @@ def main():
loadbalancer=dict(required=True),
state=dict(default='present', choices=['present', 'absent']),
enabled=dict(type='bool', default=True),
private_key=dict(),
private_key=dict(no_log=True),
certificate=dict(),
intermediate_certificate=dict(),
secure_port=dict(type='int', default=443),

View File

@@ -70,6 +70,7 @@ options:
tags:
type: list
elements: str
description:
- List of tags to apply to the instance (5 max)
required: false
@@ -652,7 +653,7 @@ def main():
enable_ipv6=dict(default=False, type="bool"),
public_ip=dict(default="absent"),
state=dict(choices=list(state_strategy.keys()), default='present'),
tags=dict(type="list", default=[]),
tags=dict(type="list", elements="str", default=[]),
organization=dict(required=True),
wait=dict(type="bool", default=False),
wait_timeout=dict(type="int", default=300),

View File

@@ -63,6 +63,7 @@ options:
tags:
type: list
elements: str
description:
- List of tags to apply to the load-balancer
@@ -338,7 +339,7 @@ def main():
description=dict(required=True),
region=dict(required=True, choices=SCALEWAY_REGIONS),
state=dict(choices=list(state_strategy.keys()), default='present'),
tags=dict(type="list", default=[]),
tags=dict(type="list", elements="str", default=[]),
organization_id=dict(required=True),
wait=dict(type="bool", default=False),
wait_timeout=dict(type="int", default=300),

View File

@@ -78,6 +78,7 @@ options:
description:
- A list of disks to add, valid properties are documented in vmadm(1M).
type: list
elements: dict
dns_domain:
required: false
description:
@@ -93,6 +94,7 @@ options:
description:
- Mount additional filesystems into an OS VM.
type: list
elements: dict
firewall_enabled:
required: false
description:
@@ -198,6 +200,7 @@ options:
description:
- A list of nics to add, valid properties are documented in vmadm(1M).
type: list
elements: dict
nowait:
required: false
description:
@@ -230,6 +233,7 @@ options:
description:
- List of resolvers to be put into C(/etc/resolv.conf).
type: list
elements: dict
routes:
required: false
description:
@@ -670,7 +674,6 @@ def main():
'zfs_snapshot_limit'
],
'dict': ['customer_metadata', 'internal_metadata', 'routes'],
'list': ['disks', 'nics', 'resolvers', 'filesystems']
}
# Start with the options that are not as trivial as those above.
@@ -697,6 +700,10 @@ def main():
# Regular strings, however these require additional options.
spice_password=dict(type='str', no_log=True),
vnc_password=dict(type='str', no_log=True),
disks=dict(type='list', elements='dict'),
nics=dict(type='list', elements='dict'),
resolvers=dict(type='list', elements='dict'),
filesystems=dict(type='list', elements='dict'),
)
# Add our 'simple' options to options dict.

View File

@@ -115,6 +115,7 @@ options:
- List of disk sizes to be assigned to new virtual instance.
default: [ 25 ]
type: list
elements: int
os_code:
description:
- OS Code to be used for new virtual instance.
@@ -140,6 +141,7 @@ options:
description:
- List of ssh keys by their Id to be assigned to a virtual instance.
type: list
elements: str
post_uri:
description:
- URL of a post provisioning script to be loaded and executed on virtual instance.
@@ -396,13 +398,13 @@ def main():
cpus=dict(type='int', choices=CPU_SIZES),
memory=dict(type='int', choices=MEMORY_SIZES),
flavor=dict(type='str'),
disks=dict(type='list', default=[25]),
disks=dict(type='list', elements='int', default=[25]),
os_code=dict(type='str'),
image_id=dict(type='str'),
nic_speed=dict(type='int', choices=NIC_SPEEDS),
public_vlan=dict(type='str'),
private_vlan=dict(type='str'),
ssh_keys=dict(type='list', default=[]),
ssh_keys=dict(type='list', elements='str', default=[]),
post_uri=dict(type='str'),
state=dict(type='str', default='present', choices=STATES),
wait=dict(type='bool', default=True),

View File

@@ -1305,10 +1305,8 @@ def expand_tags(eg_launchspec, tags):
for tag in tags:
eg_tag = spotinst.aws_elastigroup.Tag()
if tag.keys():
eg_tag.tag_key = tag.keys()[0]
if tag.values():
eg_tag.tag_value = tag.values()[0]
if tag:
eg_tag.tag_key, eg_tag.tag_value = list(tag.items())[0]
eg_tags.append(eg_tag)
@@ -1459,7 +1457,7 @@ def main():
min_size=dict(type='int', required=True),
monitoring=dict(type='str'),
multai_load_balancers=dict(type='list'),
multai_token=dict(type='str'),
multai_token=dict(type='str', no_log=True),
name=dict(type='str', required=True),
network_interfaces=dict(type='list'),
on_demand_count=dict(type='int'),
@@ -1483,7 +1481,7 @@ def main():
target_group_arns=dict(type='list'),
tenancy=dict(type='str'),
terminate_at_end_of_billing_hour=dict(type='bool'),
token=dict(type='str'),
token=dict(type='str', no_log=True),
unit=dict(type='str'),
user_data=dict(type='str'),
utilize_reserved_instances=dict(type='bool'),

View File

@@ -35,17 +35,20 @@ options:
description:
- The name of the application
required: true
type: str
state:
description:
- Whether the application should exist
choices: ['present', 'absent']
default: "present"
type: str
type:
description:
- The type of application to create. See the Webfaction docs at U(https://docs.webfaction.com/xmlrpc-api/apps.html) for a list.
required: true
type: str
autostart:
description:
@@ -57,6 +60,7 @@ options:
description:
- Any extra parameters required by the app
default: ''
type: str
port_open:
description:
@@ -68,15 +72,18 @@ options:
description:
- The webfaction account to use
required: true
type: str
login_password:
description:
- The webfaction password to use
required: true
type: str
machine:
description:
- The machine name to use (optional for accounts with only one machine)
type: str
'''

View File

@@ -32,36 +32,43 @@ options:
description:
- The name of the database
required: true
type: str
state:
description:
- Whether the database should exist
choices: ['present', 'absent']
default: "present"
type: str
type:
description:
- The type of database to create.
required: true
choices: ['mysql', 'postgresql']
type: str
password:
description:
- The password for the new database user.
type: str
login_name:
description:
- The webfaction account to use
required: true
type: str
login_password:
description:
- The webfaction password to use
required: true
type: str
machine:
description:
- The machine name to use (optional for accounts with only one machine)
type: str
'''
EXAMPLES = '''

View File

@@ -32,27 +32,33 @@ options:
description:
- The name of the domain
required: true
type: str
state:
description:
- Whether the domain should exist
choices: ['present', 'absent']
default: "present"
type: str
subdomains:
description:
- Any subdomains to create.
default: []
type: list
elements: str
login_name:
description:
- The webfaction account to use
required: true
type: str
login_password:
description:
- The webfaction password to use
required: true
type: str
'''
EXAMPLES = '''
@@ -87,8 +93,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
name=dict(required=True),
state=dict(required=False, choices=['present', 'absent'], default='present'),
subdomains=dict(required=False, default=[], type='list'),
state=dict(choices=['present', 'absent'], default='present'),
subdomains=dict(default=[], type='list', elements='str'),
login_name=dict(required=True),
login_password=dict(required=True, no_log=True),
),

View File

@@ -29,27 +29,32 @@ options:
description:
- The name of the mailbox
required: true
type: str
mailbox_password:
description:
- The password for the mailbox
required: true
type: str
state:
description:
- Whether the mailbox should exist
choices: ['present', 'absent']
default: "present"
type: str
login_name:
description:
- The webfaction account to use
required: true
type: str
login_password:
description:
- The webfaction password to use
required: true
type: str
'''
EXAMPLES = '''

View File

@@ -33,17 +33,20 @@ options:
description:
- The name of the website
required: true
type: str
state:
description:
- Whether the website should exist
choices: ['present', 'absent']
default: "present"
type: str
host:
description:
- The webfaction host on which the site should be created.
required: true
type: str
https:
description:
@@ -55,21 +58,27 @@ options:
description:
- A mapping of URLs to apps
default: []
type: list
elements: list
subdomains:
description:
- A list of subdomains associated with this site.
default: []
type: list
elements: str
login_name:
description:
- The webfaction account to use
required: true
type: str
login_password:
description:
- The webfaction password to use
required: true
type: str
'''
EXAMPLES = '''
@@ -101,12 +110,12 @@ def main():
module = AnsibleModule(
argument_spec=dict(
name=dict(required=True),
state=dict(required=False, choices=['present', 'absent'], default='present'),
state=dict(choices=['present', 'absent'], default='present'),
# You can specify an IP address or hostname.
host=dict(required=True),
https=dict(required=False, type='bool', default=False),
subdomains=dict(required=False, type='list', default=[]),
site_apps=dict(required=False, type='list', default=[]),
subdomains=dict(type='list', elements='str', default=[]),
site_apps=dict(type='list', elements='list', default=[]),
login_name=dict(required=True),
login_password=dict(required=True, no_log=True),
),

View File

@@ -33,6 +33,7 @@ requirements:
author: "Steve Gargan (@sgargan)"
options:
state:
type: str
description:
- register or deregister the consul service, defaults to present
default: present
@@ -86,6 +87,7 @@ options:
documentation for further details.
tags:
type: list
elements: str
description:
- tags that will be attached to the service registration.
script:
@@ -345,7 +347,7 @@ def remove_service(module, service_id):
module.exit_json(changed=False, id=service_id)
def get_consul_api(module, token=None):
def get_consul_api(module):
consulClient = consul.Consul(host=module.params.get('host'),
port=module.params.get('port'),
scheme=module.params.get('scheme'),
@@ -398,7 +400,7 @@ def parse_service(module):
module.fail_json(msg="service_name is required to configure a service.")
class ConsulService():
class ConsulService(object):
def __init__(self, service_id=None, name=None, address=None, port=-1,
tags=None, loaded=None):
@@ -564,26 +566,26 @@ def main():
argument_spec=dict(
host=dict(default='localhost'),
port=dict(default=8500, type='int'),
scheme=dict(required=False, default='http'),
validate_certs=dict(required=False, default=True, type='bool'),
check_id=dict(required=False),
check_name=dict(required=False),
check_node=dict(required=False),
check_host=dict(required=False),
notes=dict(required=False),
script=dict(required=False),
service_id=dict(required=False),
service_name=dict(required=False),
service_address=dict(required=False, type='str', default=None),
service_port=dict(required=False, type='int', default=None),
scheme=dict(default='http'),
validate_certs=dict(default=True, type='bool'),
check_id=dict(),
check_name=dict(),
check_node=dict(),
check_host=dict(),
notes=dict(),
script=dict(),
service_id=dict(),
service_name=dict(),
service_address=dict(type='str'),
service_port=dict(type='int'),
state=dict(default='present', choices=['present', 'absent']),
interval=dict(required=False, type='str'),
ttl=dict(required=False, type='str'),
tcp=dict(required=False, type='str'),
http=dict(required=False, type='str'),
timeout=dict(required=False, type='str'),
tags=dict(required=False, type='list'),
token=dict(required=False, no_log=True)
interval=dict(type='str'),
ttl=dict(type='str'),
tcp=dict(type='str'),
http=dict(type='str'),
timeout=dict(type='str'),
tags=dict(type='list', elements='str'),
token=dict(no_log=True)
),
supports_check_mode=False,
)

View File

@@ -22,29 +22,35 @@ options:
description:
- a management token is required to manipulate the acl lists
required: true
type: str
state:
description:
- whether the ACL pair should be present or absent
required: false
choices: ['present', 'absent']
default: present
type: str
token_type:
description:
- the type of token that should be created
choices: ['client', 'management']
default: client
type: str
name:
description:
- the name that should be associated with the acl key, this is opaque
to Consul
required: false
type: str
token:
description:
- the token key identifying an ACL rule set. If generated by consul
this will be a UUID
required: false
type: str
rules:
type: list
elements: dict
description:
- rules that should be associated with a given token
required: false
@@ -53,6 +59,7 @@ options:
- host of the consul agent defaults to localhost
required: false
default: localhost
type: str
port:
type: int
description:
@@ -64,6 +71,7 @@ options:
- the protocol scheme on which the consul agent is running
required: false
default: http
type: str
validate_certs:
type: bool
description:
@@ -215,14 +223,14 @@ _POLICY_HCL_PROPERTY = "policy"
_ARGUMENT_SPEC = {
MANAGEMENT_PARAMETER_NAME: dict(required=True, no_log=True),
HOST_PARAMETER_NAME: dict(default='localhost'),
SCHEME_PARAMETER_NAME: dict(required=False, default='http'),
VALIDATE_CERTS_PARAMETER_NAME: dict(required=False, type='bool', default=True),
NAME_PARAMETER_NAME: dict(required=False),
SCHEME_PARAMETER_NAME: dict(default='http'),
VALIDATE_CERTS_PARAMETER_NAME: dict(type='bool', default=True),
NAME_PARAMETER_NAME: dict(),
PORT_PARAMETER_NAME: dict(default=8500, type='int'),
RULES_PARAMETER_NAME: dict(default=None, required=False, type='list'),
RULES_PARAMETER_NAME: dict(type='list', elements='dict'),
STATE_PARAMETER_NAME: dict(default=PRESENT_STATE_VALUE, choices=[PRESENT_STATE_VALUE, ABSENT_STATE_VALUE]),
TOKEN_PARAMETER_NAME: dict(required=False),
TOKEN_TYPE_PARAMETER_NAME: dict(required=False, choices=[CLIENT_TOKEN_TYPE_VALUE, MANAGEMENT_TOKEN_TYPE_VALUE],
TOKEN_PARAMETER_NAME: dict(),
TOKEN_TYPE_PARAMETER_NAME: dict(choices=[CLIENT_TOKEN_TYPE_VALUE, MANAGEMENT_TOKEN_TYPE_VALUE],
default=CLIENT_TOKEN_TYPE_VALUE)
}

View File

@@ -37,6 +37,7 @@ options:
'release' respectively. a valid session must be supplied to make the
attempt changed will be true if the attempt is successful, false
otherwise.
type: str
choices: [ absent, acquire, present, release ]
default: present
key:

View File

@@ -67,6 +67,7 @@ options:
associated with the session will be release and can be acquired once
the associated lock delay has expired.
type: list
elements: str
host:
description:
- The host of the consul agent defaults to localhost.
@@ -237,7 +238,7 @@ def test_dependencies(module):
def main():
argument_spec = dict(
checks=dict(type='list'),
checks=dict(type='list', elements='str'),
delay=dict(type='int', default='15'),
behavior=dict(type='str', default='release', choices=['release', 'delete']),
host=dict(type='str', default='localhost'),

View File

@@ -18,47 +18,58 @@ description:
- Needs python etcd3 lib to work
options:
key:
type: str
description:
- the key where the information is stored in the cluster
required: true
value:
type: str
description:
- the information stored
required: true
host:
type: str
description:
- the IP address of the cluster
default: 'localhost'
port:
type: int
description:
- the port number used to connect to the cluster
default: 2379
state:
type: str
description:
- the state of the value for the key.
- can be present or absent
required: true
choices: [ present, absent ]
user:
type: str
description:
- The etcd user to authenticate with.
password:
type: str
description:
- The password to use for authentication.
- Required if I(user) is defined.
ca_cert:
type: path
description:
- The Certificate Authority to use to verify the etcd host.
- Required if I(client_cert) and I(client_key) are defined.
client_cert:
type: path
description:
- PEM formatted certificate chain file to be used for SSL client authentication.
- Required if I(client_key) is defined.
client_key:
type: path
description:
- PEM formatted file that contains your private key to be used for SSL client authentication.
- Required if I(client_cert) is defined.
timeout:
type: int
description:
- The socket level timeout in seconds.
author:

View File

@@ -312,12 +312,11 @@ def run():
)
changed = False
nomad_jobs = list()
result = list()
try:
job_list = nomad_client.jobs.get_jobs()
for job in job_list:
nomad_jobs.append(nomad_client.job.get_job(job.get('ID')))
result = nomad_jobs
result.append(nomad_client.job.get_job(job.get('ID')))
except Exception as e:
module.fail_json(msg=to_native(e))

View File

@@ -17,25 +17,31 @@ options:
description:
- A list of ZooKeeper servers (format '[server]:[port]').
required: true
type: str
name:
description:
- The path of the znode.
required: true
type: str
value:
description:
- The value assigned to the znode.
type: str
op:
description:
- An operation to perform. Mutually exclusive with state.
choices: [ get, wait, list ]
type: str
state:
description:
- The state to enforce. Mutually exclusive with op.
choices: [ present, absent ]
type: str
timeout:
description:
- The amount of time to wait for a node to appear.
default: 300
type: int
recursive:
description:
- Recursively delete node and all its children.
@@ -110,11 +116,11 @@ def main():
argument_spec=dict(
hosts=dict(required=True, type='str'),
name=dict(required=True, type='str'),
value=dict(required=False, default=None, type='str'),
op=dict(required=False, default=None, choices=['get', 'wait', 'list']),
value=dict(type='str'),
op=dict(choices=['get', 'wait', 'list']),
state=dict(choices=['present', 'absent']),
timeout=dict(required=False, default=300, type='int'),
recursive=dict(required=False, default=False, type='bool')
timeout=dict(default=300, type='int'),
recursive=dict(default=False, type='bool')
),
supports_check_mode=False
)

View File

@@ -115,7 +115,6 @@ EXAMPLES = '''
local_only: False
# example playbook:
---
- name: Upgrade aerospike
hosts: all
become: true
@@ -338,7 +337,7 @@ class Migrations:
namespace_tx = \
int(namespace_stats[self.module.params['migrate_tx_key']])
namespace_rx = \
int(namespace_stats[self.module.params['migrate_tx_key']])
int(namespace_stats[self.module.params['migrate_rx_key']])
except KeyError:
self.module.fail_json(
msg="Did not find partition remaining key:" +

View File

@@ -22,11 +22,13 @@ options:
description:
- Name of the plugin to install.
required: True
type: str
state:
description:
- Desired state of a plugin.
choices: ["present", "absent"]
default: present
type: str
src:
description:
- Optionally set the source location to retrieve the plugin from. This can be a file://
@@ -38,16 +40,19 @@ options:
effect.
- For ES 1.x use url.
required: False
type: str
url:
description:
- Set exact URL to download the plugin from (Only works for ES 1.x).
- For ES 2.x and higher, use src.
required: False
type: str
timeout:
description:
- "Timeout setting: 30s, 1m, 1h..."
- Only valid for Elasticsearch < 5.0. This option is ignored for Elasticsearch > 5.0.
default: 1m
type: str
force:
description:
- "Force batch mode when installing plugins. This is only necessary if a plugin requires additional permissions and console detection fails."
@@ -57,20 +62,25 @@ options:
description:
- Location of the plugin binary. If this file is not found, the default plugin binaries will be used.
- The default changed in Ansible 2.4 to None.
type: path
plugin_dir:
description:
- Your configured plugin directory specified in Elasticsearch
default: /usr/share/elasticsearch/plugins/
type: path
proxy_host:
description:
- Proxy host to use during plugin installation
type: str
proxy_port:
description:
- Proxy port to use during plugin installation
type: str
version:
description:
- Version of the plugin to be installed.
If plugin exists with previous version, it will NOT be updated
type: str
'''
EXAMPLES = '''
@@ -241,7 +251,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
name=dict(required=True),
state=dict(default="present", choices=PACKAGE_STATE_MAP.keys()),
state=dict(default="present", choices=list(PACKAGE_STATE_MAP.keys())),
src=dict(default=None),
url=dict(default=None),
timeout=dict(default="1m"),

View File

@@ -22,31 +22,38 @@ options:
description:
- Name of the plugin to install.
required: True
type: str
state:
description:
- Desired state of a plugin.
choices: ["present", "absent"]
default: present
type: str
url:
description:
- Set exact URL to download the plugin from.
- For local file, prefix its absolute path with file://
type: str
timeout:
description:
- "Timeout setting: 30s, 1m, 1h etc."
default: 1m
type: str
plugin_bin:
description:
- Location of the Kibana binary.
default: /opt/kibana/bin/kibana
type: path
plugin_dir:
description:
- Your configured plugin directory specified in Kibana.
default: /opt/kibana/installedPlugins/
type: path
version:
description:
- Version of the plugin to be installed.
- If plugin exists with previous version, plugin will NOT be updated unless C(force) is set to yes.
type: str
force:
description:
- Delete and re-install the plugin. Can be useful for plugins update.
@@ -209,7 +216,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
name=dict(required=True),
state=dict(default="present", choices=PACKAGE_STATE_MAP.keys()),
state=dict(default="present", choices=list(PACKAGE_STATE_MAP.keys())),
url=dict(default=None),
timeout=dict(default="1m"),
plugin_bin=dict(default="/opt/kibana/bin/kibana", type="path"),

View File

@@ -23,28 +23,37 @@ options:
description:
- The command you would like to perform against the cluster.
choices: ['ping', 'kv_test', 'join', 'plan', 'commit']
type: str
config_dir:
description:
- The path to the riak configuration directory
default: /etc/riak
type: path
http_conn:
description:
- The ip address and port that is listening for Riak HTTP queries
default: 127.0.0.1:8098
type: str
target_node:
description:
- The target node for certain operations (join, ping)
default: riak@127.0.0.1
type: str
wait_for_handoffs:
description:
- Number of seconds to wait for handoffs to complete.
type: int
default: 0
wait_for_ring:
description:
- Number of seconds to wait for all nodes to agree on the ring.
type: int
default: 0
wait_for_service:
description:
- Waits for a riak service to come online before continuing.
choices: ['kv']
type: str
validate_certs:
description:
- If C(no), SSL certificates will not be validated. This should only be used
@@ -93,8 +102,8 @@ def main():
config_dir=dict(default='/etc/riak', type='path'),
http_conn=dict(required=False, default='127.0.0.1:8098'),
target_node=dict(default='riak@127.0.0.1', required=False),
wait_for_handoffs=dict(default=False, type='int'),
wait_for_ring=dict(default=False, type='int'),
wait_for_handoffs=dict(default=0, type='int'),
wait_for_ring=dict(default=0, type='int'),
wait_for_service=dict(
required=False, default=None, choices=['kv']),
validate_certs=dict(default=True, type='bool'))

View File

@@ -14,11 +14,11 @@ short_description: Updates Vertica configuration parameters.
description:
- Updates Vertica configuration parameters.
options:
name:
parameter:
description:
- Name of the parameter to update.
required: true
aliases: [parameter]
aliases: [name]
type: str
value:
description:

View File

@@ -21,25 +21,30 @@ options:
description:
- Name of the cluster running the schema.
default: localhost
type: str
port:
description:
Database port to connect to.
default: 5433
type: str
db:
description:
- Name of the database running the schema.
type: str
login_user:
description:
- The username used to authenticate with.
default: dbadmin
type: str
login_password:
description:
- The password used to authenticate with.
type: str
notes:
- The default authentication assumes that you are either logging in as or sudo'ing
to the C(dbadmin) account on the host.
- This module uses C(pyodbc), a Python ODBC database adapter. You must ensure
that C(unixODBC) and C(pyodbc) is installed on the host and properly configured.
that C(unixODBC) and C(pyodbc) are installed on the host and properly configured.
- Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so)
to be added to the C(Vertica) section of either C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini)
and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16)

View File

@@ -15,37 +15,46 @@ short_description: Adds or removes Vertica database roles and assigns roles to t
description:
- Adds or removes Vertica database role and, optionally, assign other roles.
options:
name:
role:
description:
- Name of the role to add or remove.
required: true
type: str
aliases: ['name']
assigned_roles:
description:
- Comma separated list of roles to assign to the role.
aliases: ['assigned_role']
type: str
state:
description:
- Whether to create C(present), drop C(absent) or lock C(locked) a role.
choices: ['present', 'absent']
default: present
type: str
db:
description:
- Name of the Vertica database.
type: str
cluster:
description:
- Name of the Vertica cluster.
default: localhost
type: str
port:
description:
- Vertica cluster port to connect to.
default: 5433
type: str
login_user:
description:
- The username used to authenticate with.
default: dbadmin
type: str
login_password:
description:
- The password used to authenticate with.
type: str
notes:
- The default authentication assumes that you are either logging in as or sudo'ing
to the C(dbadmin) account on the host.
@@ -168,11 +177,11 @@ def main():
role=dict(required=True, aliases=['name']),
assigned_roles=dict(default=None, aliases=['assigned_role']),
state=dict(default='present', choices=['absent', 'present']),
db=dict(default=None),
db=dict(),
cluster=dict(default='localhost'),
port=dict(default='5433'),
login_user=dict(default='dbadmin'),
login_password=dict(default=None, no_log=True),
login_password=dict(no_log=True),
), supports_check_mode=True)
if not pyodbc_found:

View File

@@ -20,44 +20,55 @@ description:
will fail and only remove roles created for the schema if they have
no dependencies.
options:
name:
schema:
description:
- Name of the schema to add or remove.
required: true
aliases: ['name']
type: str
usage_roles:
description:
- Comma separated list of roles to create and grant usage access to the schema.
aliases: ['usage_role']
type: str
create_roles:
description:
- Comma separated list of roles to create and grant usage and create access to the schema.
aliases: ['create_role']
type: str
owner:
description:
- Name of the user to set as owner of the schema.
type: str
state:
description:
- Whether to create C(present), or drop C(absent) a schema.
default: present
choices: ['present', 'absent']
type: str
db:
description:
- Name of the Vertica database.
type: str
cluster:
description:
- Name of the Vertica cluster.
default: localhost
type: str
port:
description:
- Vertica cluster port to connect to.
default: 5433
type: str
login_user:
description:
- The username used to authenticate with.
default: dbadmin
type: str
login_password:
description:
- The password used to authenticate with.
type: str
notes:
- The default authentication assumes that you are either logging in as or sudo'ing
to the C(dbadmin) account on the host.
@@ -230,15 +241,15 @@ def main():
module = AnsibleModule(
argument_spec=dict(
schema=dict(required=True, aliases=['name']),
usage_roles=dict(default=None, aliases=['usage_role']),
create_roles=dict(default=None, aliases=['create_role']),
owner=dict(default=None),
usage_roles=dict(aliases=['usage_role']),
create_roles=dict(aliases=['create_role']),
owner=dict(),
state=dict(default='present', choices=['absent', 'present']),
db=dict(default=None),
db=dict(),
cluster=dict(default='localhost'),
port=dict(default='5433'),
login_user=dict(default='dbadmin'),
login_password=dict(default=None, no_log=True),
login_password=dict(no_log=True),
), supports_check_mode=True)
if not pyodbc_found:

View File

@@ -17,22 +17,27 @@ description:
- In such a situation, if the module tries to remove the user it
will fail and only remove roles granted to the user.
options:
name:
user:
description:
- Name of the user to add or remove.
required: true
type: str
aliases: ['name']
profile:
description:
- Sets the user's profile.
type: str
resource_pool:
description:
- Sets the user's resource pool.
type: str
password:
description:
- The user's password encrypted by the MD5 algorithm.
- The password must be generated with the format C("md5" + md5[password + username]),
resulting in a total of 35 characters. An easy way to do this is by querying
the Vertica database with select 'md5'||md5('<user_password><user_name>').
type: str
expired:
description:
- Sets the user's password expiration.
@@ -46,29 +51,36 @@ options:
description:
- Comma separated list of roles to assign to the user.
aliases: ['role']
type: str
state:
description:
- Whether to create C(present), drop C(absent) or lock C(locked) a user.
choices: ['present', 'absent', 'locked']
default: present
type: str
db:
description:
- Name of the Vertica database.
type: str
cluster:
description:
- Name of the Vertica cluster.
default: localhost
type: str
port:
description:
- Vertica cluster port to connect to.
default: 5433
type: str
login_user:
description:
- The username used to authenticate with.
default: dbadmin
type: str
login_password:
description:
- The password used to authenticate with.
type: str
notes:
- The default authentication assumes that you are either logging in as or sudo'ing
to the C(dbadmin) account on the host.
@@ -282,18 +294,18 @@ def main():
module = AnsibleModule(
argument_spec=dict(
user=dict(required=True, aliases=['name']),
profile=dict(default=None),
resource_pool=dict(default=None),
password=dict(default=None, no_log=True),
expired=dict(type='bool', default=None),
ldap=dict(type='bool', default=None),
roles=dict(default=None, aliases=['role']),
profile=dict(),
resource_pool=dict(),
password=dict(no_log=True),
expired=dict(type='bool'),
ldap=dict(type='bool'),
roles=dict(aliases=['role']),
state=dict(default='present', choices=['absent', 'present', 'locked']),
db=dict(default=None),
db=dict(),
cluster=dict(default='localhost'),
port=dict(default='5433'),
login_user=dict(default='dbadmin'),
login_password=dict(default=None, no_log=True),
login_password=dict(no_log=True),
), supports_check_mode=True)
if not pyodbc_found:

View File

@@ -114,9 +114,7 @@ from ansible.module_utils.basic import AnsibleModule
def match_opt(option, line):
option = re.escape(option)
return re.match('( |\t)*%s( |\t)*(=|$)' % option, line) \
or re.match('#( |\t)*%s( |\t)*(=|$)' % option, line) \
or re.match(';( |\t)*%s( |\t)*(=|$)' % option, line)
return re.match('[#;]?( |\t)*%s( |\t)*(=|$)' % option, line)
def match_active_opt(option, line):
@@ -251,9 +249,9 @@ def do_ini(module, filename, section=None, option=None, value=None,
if not within_section and state == 'present':
ini_lines.append('[%s]\n' % section)
msg = 'section and option added'
if option and value:
if option and value is not None:
ini_lines.append(assignment_format % (option, value))
elif option and not value and allow_no_value:
elif option and value is None and allow_no_value:
ini_lines.append('%s\n' % option)
else:
msg = 'only section added'
@@ -312,7 +310,7 @@ def main():
allow_no_value = module.params['allow_no_value']
create = module.params['create']
if state == 'present' and not allow_no_value and not value:
if state == 'present' and not allow_no_value and value is None:
module.fail_json("Parameter 'value' must not be empty if state=present and allow_no_value=False")
(changed, backup_file, diff, msg) = do_ini(module, path, section, option, value, state, backup, no_extra_spaces, create, allow_no_value)

View File

@@ -59,8 +59,8 @@ options:
executable:
description:
- The path to the C(7z) executable to use for extracting files from the ISO.
- If not provided, it will assume the value C(7z).
type: path
default: '7z'
notes:
- Only the file checksum (content) is taken into account when extracting files
from the ISO image. If C(force=no), only checks the presence of the file.
@@ -101,7 +101,8 @@ def main():
image=dict(type='path', required=True, aliases=['path', 'src']),
dest=dict(type='path', required=True),
files=dict(type='list', elements='str', required=True),
force=dict(type='bool', default=True, aliases=['thirsty']),
force=dict(type='bool', default=True, aliases=['thirsty'],
deprecated_aliases=[dict(name='thirsty', version='3.0.0', collection_name='community.general')]),
executable=dict(type='path'), # No default on purpose
),
supports_check_mode=True,
@@ -112,10 +113,6 @@ def main():
force = module.params['force']
executable = module.params['executable']
if module.params.get('thirsty'):
module.deprecate('The alias "thirsty" has been deprecated and will be removed, use "force" instead',
version='3.0.0', collection_name='community.general') # was Ansible 2.13
result = dict(
changed=False,
dest=dest,

View File

@@ -66,6 +66,7 @@ options:
or a hash where the key is an element name and the value is the element value.
- This parameter requires C(xpath) to be set.
type: list
elements: raw
set_children:
description:
- Set the child-element(s) of a selected element for a given C(xpath).
@@ -73,6 +74,7 @@ options:
- Child elements must be specified as in C(add_children).
- This parameter requires C(xpath) to be set.
type: list
elements: raw
count:
description:
- Search for a given C(xpath) and provide the count of any matches.
@@ -809,8 +811,8 @@ def main():
state=dict(type='str', default='present', choices=['absent', 'present'], aliases=['ensure']),
value=dict(type='raw'),
attribute=dict(type='raw'),
add_children=dict(type='list'),
set_children=dict(type='list'),
add_children=dict(type='list', elements='raw'),
set_children=dict(type='list', elements='raw'),
count=dict(type='bool', default=False),
print_match=dict(type='bool', default=False),
pretty_print=dict(type='bool', default=False),

View File

@@ -0,0 +1 @@
./source_control/github/github_repo.py

View File

@@ -0,0 +1 @@
source_control/gitlab/gitlab_project_members.py

View File

@@ -137,6 +137,7 @@ options:
aliases:
- defaultRoles
type: list
elements: str
redirect_uris:
description:
@@ -145,6 +146,7 @@ options:
aliases:
- redirectUris
type: list
elements: str
web_origins:
description:
@@ -153,6 +155,7 @@ options:
aliases:
- webOrigins
type: list
elements: str
not_before:
description:
@@ -707,10 +710,10 @@ def main():
enabled=dict(type='bool'),
client_authenticator_type=dict(type='str', choices=['client-secret', 'client-jwt'], aliases=['clientAuthenticatorType']),
secret=dict(type='str', no_log=True),
registration_access_token=dict(type='str', aliases=['registrationAccessToken']),
default_roles=dict(type='list', aliases=['defaultRoles']),
redirect_uris=dict(type='list', aliases=['redirectUris']),
web_origins=dict(type='list', aliases=['webOrigins']),
registration_access_token=dict(type='str', aliases=['registrationAccessToken'], no_log=True),
default_roles=dict(type='list', elements='str', aliases=['defaultRoles']),
redirect_uris=dict(type='list', elements='str', aliases=['redirectUris']),
web_origins=dict(type='list', elements='str', aliases=['webOrigins']),
not_before=dict(type='int', aliases=['notBefore']),
bearer_only=dict(type='bool', aliases=['bearerOnly']),
consent_required=dict(type='bool', aliases=['consentRequired']),

View File

@@ -34,6 +34,7 @@ description:
options:
search_terms:
type: list
elements: dict
description:
- A list of one or more search terms.
- Each search term can either be a simple string or it can be a dictionary for more control.
@@ -372,7 +373,7 @@ def main():
master_password=dict(required=True, type='str', no_log=True),
secret_key=dict(type='str', no_log=True),
), default=None),
search_terms=dict(required=True, type='list')
search_terms=dict(required=True, type='list', elements='dict'),
),
supports_check_mode=True
)

View File

@@ -22,46 +22,56 @@ options:
- The path to the bin directory of OpenDJ.
required: false
default: /opt/opendj/bin
type: path
hostname:
description:
- The hostname of the OpenDJ server.
required: true
type: str
port:
description:
- The Admin port on which the OpenDJ instance is available.
required: true
type: str
username:
description:
- The username to connect to.
required: false
default: cn=Directory Manager
type: str
password:
description:
- The password for the cn=Directory Manager user.
- Either password or passwordfile is needed.
required: false
type: str
passwordfile:
description:
- Location to the password file which holds the password for the cn=Directory Manager user.
- Either password or passwordfile is needed.
required: false
type: path
backend:
description:
- The name of the backend on which the property needs to be updated.
required: true
type: str
name:
description:
- The configuration setting to update.
required: true
type: str
value:
description:
- The value for the configuration item.
required: true
type: str
state:
description:
- If configuration needs to be added/updated
required: false
default: "present"
type: str
'''
EXAMPLES = '''

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