mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-28 09:26:44 +00:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3197ef2e38 | ||
|
|
5f971e677a | ||
|
|
1b5d91153b | ||
|
|
2ce9ea8c54 | ||
|
|
eec4861c36 | ||
|
|
82e7e931a8 | ||
|
|
4b59174063 | ||
|
|
58d8469759 | ||
|
|
6d5dbfd455 | ||
|
|
6357048068 | ||
|
|
a861149a0e | ||
|
|
9a9b0b04a5 | ||
|
|
0a4e9379e2 | ||
|
|
7d1abf5d6a | ||
|
|
7ef25be10c | ||
|
|
0d0194fdf8 | ||
|
|
36f64367cf | ||
|
|
d827601c95 | ||
|
|
2efd31bacf | ||
|
|
6eaf047739 | ||
|
|
80268b0828 | ||
|
|
1e848c56f2 | ||
|
|
f74756d7fc | ||
|
|
138b57230a | ||
|
|
d32193afef | ||
|
|
ef8aa73dab | ||
|
|
28007079a4 | ||
|
|
f0b7233e8d | ||
|
|
48cc39a2b1 | ||
|
|
c34dc24d3a | ||
|
|
0760f60ca5 | ||
|
|
48b1bc7d47 | ||
|
|
769233808d | ||
|
|
7361ca5430 | ||
|
|
2322937a4a | ||
|
|
82225e5850 | ||
|
|
2d237987ae | ||
|
|
dc14070e08 | ||
|
|
feb1c1081e | ||
|
|
20bda07aaf | ||
|
|
1f6aa62210 | ||
|
|
5308f61b78 | ||
|
|
29636c1cc8 | ||
|
|
830734d6cf | ||
|
|
0296c200c7 | ||
|
|
2b435a591d | ||
|
|
ec2c793b08 | ||
|
|
a6bffa274c | ||
|
|
b653a9a84a | ||
|
|
8c209bdedc | ||
|
|
d4b4370ec4 | ||
|
|
e34276fa92 | ||
|
|
59d7850900 | ||
|
|
151b482fe6 | ||
|
|
ea04bb97cb | ||
|
|
5dd64a45de | ||
|
|
4df33d26b1 | ||
|
|
766f2dfe46 | ||
|
|
8a7128997d | ||
|
|
b598ca28f9 | ||
|
|
c943f7aa56 | ||
|
|
9565be5e50 | ||
|
|
725e670b47 | ||
|
|
ffdef00a6a | ||
|
|
92ccc6f013 |
2
.github/BOTMETA.yml
vendored
2
.github/BOTMETA.yml
vendored
@@ -1,5 +1,7 @@
|
||||
automerge: true
|
||||
files:
|
||||
plugins/:
|
||||
supershipit: quidame Ajpantuso
|
||||
changelogs/fragments/:
|
||||
support: community
|
||||
$actions:
|
||||
|
||||
101
CHANGELOG.rst
101
CHANGELOG.rst
@@ -6,6 +6,107 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 2.0.0.
|
||||
|
||||
v3.3.2
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Extraordinary bugfix release to fix some annoying bugs.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- archive - fixed task failure when using the ``remove`` option with a ``path`` containing nested files for ``format``s other than ``zip`` (https://github.com/ansible-collections/community.general/issues/2919).
|
||||
- lvol - honor ``check_mode`` on thinpool (https://github.com/ansible-collections/community.general/issues/2934).
|
||||
- module_helper module utils - fixed change-tracking for dictionaries and lists (https://github.com/ansible-collections/community.general/pull/2951).
|
||||
- npm - correctly handle cases where a dependency does not have a ``version`` property because it is either missing or invalid (https://github.com/ansible-collections/community.general/issues/2917).
|
||||
- pacman - fix changed status when ignorepkg has been defined (https://github.com/ansible-collections/community.general/issues/1758).
|
||||
- snap - fixed the order of the ``--classic`` parameter in the command line invocation (https://github.com/ansible-collections/community.general/issues/2916).
|
||||
|
||||
v3.3.1
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Extraordinary bugfix release to fix a fatal bug in ``snap``.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- keycloak_authentication - fix bug when two identical executions are in the same authentication flow (https://github.com/ansible-collections/community.general/pull/2904).
|
||||
- module_helper module utils - avoid failing when non-zero ``rc`` is present on regular exit (https://github.com/ansible-collections/community.general/pull/2912).
|
||||
- snap - fix various bugs which prevented the module from working at all, and which resulted in ``state=absent`` fail on absent snaps (https://github.com/ansible-collections/community.general/issues/2835, https://github.com/ansible-collections/community.general/issues/2906, https://github.com/ansible-collections/community.general/pull/2912).
|
||||
|
||||
v3.3.0
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular feature and bugfix release.
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Avoid internal ansible-core module_utils in favor of equivalent public API available since at least Ansible 2.9 (https://github.com/ansible-collections/community.general/pull/2877).
|
||||
- datadog_event - adding parameter ``api_host`` to allow selecting a datadog API endpoint instead of using the default one (https://github.com/ansible-collections/community.general/issues/2774, https://github.com/ansible-collections/community.general/pull/2775).
|
||||
- flatpak - allows installing or uninstalling a list of packages (https://github.com/ansible-collections/community.general/pull/2521).
|
||||
- gem - add ``bindir`` option to specify an installation path for executables such as ``/home/user/bin`` or ``/home/user/.local/bin`` (https://github.com/ansible-collections/community.general/pull/2837).
|
||||
- gem - add ``norc`` option to avoid loading any ``.gemrc`` file (https://github.com/ansible-collections/community.general/pull/2837).
|
||||
- gitlab_project - projects can be created under other user's namespaces with the new ``username`` option (https://github.com/ansible-collections/community.general/pull/2824).
|
||||
- gitlab_user - add functionality for adding external identity providers to a GitLab user (https://github.com/ansible-collections/community.general/pull/2691).
|
||||
- gitlab_user - allow to reset an existing password with the new ``reset_password`` option (https://github.com/ansible-collections/community.general/pull/2691).
|
||||
- gitlab_user - specifying a password is no longer necessary (https://github.com/ansible-collections/community.general/pull/2691).
|
||||
- jenkins_build - support stopping a running jenkins build (https://github.com/ansible-collections/community.general/pull/2850).
|
||||
- jenkins_plugin - add fallback url(s) for failure of plugin installation/download (https://github.com/ansible-collections/community.general/pull/1334).
|
||||
- nmcli - add ``disabled`` value to ``method6`` option (https://github.com/ansible-collections/community.general/issues/2730).
|
||||
- nmcli - add ``routing_rules4`` and ``may_fail4`` options (https://github.com/ansible-collections/community.general/issues/2730).
|
||||
- nrdp callback plugin - parameters are now converted to strings, except ``validate_certs`` which is converted to boolean (https://github.com/ansible-collections/community.general/pull/2878).
|
||||
- redhat_subscription - add ``server_prefix`` and ``server_port`` parameters (https://github.com/ansible-collections/community.general/pull/2779).
|
||||
- redis - allow to use the term ``replica`` instead of ``slave``, which has been the official Redis terminology since 2018 (https://github.com/ansible-collections/community.general/pull/2867).
|
||||
- snap - added ``enabled`` and ``disabled`` states (https://github.com/ansible-collections/community.general/issues/1990).
|
||||
- splunk callback plugin - add ``batch`` option for user-configurable correlation ID's (https://github.com/ansible-collections/community.general/issues/2790).
|
||||
- terraform - add ``check_destroy`` optional parameter to check for deletion of resources before it is applied (https://github.com/ansible-collections/community.general/pull/2874).
|
||||
- timezone - print error message to debug instead of warning when timedatectl fails (https://github.com/ansible-collections/community.general/issues/1942).
|
||||
|
||||
Deprecated Features
|
||||
-------------------
|
||||
|
||||
- ali_instance_info - marked removal version of deprecated parameters ``availability_zone`` and ``instance_names`` (https://github.com/ansible-collections/community.general/issues/2429).
|
||||
- serverless - deprecating parameter ``functions`` because it was not used in the code (https://github.com/ansible-collections/community.general/pull/2845).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- _mount module utils - fixed the sanity checks (https://github.com/ansible-collections/community.general/pull/2883).
|
||||
- archive - fixed ``exclude_path`` values causing incorrect archive root (https://github.com/ansible-collections/community.general/pull/2816).
|
||||
- archive - fixed improper file names for single file zip archives (https://github.com/ansible-collections/community.general/issues/2818).
|
||||
- archive - fixed incorrect ``state`` result value documentation (https://github.com/ansible-collections/community.general/pull/2816).
|
||||
- gitlab_project - user projects are created using namespace ID now, instead of user ID (https://github.com/ansible-collections/community.general/pull/2881).
|
||||
- ini_file - fix Unicode processing for Python 2 (https://github.com/ansible-collections/community.general/pull/2875).
|
||||
- ipa_sudorule - call ``sudorule_add_allow_command`` method instead of ``sudorule_add_allow_command_group`` (https://github.com/ansible-collections/community.general/issues/2442).
|
||||
- java_keystore - add parameter ``keystore_type`` to control output file format and override ``keytool``'s default, which depends on Java version (https://github.com/ansible-collections/community.general/issues/2515).
|
||||
- jenkins_build - examine presence of ``build_number`` before deleting a jenkins build (https://github.com/ansible-collections/community.general/pull/2850).
|
||||
- modprobe - added additional checks to ensure module load/unload is effective (https://github.com/ansible-collections/community.general/issues/1608).
|
||||
- nmcli - fixes team-slave configuration by adding connection.slave-type (https://github.com/ansible-collections/community.general/issues/766).
|
||||
- npm - when the ``version`` option is used the comparison of installed vs missing will use name@version instead of just name, allowing version specific updates (https://github.com/ansible-collections/community.general/issues/2021).
|
||||
- proxmox_kvm - fix parsing of Proxmox VM information with device info not containing a comma, like disks backed by ZFS zvols (https://github.com/ansible-collections/community.general/issues/2840).
|
||||
- scaleway plugin inventory - fix ``JSON object must be str, not 'bytes'`` with Python 3.5 (https://github.com/ansible-collections/community.general/issues/2769).
|
||||
- yum_versionlock - fix idempotency when using wildcard (asterisk) in ``name`` option (https://github.com/ansible-collections/community.general/issues/2761).
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
Identity
|
||||
~~~~~~~~
|
||||
|
||||
keycloak
|
||||
^^^^^^^^
|
||||
|
||||
- keycloak_authentication - Configure authentication in Keycloak
|
||||
|
||||
v3.2.0
|
||||
======
|
||||
|
||||
|
||||
@@ -29,4 +29,8 @@ Also, consider taking up a valuable, reviewed, but abandoned pull request which
|
||||
|
||||
You can also read [our Quick-start development guide](https://github.com/ansible/community-docs/blob/main/create_pr_quick_start_guide.rst).
|
||||
|
||||
## Test pull requests
|
||||
|
||||
If you want to test a PR locally, refer to [our testing guide](https://github.com/ansible/community-docs/blob/main/test_pr_locally_guide.rst) for instructions on how do it quickly.
|
||||
|
||||
If you find any inconsistencies or places in this document which can be improved, feel free to raise an issue or pull request to fix it.
|
||||
|
||||
47
README.md
47
README.md
@@ -3,12 +3,18 @@
|
||||
[](https://dev.azure.com/ansible/community.general/_build?definitionId=31)
|
||||
[](https://codecov.io/gh/ansible-collections/community.general)
|
||||
|
||||
This repo contains the `community.general` Ansible Collection. The collection includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.
|
||||
This repository contains the `community.general` Ansible Collection. The collection is a part of the Ansible package and includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.
|
||||
|
||||
You can find [documentation for this collection on the Ansible docs site](https://docs.ansible.com/ansible/latest/collections/community/general/).
|
||||
|
||||
Please note that this collection does **not** support Windows targets. Only connection plugins included in this collection might support Windows targets, and will explicitly mention that in their documentation if they do so.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
We follow [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) in all our interactions within this project.
|
||||
|
||||
If you encounter abusive behavior violating the [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html), please refer to the [policy violations](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html#policy-violations) section of the Code of Conduct for information on how to raise a complaint.
|
||||
|
||||
## Tested with Ansible
|
||||
|
||||
Tested with the current Ansible 2.9, ansible-base 2.10 and ansible-core 2.11 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.
|
||||
@@ -23,7 +29,9 @@ Please check the included content on the [Ansible Galaxy page for this collectio
|
||||
|
||||
## Using this collection
|
||||
|
||||
Before using the General community collection, you need to install the collection with the `ansible-galaxy` CLI:
|
||||
This collection is shipped with the Ansible package. So if you have it installed, no more action is required.
|
||||
|
||||
If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole Ansible package, you need to install the collection from [Ansible Galaxy](https://galaxy.ansible.com/community/general) manually with the `ansible-galaxy` command-line tool:
|
||||
|
||||
ansible-galaxy collection install community.general
|
||||
|
||||
@@ -34,19 +42,29 @@ collections:
|
||||
- name: community.general
|
||||
```
|
||||
|
||||
Note that if you install the collection manually, it will not be upgraded automatically when you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install community.general --upgrade
|
||||
```
|
||||
|
||||
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where `X.Y.Z` can be any [available version](https://galaxy.ansible.com/community/general):
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install community.general:==X.Y.Z
|
||||
```
|
||||
|
||||
See [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
|
||||
|
||||
## Contributing to this collection
|
||||
|
||||
If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATH`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there.
|
||||
The content of this collection is made by good people like you, a community of individuals collaborating on making the world better through developing automation software.
|
||||
|
||||
For example, if you are working in the `~/dev` directory:
|
||||
All types of contributions are very welcome.
|
||||
|
||||
```
|
||||
cd ~/dev
|
||||
git clone git@github.com:ansible-collections/community.general.git collections/ansible_collections/community/general
|
||||
export COLLECTIONS_PATH=$(pwd)/collections:$COLLECTIONS_PATH
|
||||
```
|
||||
You don't know how to start? Refer to our [contribution guide](https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md)!
|
||||
|
||||
The current maintainers are listed in the [commit-rights.md](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md#people) file. If you have questions or need help, feel free to mention them in the proposals.
|
||||
|
||||
You can find more information in the [developer guide for collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html).
|
||||
|
||||
@@ -58,16 +76,15 @@ See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collectio
|
||||
|
||||
### Communication
|
||||
|
||||
We have a dedicated Working Group for Ansible development.
|
||||
We announce important development changes and releases through Ansible's [The Bullhorn newsletter](https://eepurl.com/gZmiEP). If you are a collection developer, be sure you are subscribed.
|
||||
|
||||
You can find other people interested on the following [Libera.chat](https://libera.chat/) IRC channels -
|
||||
- `#ansible` - For general use questions and support.
|
||||
- `#ansible-devel` - For discussions on developer topics and code related to features or bugs in ansible-core.
|
||||
- `#ansible-community` - For discussions on community topics and community meetings, and for general development questions for community collections.
|
||||
Join us in the `#ansible` (general use questions and support), `#ansible-community` (community and collection development questions), and other [IRC channels](https://docs.ansible.com/ansible/devel/community/communication.html#irc-channels) on [Libera.chat](https://libera.chat).
|
||||
|
||||
We take part in the global quarterly [Ansible Contributor Summit](https://github.com/ansible/community/wiki/Contributor-Summit) virtually or in-person. Track [The Bullhorn newsletter](https://eepurl.com/gZmiEP) and join us.
|
||||
|
||||
For more information about communities, meetings and agendas see [Community Wiki](https://github.com/ansible/community/wiki/Community).
|
||||
|
||||
For more information about [communication](https://docs.ansible.com/ansible/latest/community/communication.html)
|
||||
For more information about communication, refer to the [Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
|
||||
|
||||
### Publishing New Version
|
||||
|
||||
|
||||
@@ -1286,3 +1286,148 @@ releases:
|
||||
name: random_string
|
||||
namespace: null
|
||||
release_date: '2021-06-08'
|
||||
3.3.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- _mount module utils - fixed the sanity checks (https://github.com/ansible-collections/community.general/pull/2883).
|
||||
- archive - fixed ``exclude_path`` values causing incorrect archive root (https://github.com/ansible-collections/community.general/pull/2816).
|
||||
- archive - fixed improper file names for single file zip archives (https://github.com/ansible-collections/community.general/issues/2818).
|
||||
- archive - fixed incorrect ``state`` result value documentation (https://github.com/ansible-collections/community.general/pull/2816).
|
||||
- gitlab_project - user projects are created using namespace ID now, instead
|
||||
of user ID (https://github.com/ansible-collections/community.general/pull/2881).
|
||||
- ini_file - fix Unicode processing for Python 2 (https://github.com/ansible-collections/community.general/pull/2875).
|
||||
- ipa_sudorule - call ``sudorule_add_allow_command`` method instead of ``sudorule_add_allow_command_group``
|
||||
(https://github.com/ansible-collections/community.general/issues/2442).
|
||||
- java_keystore - add parameter ``keystore_type`` to control output file format
|
||||
and override ``keytool``'s default, which depends on Java version (https://github.com/ansible-collections/community.general/issues/2515).
|
||||
- jenkins_build - examine presence of ``build_number`` before deleting a jenkins
|
||||
build (https://github.com/ansible-collections/community.general/pull/2850).
|
||||
- modprobe - added additional checks to ensure module load/unload is effective
|
||||
(https://github.com/ansible-collections/community.general/issues/1608).
|
||||
- nmcli - fixes team-slave configuration by adding connection.slave-type (https://github.com/ansible-collections/community.general/issues/766).
|
||||
- npm - when the ``version`` option is used the comparison of installed vs missing
|
||||
will use name@version instead of just name, allowing version specific updates
|
||||
(https://github.com/ansible-collections/community.general/issues/2021).
|
||||
- proxmox_kvm - fix parsing of Proxmox VM information with device info not containing
|
||||
a comma, like disks backed by ZFS zvols (https://github.com/ansible-collections/community.general/issues/2840).
|
||||
- scaleway plugin inventory - fix ``JSON object must be str, not 'bytes'`` with
|
||||
Python 3.5 (https://github.com/ansible-collections/community.general/issues/2769).
|
||||
- yum_versionlock - fix idempotency when using wildcard (asterisk) in ``name``
|
||||
option (https://github.com/ansible-collections/community.general/issues/2761).
|
||||
deprecated_features:
|
||||
- ali_instance_info - marked removal version of deprecated parameters ``availability_zone``
|
||||
and ``instance_names`` (https://github.com/ansible-collections/community.general/issues/2429).
|
||||
- serverless - deprecating parameter ``functions`` because it was not used in
|
||||
the code (https://github.com/ansible-collections/community.general/pull/2845).
|
||||
minor_changes:
|
||||
- Avoid internal ansible-core module_utils in favor of equivalent public API
|
||||
available since at least Ansible 2.9 (https://github.com/ansible-collections/community.general/pull/2877).
|
||||
- datadog_event - adding parameter ``api_host`` to allow selecting a datadog
|
||||
API endpoint instead of using the default one (https://github.com/ansible-collections/community.general/issues/2774,
|
||||
https://github.com/ansible-collections/community.general/pull/2775).
|
||||
- flatpak - allows installing or uninstalling a list of packages (https://github.com/ansible-collections/community.general/pull/2521).
|
||||
- gem - add ``bindir`` option to specify an installation path for executables
|
||||
such as ``/home/user/bin`` or ``/home/user/.local/bin`` (https://github.com/ansible-collections/community.general/pull/2837).
|
||||
- gem - add ``norc`` option to avoid loading any ``.gemrc`` file (https://github.com/ansible-collections/community.general/pull/2837).
|
||||
- gitlab_project - projects can be created under other user's namespaces with
|
||||
the new ``username`` option (https://github.com/ansible-collections/community.general/pull/2824).
|
||||
- gitlab_user - add functionality for adding external identity providers to
|
||||
a GitLab user (https://github.com/ansible-collections/community.general/pull/2691).
|
||||
- gitlab_user - allow to reset an existing password with the new ``reset_password``
|
||||
option (https://github.com/ansible-collections/community.general/pull/2691).
|
||||
- gitlab_user - specifying a password is no longer necessary (https://github.com/ansible-collections/community.general/pull/2691).
|
||||
- jenkins_build - support stopping a running jenkins build (https://github.com/ansible-collections/community.general/pull/2850).
|
||||
- jenkins_plugin - add fallback url(s) for failure of plugin installation/download
|
||||
(https://github.com/ansible-collections/community.general/pull/1334).
|
||||
- nmcli - add ``disabled`` value to ``method6`` option (https://github.com/ansible-collections/community.general/issues/2730).
|
||||
- nmcli - add ``routing_rules4`` and ``may_fail4`` options (https://github.com/ansible-collections/community.general/issues/2730).
|
||||
- nrdp callback plugin - parameters are now converted to strings, except ``validate_certs``
|
||||
which is converted to boolean (https://github.com/ansible-collections/community.general/pull/2878).
|
||||
- redhat_subscription - add ``server_prefix`` and ``server_port`` parameters
|
||||
(https://github.com/ansible-collections/community.general/pull/2779).
|
||||
- redis - allow to use the term ``replica`` instead of ``slave``, which has
|
||||
been the official Redis terminology since 2018 (https://github.com/ansible-collections/community.general/pull/2867).
|
||||
- snap - added ``enabled`` and ``disabled`` states (https://github.com/ansible-collections/community.general/issues/1990).
|
||||
- splunk callback plugin - add ``batch`` option for user-configurable correlation
|
||||
ID's (https://github.com/ansible-collections/community.general/issues/2790).
|
||||
- terraform - add ``check_destroy`` optional parameter to check for deletion
|
||||
of resources before it is applied (https://github.com/ansible-collections/community.general/pull/2874).
|
||||
- timezone - print error message to debug instead of warning when timedatectl
|
||||
fails (https://github.com/ansible-collections/community.general/issues/1942).
|
||||
release_summary: Regular feature and bugfix release.
|
||||
fragments:
|
||||
- 1334-jenkins-plugin-fallback-urls.yaml
|
||||
- 1942_timezone.yml
|
||||
- 2411-snap-revamp-enabled-disabled-states.yml
|
||||
- 2516_fix_2515_keystore_type_jks.yml
|
||||
- 2521-flatpak-list.yml
|
||||
- 2691-gitlab_user-support-identity-provider.yml
|
||||
- 2732-nmcli_add_options.yml
|
||||
- 2771-scaleway_inventory_json_accept_byte_array.yml
|
||||
- 2774-datadog_event_api_parameter.yml
|
||||
- 2779_redhat_subscription-add_server_prefix_and_server_port.yml
|
||||
- 2787-yum_versionlock-fix_idempotency_when_using_wildcard.yml
|
||||
- 2790-callback_splunk-batch-option.yml
|
||||
- 2816-archive-refactor.yml
|
||||
- 2821-ipa_sudorule.yml
|
||||
- 2824-gitlab_project-project-under-user.yml
|
||||
- 2827-nmcli_fix_team_slave.yml
|
||||
- 2830-npm-version-update.yml
|
||||
- 2841-proxmox_kvm_zfs_devstr.yml
|
||||
- 2843-modprobe-failure-conditions.yml
|
||||
- 2844-ali_instance_info-deprecate-params.yml
|
||||
- 2845-serverless-deprecate-functions-param.yml
|
||||
- 2850-jenkins_build-support-stop-jenkins-build.yml
|
||||
- 2867-redis-terminology.yml
|
||||
- 2874-terraform-check-destroy.yml
|
||||
- 2875-ini_file-unicode.yml
|
||||
- 2878-validate-certs-bool.yml
|
||||
- 2881-gitlab_project-fix_workspace_user.yaml
|
||||
- 2883-_mount-fixed-sanity-checks.yml
|
||||
- 3.3.0.yml
|
||||
- ansible-core-_text.yml
|
||||
- gem_module_add_bindir_option.yml
|
||||
modules:
|
||||
- description: Configure authentication in Keycloak
|
||||
name: keycloak_authentication
|
||||
namespace: identity.keycloak
|
||||
release_date: '2021-06-29'
|
||||
3.3.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- keycloak_authentication - fix bug when two identical executions are in the
|
||||
same authentication flow (https://github.com/ansible-collections/community.general/pull/2904).
|
||||
- module_helper module utils - avoid failing when non-zero ``rc`` is present
|
||||
on regular exit (https://github.com/ansible-collections/community.general/pull/2912).
|
||||
- snap - fix various bugs which prevented the module from working at all, and
|
||||
which resulted in ``state=absent`` fail on absent snaps (https://github.com/ansible-collections/community.general/issues/2835,
|
||||
https://github.com/ansible-collections/community.general/issues/2906, https://github.com/ansible-collections/community.general/pull/2912).
|
||||
release_summary: Extraordinary bugfix release to fix a fatal bug in ``snap``.
|
||||
fragments:
|
||||
- 2904-fix-bug-when-2-identical-executions-in-same-auth-flow.yml
|
||||
- 2912-snap-module-helper.yml
|
||||
- 3.3.1.yml
|
||||
release_date: '2021-07-01'
|
||||
3.3.2:
|
||||
changes:
|
||||
bugfixes:
|
||||
- archive - fixed task failure when using the ``remove`` option with a ``path``
|
||||
containing nested files for ``format``s other than ``zip`` (https://github.com/ansible-collections/community.general/issues/2919).
|
||||
- lvol - honor ``check_mode`` on thinpool (https://github.com/ansible-collections/community.general/issues/2934).
|
||||
- module_helper module utils - fixed change-tracking for dictionaries and lists
|
||||
(https://github.com/ansible-collections/community.general/pull/2951).
|
||||
- npm - correctly handle cases where a dependency does not have a ``version``
|
||||
property because it is either missing or invalid (https://github.com/ansible-collections/community.general/issues/2917).
|
||||
- pacman - fix changed status when ignorepkg has been defined (https://github.com/ansible-collections/community.general/issues/1758).
|
||||
- snap - fixed the order of the ``--classic`` parameter in the command line
|
||||
invocation (https://github.com/ansible-collections/community.general/issues/2916).
|
||||
release_summary: Extraordinary bugfix release to fix some annoying bugs.
|
||||
fragments:
|
||||
- 2918-snap-param-order.yml
|
||||
- 2923-archive-remove-bugfix.yml
|
||||
- 2924-npm-fix-package-json.yml
|
||||
- 2935-lvol-support_check_mode_thinpool.yml
|
||||
- 2936-pacman-fix_changed_status_when_ignorepkg_has_been_defined.yml
|
||||
- 2951-mh-vars-deepcopy.yml
|
||||
- 3.3.2.yml
|
||||
release_date: '2021-07-08'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace: community
|
||||
name: general
|
||||
version: 3.2.0
|
||||
version: 3.3.2
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.module_utils.common.collections import is_string
|
||||
from ansible.plugins.action import ActionBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
@@ -81,7 +81,7 @@ DOCUMENTATION = '''
|
||||
|
||||
import re
|
||||
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.plugins.become import BecomeBase
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ DOCUMENTATION = '''
|
||||
|
||||
import re
|
||||
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.plugins.become import BecomeBase
|
||||
|
||||
|
||||
|
||||
2
plugins/cache/redis.py
vendored
2
plugins/cache/redis.py
vendored
@@ -67,7 +67,7 @@ import json
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder
|
||||
from ansible.plugins.cache import BaseCacheModule
|
||||
from ansible.release import __version__ as ansible_base_version
|
||||
|
||||
@@ -792,7 +792,7 @@ from ansible.utils.color import colorize, hostcolor
|
||||
from ansible.template import Templar
|
||||
from ansible.vars.manager import VariableManager
|
||||
from ansible.plugins.callback.default import CallbackModule as Default
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
class DummyStdout(object):
|
||||
|
||||
@@ -31,7 +31,7 @@ import time
|
||||
import json
|
||||
|
||||
from ansible.utils.path import makedirs_safe
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.module_utils.common._collections_compat import MutableMapping
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
@@ -111,7 +111,7 @@ try:
|
||||
except ImportError:
|
||||
HAS_FLATDICT = False
|
||||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
# Todo:
|
||||
|
||||
@@ -62,7 +62,7 @@ import re
|
||||
import smtplib
|
||||
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
||||
@@ -10,22 +10,23 @@ DOCUMENTATION = '''
|
||||
name: nrdp
|
||||
type: notification
|
||||
author: "Remi VERCHERE (@rverchere)"
|
||||
short_description: post task result to a nagios server through nrdp
|
||||
short_description: Post task results to a Nagios server through nrdp
|
||||
description:
|
||||
- this callback send playbook result to nagios
|
||||
- nagios shall use NRDP to recive passive events
|
||||
- the passive check is sent to a dedicated host/service for ansible
|
||||
- This callback send playbook result to Nagios.
|
||||
- Nagios shall use NRDP to recive passive events.
|
||||
- The passive check is sent to a dedicated host/service for Ansible.
|
||||
options:
|
||||
url:
|
||||
description: url of the nrdp server
|
||||
required: True
|
||||
description: URL of the nrdp server.
|
||||
required: true
|
||||
env:
|
||||
- name : NRDP_URL
|
||||
ini:
|
||||
- section: callback_nrdp
|
||||
key: url
|
||||
type: string
|
||||
validate_certs:
|
||||
description: (bool) validate the SSL certificate of the nrdp server. (For HTTPS url)
|
||||
description: Validate the SSL certificate of the nrdp server. (Used for HTTPS URLs.)
|
||||
env:
|
||||
- name: NRDP_VALIDATE_CERTS
|
||||
ini:
|
||||
@@ -33,32 +34,36 @@ DOCUMENTATION = '''
|
||||
key: validate_nrdp_certs
|
||||
- section: callback_nrdp
|
||||
key: validate_certs
|
||||
default: False
|
||||
type: boolean
|
||||
default: false
|
||||
aliases: [ validate_nrdp_certs ]
|
||||
token:
|
||||
description: token to be allowed to push nrdp events
|
||||
required: True
|
||||
description: Token to be allowed to push nrdp events.
|
||||
required: true
|
||||
env:
|
||||
- name: NRDP_TOKEN
|
||||
ini:
|
||||
- section: callback_nrdp
|
||||
key: token
|
||||
type: string
|
||||
hostname:
|
||||
description: hostname where the passive check is linked to
|
||||
required: True
|
||||
description: Hostname where the passive check is linked to.
|
||||
required: true
|
||||
env:
|
||||
- name : NRDP_HOSTNAME
|
||||
ini:
|
||||
- section: callback_nrdp
|
||||
key: hostname
|
||||
type: string
|
||||
servicename:
|
||||
description: service where the passive check is linked to
|
||||
required: True
|
||||
description: Service where the passive check is linked to.
|
||||
required: true
|
||||
env:
|
||||
- name : NRDP_SERVICENAME
|
||||
ini:
|
||||
- section: callback_nrdp
|
||||
key: servicename
|
||||
type: string
|
||||
'''
|
||||
|
||||
import os
|
||||
|
||||
@@ -40,7 +40,7 @@ import difflib
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
try:
|
||||
codeCodes = C.COLOR_CODES
|
||||
|
||||
@@ -58,7 +58,7 @@ import os
|
||||
import uuid
|
||||
|
||||
from ansible import context
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
||||
@@ -68,6 +68,16 @@ DOCUMENTATION = '''
|
||||
type: bool
|
||||
default: false
|
||||
version_added: 2.0.0
|
||||
batch:
|
||||
description:
|
||||
- Correlation ID which can be set across multiple playbook executions.
|
||||
env:
|
||||
- name: SPLUNK_BATCH
|
||||
ini:
|
||||
- section: callback_splunk
|
||||
key: batch
|
||||
type: str
|
||||
version_added: 3.3.0
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -107,7 +117,7 @@ class SplunkHTTPCollectorSource(object):
|
||||
self.ip_address = socket.gethostbyname(socket.gethostname())
|
||||
self.user = getpass.getuser()
|
||||
|
||||
def send_event(self, url, authtoken, validate_certs, include_milliseconds, state, result, runtime):
|
||||
def send_event(self, url, authtoken, validate_certs, include_milliseconds, batch, state, result, runtime):
|
||||
if result._task_fields['args'].get('_ansible_check_mode') is True:
|
||||
self.ansible_check_mode = True
|
||||
|
||||
@@ -126,6 +136,8 @@ class SplunkHTTPCollectorSource(object):
|
||||
data = {}
|
||||
data['uuid'] = result._task._uuid
|
||||
data['session'] = self.session
|
||||
if batch is not None:
|
||||
data['batch'] = batch
|
||||
data['status'] = state
|
||||
|
||||
if include_milliseconds:
|
||||
@@ -175,6 +187,7 @@ class CallbackModule(CallbackBase):
|
||||
self.authtoken = None
|
||||
self.validate_certs = None
|
||||
self.include_milliseconds = None
|
||||
self.batch = None
|
||||
self.splunk = SplunkHTTPCollectorSource()
|
||||
|
||||
def _runtime(self, result):
|
||||
@@ -212,6 +225,8 @@ class CallbackModule(CallbackBase):
|
||||
|
||||
self.include_milliseconds = self.get_option('include_milliseconds')
|
||||
|
||||
self.batch = self.get_option('batch')
|
||||
|
||||
def v2_playbook_on_start(self, playbook):
|
||||
self.splunk.ansible_playbook = basename(playbook._file_name)
|
||||
|
||||
@@ -227,6 +242,7 @@ class CallbackModule(CallbackBase):
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
self.include_milliseconds,
|
||||
self.batch,
|
||||
'OK',
|
||||
result,
|
||||
self._runtime(result)
|
||||
@@ -238,6 +254,7 @@ class CallbackModule(CallbackBase):
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
self.include_milliseconds,
|
||||
self.batch,
|
||||
'SKIPPED',
|
||||
result,
|
||||
self._runtime(result)
|
||||
@@ -249,6 +266,7 @@ class CallbackModule(CallbackBase):
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
self.include_milliseconds,
|
||||
self.batch,
|
||||
'FAILED',
|
||||
result,
|
||||
self._runtime(result)
|
||||
@@ -260,6 +278,7 @@ class CallbackModule(CallbackBase):
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
self.include_milliseconds,
|
||||
self.batch,
|
||||
'FAILED',
|
||||
result,
|
||||
self._runtime(result)
|
||||
@@ -271,6 +290,7 @@ class CallbackModule(CallbackBase):
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
self.include_milliseconds,
|
||||
self.batch,
|
||||
'UNREACHABLE',
|
||||
result,
|
||||
self._runtime(result)
|
||||
|
||||
@@ -22,7 +22,7 @@ DOCUMENTATION = '''
|
||||
from os.path import basename
|
||||
from ansible import constants as C
|
||||
from ansible import context
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.utils.color import colorize, hostcolor
|
||||
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import re
|
||||
import string
|
||||
import sys
|
||||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.parsing.yaml.dumper import AnsibleDumper
|
||||
from ansible.plugins.callback import CallbackBase, strip_internal_keys, module_response_deepcopy
|
||||
|
||||
@@ -54,7 +54,7 @@ from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.basic import is_executable
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
from ansible.module_utils.six.moves import shlex_quote
|
||||
from ansible.module_utils._text import to_bytes, to_native
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||
from ansible.plugins.connection import ConnectionBase, BUFSIZE
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ DOCUMENTATION = '''
|
||||
import subprocess
|
||||
|
||||
from ansible_collections.community.general.plugins.connection.jail import Connection as Jail
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import traceback
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six.moves import shlex_quote
|
||||
from ansible.module_utils._text import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||
from ansible.plugins.connection import ConnectionBase, BUFSIZE
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ except ImportError:
|
||||
pass
|
||||
|
||||
from ansible import errors
|
||||
from ansible.module_utils._text import to_bytes, to_native
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ from distutils.spawn import find_executable
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ DOCUMENTATION = '''
|
||||
|
||||
import subprocess
|
||||
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.plugins.connection import ConnectionBase, ensure_connect
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.utils.display import Display
|
||||
|
||||
@@ -33,7 +33,7 @@ import traceback
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six.moves import shlex_quote
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.plugins.connection import ConnectionBase, BUFSIZE
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.csv import (initialize_dialect, read_csv, CSVError,
|
||||
DialectNotAvailableError,
|
||||
|
||||
@@ -72,7 +72,7 @@ from distutils.version import LooseVersion
|
||||
import socket
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils._text import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.common._collections_compat import MutableMapping
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name
|
||||
|
||||
@@ -82,7 +82,7 @@ keyed_groups:
|
||||
'''
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleParserError
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||
|
||||
try:
|
||||
|
||||
@@ -122,7 +122,7 @@ import time
|
||||
import os
|
||||
import socket
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.module_utils.common.dict_transformations import dict_merge
|
||||
from ansible.errors import AnsibleError, AnsibleParserError
|
||||
from ansible_collections.community.general.plugins.module_utils.compat import ipaddress
|
||||
|
||||
@@ -56,7 +56,7 @@ from subprocess import Popen, PIPE
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleParserError
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ from sys import version as python_version
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||
from ansible.module_utils.six.moves.urllib.parse import urljoin
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
# Copyright (c) 2017 Ansible Project
|
||||
# Copyright: (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
name: scaleway
|
||||
author:
|
||||
- Remy Leone (@sieben)
|
||||
short_description: Scaleway inventory source
|
||||
description:
|
||||
- Get inventory hosts from Scaleway
|
||||
- Get inventory hosts from Scaleway.
|
||||
options:
|
||||
plugin:
|
||||
description: token that ensures this is a source file for the 'scaleway' plugin.
|
||||
description: Token that ensures this is a source file for the 'scaleway' plugin.
|
||||
required: True
|
||||
choices: ['scaleway', 'community.general.scaleway']
|
||||
regions:
|
||||
description: Filter results on a specific Scaleway region
|
||||
description: Filter results on a specific Scaleway region.
|
||||
type: list
|
||||
default:
|
||||
- ams1
|
||||
@@ -26,11 +26,13 @@ DOCUMENTATION = '''
|
||||
- par2
|
||||
- waw1
|
||||
tags:
|
||||
description: Filter results on a specific tag
|
||||
description: Filter results on a specific tag.
|
||||
type: list
|
||||
oauth_token:
|
||||
required: True
|
||||
description: Scaleway OAuth token.
|
||||
description:
|
||||
- Scaleway OAuth token.
|
||||
- More details on L(how to generate token, https://www.scaleway.com/en/docs/generate-api-keys/).
|
||||
env:
|
||||
# in order of precedence
|
||||
- name: SCW_TOKEN
|
||||
@@ -48,14 +50,14 @@ DOCUMENTATION = '''
|
||||
- hostname
|
||||
- id
|
||||
variables:
|
||||
description: 'set individual variables: keys are variable names and
|
||||
description: 'Set individual variables: keys are variable names and
|
||||
values are templates. Any value returned by the
|
||||
L(Scaleway API, https://developer.scaleway.com/#servers-server-get)
|
||||
can be used.'
|
||||
type: dict
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r'''
|
||||
# scaleway_inventory.yml file in YAML format
|
||||
# Example command line: ansible-inventory --list -i scaleway_inventory.yml
|
||||
|
||||
@@ -81,6 +83,15 @@ regions:
|
||||
- par1
|
||||
variables:
|
||||
ansible_host: public_ip.address
|
||||
|
||||
# Using static strings as variables
|
||||
plugin: community.general.scaleway
|
||||
hostnames:
|
||||
- hostname
|
||||
variables:
|
||||
ansible_host: public_ip.address
|
||||
ansible_connection: "'ssh'"
|
||||
ansible_user: "'admin'"
|
||||
'''
|
||||
|
||||
import json
|
||||
@@ -89,7 +100,7 @@ from ansible.errors import AnsibleError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, parse_pagination_link
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
|
||||
import ansible.module_utils.six.moves.urllib.parse as urllib_parse
|
||||
|
||||
@@ -105,7 +116,7 @@ def _fetch_information(token, url):
|
||||
except Exception as e:
|
||||
raise AnsibleError("Error while fetching %s: %s" % (url, to_native(e)))
|
||||
try:
|
||||
raw_json = json.loads(response.read())
|
||||
raw_json = json.loads(to_text(response.read()))
|
||||
except ValueError:
|
||||
raise AnsibleError("Incorrect JSON payload")
|
||||
|
||||
@@ -230,8 +241,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||
|
||||
if not matching_tags:
|
||||
return set()
|
||||
else:
|
||||
return matching_tags.union((server_zone,))
|
||||
return matching_tags.union((server_zone,))
|
||||
|
||||
def _filter_host(self, host_infos, hostname_preferences):
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ import os
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
from ansible.errors import AnsibleParserError
|
||||
from ansible.module_utils._text import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.common._collections_compat import MutableMapping
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
from ansible.module_utils.common.process import get_bin_path
|
||||
|
||||
@@ -106,7 +106,7 @@ import os
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
try:
|
||||
import consul
|
||||
|
||||
@@ -74,7 +74,7 @@ from subprocess import Popen
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.parsing.splitter import parse_kv
|
||||
from ansible.module_utils._text import to_bytes, to_text, to_native
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text, to_native
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
@@ -152,7 +152,7 @@ RETURN = """
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
import socket
|
||||
|
||||
try:
|
||||
|
||||
@@ -54,7 +54,7 @@ except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
# ==============================================================
|
||||
|
||||
@@ -138,7 +138,7 @@ import re
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.display import Display
|
||||
from ansible.module_utils.basic import missing_required_lib
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.errors import AnsibleError, AnsibleLookupError
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
@@ -63,7 +63,7 @@ import os
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.cmd_functions import run_cmd
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
ANSIBLE_HIERA_CFG = os.getenv('ANSIBLE_HIERA_CFG', '/etc/hiera.yaml')
|
||||
ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera')
|
||||
|
||||
@@ -39,7 +39,7 @@ RETURN = """
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ _raw:
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
HAVE_LMDB = True
|
||||
try:
|
||||
import lmdb
|
||||
|
||||
@@ -74,7 +74,7 @@ _list:
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.errors import AnsibleError
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ _list:
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.errors import AnsibleError
|
||||
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ from subprocess import Popen, PIPE
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
|
||||
|
||||
class OnePass(object):
|
||||
|
||||
@@ -142,7 +142,7 @@ import yaml
|
||||
|
||||
from distutils import util
|
||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||
from ansible.module_utils._text import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||
from ansible.utils.display import Display
|
||||
from ansible.utils.encrypt import random_password
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
@@ -138,7 +138,7 @@ import string
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
||||
@@ -80,7 +80,7 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import shelve
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleAssertionError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
# agrees to be bound by the terms and conditions of this License
|
||||
# Agreement.
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
from ansible.module_utils.six.moves.urllib.error import HTTPError, URLError
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.module_utils.api import basic_auth_argument_spec
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
try:
|
||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
import csv
|
||||
from io import BytesIO, StringIO
|
||||
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.six import PY3
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ __metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
from ansible.module_utils.urls import fetch_url
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from distutils.version import StrictVersion
|
||||
|
||||
from ansible.module_utils.basic import missing_required_lib
|
||||
from ansible.module_utils.urls import fetch_url
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
try:
|
||||
from urllib import quote_plus # Python 2.X
|
||||
|
||||
@@ -21,7 +21,7 @@ except ImportError:
|
||||
|
||||
from ansible.module_utils.basic import (AnsibleModule, env_fallback,
|
||||
missing_required_lib)
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
class HwcModuleException(Exception):
|
||||
|
||||
@@ -9,7 +9,7 @@ __metaclass__ = type
|
||||
import traceback
|
||||
|
||||
from functools import wraps
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.basic import missing_required_lib
|
||||
|
||||
PYXCLI_INSTALLED = True
|
||||
|
||||
@@ -33,9 +33,9 @@ import json
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode, quote
|
||||
from ansible.module_utils.six.moves.urllib.error import HTTPError
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native, to_text
|
||||
|
||||
URL_REALMS = "{url}/admin/realms"
|
||||
URL_REALM = "{url}/admin/realms/{realm}"
|
||||
@@ -51,6 +51,17 @@ URL_CLIENTTEMPLATES = "{url}/admin/realms/{realm}/client-templates"
|
||||
URL_GROUPS = "{url}/admin/realms/{realm}/groups"
|
||||
URL_GROUP = "{url}/admin/realms/{realm}/groups/{groupid}"
|
||||
|
||||
URL_AUTHENTICATION_FLOWS = "{url}/admin/realms/{realm}/authentication/flows"
|
||||
URL_AUTHENTICATION_FLOW = "{url}/admin/realms/{realm}/authentication/flows/{id}"
|
||||
URL_AUTHENTICATION_FLOW_COPY = "{url}/admin/realms/{realm}/authentication/flows/{copyfrom}/copy"
|
||||
URL_AUTHENTICATION_FLOW_EXECUTIONS = "{url}/admin/realms/{realm}/authentication/flows/{flowalias}/executions"
|
||||
URL_AUTHENTICATION_FLOW_EXECUTIONS_EXECUTION = "{url}/admin/realms/{realm}/authentication/flows/{flowalias}/executions/execution"
|
||||
URL_AUTHENTICATION_FLOW_EXECUTIONS_FLOW = "{url}/admin/realms/{realm}/authentication/flows/{flowalias}/executions/flow"
|
||||
URL_AUTHENTICATION_EXECUTION_CONFIG = "{url}/admin/realms/{realm}/authentication/executions/{id}/config"
|
||||
URL_AUTHENTICATION_EXECUTION_RAISE_PRIORITY = "{url}/admin/realms/{realm}/authentication/executions/{id}/raise-priority"
|
||||
URL_AUTHENTICATION_EXECUTION_LOWER_PRIORITY = "{url}/admin/realms/{realm}/authentication/executions/{id}/lower-priority"
|
||||
URL_AUTHENTICATION_CONFIG = "{url}/admin/realms/{realm}/authentication/config/{id}"
|
||||
|
||||
|
||||
def keycloak_argument_spec():
|
||||
"""
|
||||
@@ -132,6 +143,59 @@ def get_token(module_params):
|
||||
}
|
||||
|
||||
|
||||
def is_struct_included(struct1, struct2, exclude=None):
|
||||
"""
|
||||
This function compare if the first parameter structure is included in the second.
|
||||
The function use every elements of struct1 and validates they are present in the struct2 structure.
|
||||
The two structure does not need to be equals for that function to return true.
|
||||
Each elements are compared recursively.
|
||||
:param struct1:
|
||||
type:
|
||||
dict for the initial call, can be dict, list, bool, int or str for recursive calls
|
||||
description:
|
||||
reference structure
|
||||
:param struct2:
|
||||
type:
|
||||
dict for the initial call, can be dict, list, bool, int or str for recursive calls
|
||||
description:
|
||||
structure to compare with first parameter.
|
||||
:param exclude:
|
||||
type:
|
||||
list
|
||||
description:
|
||||
Key to exclude from the comparison.
|
||||
default: None
|
||||
:return:
|
||||
type:
|
||||
bool
|
||||
description:
|
||||
Return True if all element of dict 1 are present in dict 2, return false otherwise.
|
||||
"""
|
||||
if isinstance(struct1, list) and isinstance(struct2, list):
|
||||
for item1 in struct1:
|
||||
if isinstance(item1, (list, dict)):
|
||||
for item2 in struct2:
|
||||
if not is_struct_included(item1, item2, exclude):
|
||||
return False
|
||||
else:
|
||||
if item1 not in struct2:
|
||||
return False
|
||||
return True
|
||||
elif isinstance(struct1, dict) and isinstance(struct2, dict):
|
||||
try:
|
||||
for key in struct1:
|
||||
if not (exclude and key in exclude):
|
||||
if not is_struct_included(struct1[key], struct2[key], exclude):
|
||||
return False
|
||||
return True
|
||||
except KeyError:
|
||||
return False
|
||||
elif isinstance(struct1, bool) and isinstance(struct2, bool):
|
||||
return struct1 == struct2
|
||||
else:
|
||||
return to_text(struct1, 'utf-8') == to_text(struct2, 'utf-8')
|
||||
|
||||
|
||||
class KeycloakAPI(object):
|
||||
""" Keycloak API access; Keycloak uses OAuth 2.0 to protect its API, an access token for which
|
||||
is obtained through OpenID connect
|
||||
@@ -571,3 +635,254 @@ class KeycloakAPI(object):
|
||||
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg="Unable to delete group %s: %s" % (groupid, str(e)))
|
||||
|
||||
def get_authentication_flow_by_alias(self, alias, realm='master'):
|
||||
"""
|
||||
Get an authentication flow by it's alias
|
||||
:param alias: Alias of the authentication flow to get.
|
||||
:param realm: Realm.
|
||||
:return: Authentication flow representation.
|
||||
"""
|
||||
try:
|
||||
authentication_flow = {}
|
||||
# Check if the authentication flow exists on the Keycloak serveraders
|
||||
authentications = json.load(open_url(URL_AUTHENTICATION_FLOWS.format(url=self.baseurl, realm=realm), method='GET', headers=self.restheaders))
|
||||
for authentication in authentications:
|
||||
if authentication["alias"] == alias:
|
||||
authentication_flow = authentication
|
||||
break
|
||||
return authentication_flow
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg="Unable get authentication flow %s: %s" % (alias, str(e)))
|
||||
|
||||
def delete_authentication_flow_by_id(self, id, realm='master'):
|
||||
"""
|
||||
Delete an authentication flow from Keycloak
|
||||
:param id: id of authentication flow to be deleted
|
||||
:param realm: realm of client to be deleted
|
||||
:return: HTTPResponse object on success
|
||||
"""
|
||||
flow_url = URL_AUTHENTICATION_FLOW.format(url=self.baseurl, realm=realm, id=id)
|
||||
|
||||
try:
|
||||
return open_url(flow_url, method='DELETE', headers=self.restheaders,
|
||||
validate_certs=self.validate_certs)
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg='Could not delete authentication flow %s in realm %s: %s'
|
||||
% (id, realm, str(e)))
|
||||
|
||||
def copy_auth_flow(self, config, realm='master'):
|
||||
"""
|
||||
Create a new authentication flow from a copy of another.
|
||||
:param config: Representation of the authentication flow to create.
|
||||
:param realm: Realm.
|
||||
:return: Representation of the new authentication flow.
|
||||
"""
|
||||
try:
|
||||
new_name = dict(
|
||||
newName=config["alias"]
|
||||
)
|
||||
open_url(
|
||||
URL_AUTHENTICATION_FLOW_COPY.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
copyfrom=quote(config["copyFrom"])),
|
||||
method='POST',
|
||||
headers=self.restheaders,
|
||||
data=json.dumps(new_name))
|
||||
flow_list = json.load(
|
||||
open_url(
|
||||
URL_AUTHENTICATION_FLOWS.format(url=self.baseurl,
|
||||
realm=realm),
|
||||
method='GET',
|
||||
headers=self.restheaders))
|
||||
for flow in flow_list:
|
||||
if flow["alias"] == config["alias"]:
|
||||
return flow
|
||||
return None
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg='Could not copy authentication flow %s in realm %s: %s'
|
||||
% (config["alias"], realm, str(e)))
|
||||
|
||||
def create_empty_auth_flow(self, config, realm='master'):
|
||||
"""
|
||||
Create a new empty authentication flow.
|
||||
:param config: Representation of the authentication flow to create.
|
||||
:param realm: Realm.
|
||||
:return: Representation of the new authentication flow.
|
||||
"""
|
||||
try:
|
||||
new_flow = dict(
|
||||
alias=config["alias"],
|
||||
providerId=config["providerId"],
|
||||
description=config["description"],
|
||||
topLevel=True
|
||||
)
|
||||
open_url(
|
||||
URL_AUTHENTICATION_FLOWS.format(
|
||||
url=self.baseurl,
|
||||
realm=realm),
|
||||
method='POST',
|
||||
headers=self.restheaders,
|
||||
data=json.dumps(new_flow))
|
||||
flow_list = json.load(
|
||||
open_url(
|
||||
URL_AUTHENTICATION_FLOWS.format(
|
||||
url=self.baseurl,
|
||||
realm=realm),
|
||||
method='GET',
|
||||
headers=self.restheaders))
|
||||
for flow in flow_list:
|
||||
if flow["alias"] == config["alias"]:
|
||||
return flow
|
||||
return None
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg='Could not create empty authentication flow %s in realm %s: %s'
|
||||
% (config["alias"], realm, str(e)))
|
||||
|
||||
def update_authentication_executions(self, flowAlias, updatedExec, realm='master'):
|
||||
""" Update authentication executions
|
||||
|
||||
:param flowAlias: name of the parent flow
|
||||
:param updatedExec: JSON containing updated execution
|
||||
:return: HTTPResponse object on success
|
||||
"""
|
||||
try:
|
||||
open_url(
|
||||
URL_AUTHENTICATION_FLOW_EXECUTIONS.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
flowalias=quote(flowAlias)),
|
||||
method='PUT',
|
||||
headers=self.restheaders,
|
||||
data=json.dumps(updatedExec))
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg="Unable to update executions %s: %s" % (updatedExec, str(e)))
|
||||
|
||||
def add_authenticationConfig_to_execution(self, executionId, authenticationConfig, realm='master'):
|
||||
""" Add autenticatorConfig to the execution
|
||||
|
||||
:param executionId: id of execution
|
||||
:param authenticationConfig: config to add to the execution
|
||||
:return: HTTPResponse object on success
|
||||
"""
|
||||
try:
|
||||
open_url(
|
||||
URL_AUTHENTICATION_EXECUTION_CONFIG.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
id=executionId),
|
||||
method='POST',
|
||||
headers=self.restheaders,
|
||||
data=json.dumps(authenticationConfig))
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg="Unable to add authenticationConfig %s: %s" % (executionId, str(e)))
|
||||
|
||||
def create_subflow(self, subflowName, flowAlias, realm='master'):
|
||||
""" Create new sublow on the flow
|
||||
|
||||
:param subflowName: name of the subflow to create
|
||||
:param flowAlias: name of the parent flow
|
||||
:return: HTTPResponse object on success
|
||||
"""
|
||||
try:
|
||||
newSubFlow = {}
|
||||
newSubFlow["alias"] = subflowName
|
||||
newSubFlow["provider"] = "registration-page-form"
|
||||
newSubFlow["type"] = "basic-flow"
|
||||
open_url(
|
||||
URL_AUTHENTICATION_FLOW_EXECUTIONS_FLOW.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
flowalias=quote(flowAlias)),
|
||||
method='POST',
|
||||
headers=self.restheaders,
|
||||
data=json.dumps(newSubFlow))
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg="Unable to create new subflow %s: %s" % (subflowName, str(e)))
|
||||
|
||||
def create_execution(self, execution, flowAlias, realm='master'):
|
||||
""" Create new execution on the flow
|
||||
|
||||
:param execution: name of execution to create
|
||||
:param flowAlias: name of the parent flow
|
||||
:return: HTTPResponse object on success
|
||||
"""
|
||||
try:
|
||||
newExec = {}
|
||||
newExec["provider"] = execution["providerId"]
|
||||
newExec["requirement"] = execution["requirement"]
|
||||
open_url(
|
||||
URL_AUTHENTICATION_FLOW_EXECUTIONS_EXECUTION.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
flowalias=quote(flowAlias)),
|
||||
method='POST',
|
||||
headers=self.restheaders,
|
||||
data=json.dumps(newExec))
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg="Unable to create new execution %s: %s" % (execution["provider"], str(e)))
|
||||
|
||||
def change_execution_priority(self, executionId, diff, realm='master'):
|
||||
""" Raise or lower execution priority of diff time
|
||||
|
||||
:param executionId: id of execution to lower priority
|
||||
:param realm: realm the client is in
|
||||
:param diff: Integer number, raise of diff time if positive lower of diff time if negative
|
||||
:return: HTTPResponse object on success
|
||||
"""
|
||||
try:
|
||||
if diff > 0:
|
||||
for i in range(diff):
|
||||
open_url(
|
||||
URL_AUTHENTICATION_EXECUTION_RAISE_PRIORITY.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
id=executionId),
|
||||
method='POST',
|
||||
headers=self.restheaders)
|
||||
elif diff < 0:
|
||||
for i in range(-diff):
|
||||
open_url(
|
||||
URL_AUTHENTICATION_EXECUTION_LOWER_PRIORITY.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
id=executionId),
|
||||
method='POST',
|
||||
headers=self.restheaders)
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg="Unable to change execution priority %s: %s" % (executionId, str(e)))
|
||||
|
||||
def get_executions_representation(self, config, realm='master'):
|
||||
"""
|
||||
Get a representation of the executions for an authentication flow.
|
||||
:param config: Representation of the authentication flow
|
||||
:param realm: Realm
|
||||
:return: Representation of the executions
|
||||
"""
|
||||
try:
|
||||
# Get executions created
|
||||
executions = json.load(
|
||||
open_url(
|
||||
URL_AUTHENTICATION_FLOW_EXECUTIONS.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
flowalias=quote(config["alias"])),
|
||||
method='GET',
|
||||
headers=self.restheaders))
|
||||
for execution in executions:
|
||||
if "authenticationConfig" in execution:
|
||||
execConfigId = execution["authenticationConfig"]
|
||||
execConfig = json.load(
|
||||
open_url(
|
||||
URL_AUTHENTICATION_CONFIG.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
id=execConfigId),
|
||||
method='GET',
|
||||
headers=self.restheaders))
|
||||
execution["authenticationConfig"] = execConfig
|
||||
return executions
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg='Could not get executions for authentication flow %s in realm %s: %s'
|
||||
% (config["alias"], realm, str(e)))
|
||||
|
||||
@@ -18,7 +18,7 @@ import socket
|
||||
import uuid
|
||||
|
||||
import re
|
||||
from ansible.module_utils._text import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||
from ansible.module_utils.six import PY3
|
||||
from ansible.module_utils.six.moves.urllib.parse import quote
|
||||
from ansible.module_utils.urls import fetch_url, HAS_GSSAPI
|
||||
|
||||
@@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
import traceback
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
try:
|
||||
import ldap
|
||||
|
||||
@@ -20,7 +20,7 @@ import ssl
|
||||
from ansible.module_utils.urls import generic_urlparse
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||
from ansible.module_utils.six.moves import http_client
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
# httplib/http.client connection using unix domain socket
|
||||
HTTPConnection = http_client.HTTPConnection
|
||||
|
||||
@@ -59,4 +59,7 @@ class ModuleHelperBase(object):
|
||||
self.__init_module__()
|
||||
self.__run__()
|
||||
self.__quit_module__()
|
||||
self.module.exit_json(changed=self.has_changed(), **self.output)
|
||||
output = self.output
|
||||
if 'failed' not in output:
|
||||
output['failed'] = False
|
||||
self.module.exit_json(changed=self.has_changed(), **output)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
import copy
|
||||
|
||||
|
||||
class VarMeta(object):
|
||||
NOTHING = object()
|
||||
@@ -30,11 +32,11 @@ class VarMeta(object):
|
||||
if fact is not None:
|
||||
self.fact = fact
|
||||
if initial_value is not self.NOTHING:
|
||||
self.initial_value = initial_value
|
||||
self.initial_value = copy.deepcopy(initial_value)
|
||||
|
||||
def set_value(self, value):
|
||||
if not self.init:
|
||||
self.initial_value = value
|
||||
self.initial_value = copy.deepcopy(value)
|
||||
self.init = True
|
||||
self.value = value
|
||||
return self
|
||||
|
||||
@@ -14,9 +14,9 @@ __metaclass__ = type
|
||||
|
||||
import os
|
||||
from functools import partial
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.basic import env_fallback
|
||||
from ansible.module_utils.common.validation import check_type_dict
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ except ImportError:
|
||||
|
||||
from ansible.module_utils import six
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ except ImportError:
|
||||
HAS_OCI_PY_SDK = False
|
||||
|
||||
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
__version__ = "1.6.0-dev"
|
||||
|
||||
@@ -6,8 +6,8 @@ __metaclass__ = type
|
||||
|
||||
import json
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.six.moves import http_client
|
||||
from ansible.module_utils.six.moves.urllib.error import URLError, HTTPError
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||
|
||||
@@ -7,7 +7,7 @@ __metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.basic import env_fallback
|
||||
from ansible.module_utils.urls import fetch_url, basic_auth_header
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ __metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.urls import fetch_url
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ try:
|
||||
except ImportError:
|
||||
HAS_VEXATAPI = False
|
||||
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.basic import env_fallback
|
||||
|
||||
VXOS_VERSION = None
|
||||
|
||||
@@ -35,12 +35,14 @@ description:
|
||||
options:
|
||||
availability_zone:
|
||||
description:
|
||||
- (Deprecated) Aliyun availability zone ID in which to launch the instance. Please use filter item 'zone_id' instead.
|
||||
- Aliyun availability zone ID in which to launch the instance.
|
||||
- Deprecated parameter, it will be removed in community.general 5.0.0. Please use filter item I(zone_id) instead.
|
||||
aliases: ['alicloud_zone']
|
||||
type: str
|
||||
instance_names:
|
||||
description:
|
||||
- (Deprecated) A list of ECS instance names. Please use filter item 'instance_name' instead.
|
||||
- A list of ECS instance names.
|
||||
- Deprecated parameter, it will be removed in community.general 5.0.0. Please use filter item I(instance_name) instead.
|
||||
aliases: ["names"]
|
||||
type: list
|
||||
elements: str
|
||||
@@ -374,8 +376,10 @@ except ImportError:
|
||||
def main():
|
||||
argument_spec = ecs_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
availability_zone=dict(aliases=['alicloud_zone']),
|
||||
instance_ids=dict(type='list', elements='str', aliases=['ids']),
|
||||
availability_zone=dict(aliases=['alicloud_zone'],
|
||||
removed_in_version="5.0.0", removed_from_collection="community.general"),
|
||||
instance_ids=dict(type='list', elements='str', aliases=['ids'],
|
||||
removed_in_version="5.0.0", removed_from_collection="community.general"),
|
||||
instance_names=dict(type='list', elements='str', aliases=['names']),
|
||||
name_prefix=dict(type='str'),
|
||||
tags=dict(type='dict', aliases=['instance_tags']),
|
||||
|
||||
@@ -95,7 +95,7 @@ msg:
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
def do_install(module, mode, rootfs, container, image, values_list, backend):
|
||||
|
||||
@@ -52,7 +52,7 @@ import os
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
def core(module):
|
||||
|
||||
@@ -69,7 +69,7 @@ msg:
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
def do_upgrade(module, image):
|
||||
|
||||
@@ -113,7 +113,7 @@ import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.dimensiondata import HAS_LIBCLOUD, DimensionDataModule
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
if HAS_LIBCLOUD:
|
||||
from libcloud.compute.base import NodeLocation
|
||||
|
||||
@@ -433,7 +433,7 @@ else:
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE
|
||||
from ansible.module_utils.six.moves import xrange
|
||||
from ansible.module_utils._text import to_text, to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_text, to_bytes
|
||||
|
||||
|
||||
# LXC_COMPRESSION_MAP is a map of available compression types when creating
|
||||
|
||||
@@ -85,7 +85,7 @@ cloud_init_data_facts:
|
||||
import os
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
CLOUD_INIT_PATH = "/var/lib/cloud/data"
|
||||
|
||||
@@ -364,7 +364,7 @@ except ImportError:
|
||||
HAS_PROXMOXER = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
VZ_TYPE = None
|
||||
|
||||
@@ -771,7 +771,7 @@ except ImportError:
|
||||
HAS_PROXMOXER = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
def get_nextvmid(module, proxmox):
|
||||
@@ -818,23 +818,25 @@ def get_vminfo(module, proxmox, node, vmid, **kwargs):
|
||||
# Split information by type
|
||||
re_net = re.compile(r'net[0-9]')
|
||||
re_dev = re.compile(r'(virtio|ide|scsi|sata)[0-9]')
|
||||
for k, v in kwargs.items():
|
||||
for k in kwargs.keys():
|
||||
if re_net.match(k):
|
||||
interface = k
|
||||
k = vm[k]
|
||||
k = re.search('=(.*?),', k).group(1)
|
||||
mac[interface] = k
|
||||
mac[k] = parse_mac(vm[k])
|
||||
elif re_dev.match(k):
|
||||
device = k
|
||||
k = vm[k]
|
||||
k = re.search('(.*?),', k).group(1)
|
||||
devices[device] = k
|
||||
devices[k] = parse_dev(vm[k])
|
||||
|
||||
results['mac'] = mac
|
||||
results['devices'] = devices
|
||||
results['vmid'] = int(vmid)
|
||||
|
||||
|
||||
def parse_mac(netstr):
|
||||
return re.search('=(.*?),', netstr).group(1)
|
||||
|
||||
|
||||
def parse_dev(devstr):
|
||||
return re.search('(.*?)(,|$)', devstr).group(1)
|
||||
|
||||
|
||||
def settings(proxmox, vmid, node, **kwargs):
|
||||
proxmox_node = proxmox.nodes(node)
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ except ImportError:
|
||||
HAS_PROXMOXER = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib, env_fallback
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
VZ_TYPE = None
|
||||
|
||||
@@ -38,6 +38,7 @@ options:
|
||||
description:
|
||||
- A list of specific functions to deploy.
|
||||
- If this is not provided, all functions in the service will be deployed.
|
||||
- Deprecated parameter, it will be removed in community.general 5.0.0.
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
@@ -79,13 +80,6 @@ EXAMPLES = r'''
|
||||
service_path: '{{ project_dir }}'
|
||||
state: present
|
||||
|
||||
- name: Deploy specific functions
|
||||
community.general.serverless:
|
||||
service_path: '{{ project_dir }}'
|
||||
functions:
|
||||
- my_func_one
|
||||
- my_func_two
|
||||
|
||||
- name: Deploy a project, then pull its resource list back into Ansible
|
||||
community.general.serverless:
|
||||
stage: dev
|
||||
@@ -165,7 +159,8 @@ def main():
|
||||
argument_spec=dict(
|
||||
service_path=dict(type='path', required=True),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present']),
|
||||
functions=dict(type='list', elements='str'),
|
||||
functions=dict(type='list', elements='str',
|
||||
removed_in_version="5.0.0", removed_from_collection="community.general"),
|
||||
region=dict(type='str', default=''),
|
||||
stage=dict(type='str', default=''),
|
||||
deploy=dict(type='bool', default=True),
|
||||
|
||||
@@ -130,6 +130,13 @@ options:
|
||||
default: false
|
||||
type: bool
|
||||
version_added: '1.3.0'
|
||||
check_destroy:
|
||||
description:
|
||||
- Apply only when no resources are destroyed. Note that this only prevents "destroy" actions,
|
||||
but not "destroy and re-create" actions. This option is ignored when I(state=absent).
|
||||
type: bool
|
||||
default: false
|
||||
version_added: '3.3.0'
|
||||
notes:
|
||||
- To just run a `terraform plan`, use check mode.
|
||||
requirements: [ "terraform" ]
|
||||
@@ -313,7 +320,7 @@ def build_plan(command, project_path, variables_args, state_file, targets, state
|
||||
|
||||
plan_command = [command[0], 'plan', '-input=false', '-no-color', '-detailed-exitcode', '-out', plan_path]
|
||||
|
||||
for t in (module.params.get('targets') or []):
|
||||
for t in targets:
|
||||
plan_command.extend(['-target', t])
|
||||
|
||||
plan_command.extend(_state_args(state_file))
|
||||
@@ -340,21 +347,22 @@ def main():
|
||||
project_path=dict(required=True, type='path'),
|
||||
binary_path=dict(type='path'),
|
||||
plugin_paths=dict(type='list', elements='path'),
|
||||
workspace=dict(required=False, type='str', default='default'),
|
||||
workspace=dict(type='str', default='default'),
|
||||
purge_workspace=dict(type='bool', default=False),
|
||||
state=dict(default='present', choices=['present', 'absent', 'planned']),
|
||||
variables=dict(type='dict'),
|
||||
variables_files=dict(aliases=['variables_file'], type='list', elements='path', default=None),
|
||||
variables_files=dict(aliases=['variables_file'], type='list', elements='path'),
|
||||
plan_file=dict(type='path'),
|
||||
state_file=dict(type='path'),
|
||||
targets=dict(type='list', elements='str', default=[]),
|
||||
lock=dict(type='bool', default=True),
|
||||
lock_timeout=dict(type='int',),
|
||||
force_init=dict(type='bool', default=False),
|
||||
backend_config=dict(type='dict', default=None),
|
||||
backend_config_files=dict(type='list', elements='path', default=None),
|
||||
init_reconfigure=dict(required=False, type='bool', default=False),
|
||||
backend_config=dict(type='dict'),
|
||||
backend_config_files=dict(type='list', elements='path'),
|
||||
init_reconfigure=dict(type='bool', default=False),
|
||||
overwrite_init=dict(type='bool', default=True),
|
||||
check_destroy=dict(type='bool', default=False),
|
||||
),
|
||||
required_if=[('state', 'planned', ['plan_file'])],
|
||||
supports_check_mode=True,
|
||||
@@ -375,6 +383,7 @@ def main():
|
||||
backend_config_files = module.params.get('backend_config_files')
|
||||
init_reconfigure = module.params.get('init_reconfigure')
|
||||
overwrite_init = module.params.get('overwrite_init')
|
||||
check_destroy = module.params.get('check_destroy')
|
||||
|
||||
if bin_path is not None:
|
||||
command = [bin_path]
|
||||
@@ -444,9 +453,12 @@ def main():
|
||||
else:
|
||||
plan_file, needs_application, out, err, command = build_plan(command, project_path, variables_args, state_file,
|
||||
module.params.get('targets'), state, plan_file)
|
||||
if state == 'present' and check_destroy and '- destroy' in out:
|
||||
module.fail_json(msg="Aborting command because it would destroy some resources. "
|
||||
"Consider switching the 'check_destroy' to false to suppress this error")
|
||||
command.append(plan_file)
|
||||
|
||||
if needs_application and not module.check_mode and not state == 'planned':
|
||||
if needs_application and not module.check_mode and state != 'planned':
|
||||
rc, out, err = module.run_command(command, check_rc=False, cwd=project_path)
|
||||
if rc != 0:
|
||||
if workspace_ctx["current"] != workspace:
|
||||
|
||||
@@ -275,7 +275,7 @@ import uuid
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
HAS_PACKET_SDK = True
|
||||
try:
|
||||
|
||||
@@ -151,7 +151,7 @@ import uuid
|
||||
import re
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
HAS_PACKET_SDK = True
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ id:
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
HAS_PACKET_SDK = True
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ description:
|
||||
import uuid
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
HAS_PACKET_SDK = True
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ device_id:
|
||||
import uuid
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
HAS_PACKET_SDK = True
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ except ImportError:
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six.moves import xrange
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
LOCATIONS = ['us/las',
|
||||
|
||||
@@ -149,7 +149,7 @@ except ImportError:
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six.moves import xrange
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
uuid_match = re.compile(
|
||||
|
||||
@@ -247,7 +247,7 @@ except ImportError:
|
||||
exceptions = None
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
def pubnub_user(module):
|
||||
|
||||
@@ -77,7 +77,7 @@ except ImportError:
|
||||
HAS_PYRAX = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible_collections.community.general.plugins.module_utils.rax import rax_argument_spec, rax_required_together, rax_to_dict, setup_rax_module
|
||||
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ data:
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway, payload_from_object
|
||||
from ansible_collections.community.general.plugins.module_utils.compat.ipaddress import ip_network
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ import traceback
|
||||
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
# While vmadm(1M) supports a -E option to return any errors in JSON, the
|
||||
# generated JSON does not play well with the JSON parsers of Python.
|
||||
|
||||
@@ -217,7 +217,7 @@ EXAMPLES = '''
|
||||
datacenter: dal09
|
||||
tags:
|
||||
- ansible-module-test
|
||||
- ansible-module-test-slaves
|
||||
- ansible-module-test-replicas
|
||||
hourly: yes
|
||||
private: no
|
||||
dedicated: no
|
||||
@@ -235,7 +235,7 @@ EXAMPLES = '''
|
||||
datacenter: dal09
|
||||
tags:
|
||||
- ansible-module-test
|
||||
- ansible-module-test-slaves
|
||||
- ansible-module-test-replicas
|
||||
hourly: yes
|
||||
private: no
|
||||
dedicated: no
|
||||
|
||||
@@ -136,7 +136,7 @@ EXAMPLES = '''
|
||||
state: acquire
|
||||
'''
|
||||
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
try:
|
||||
import consul
|
||||
|
||||
@@ -119,7 +119,7 @@ old_value:
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
try:
|
||||
|
||||
@@ -84,7 +84,7 @@ EXAMPLES = '''
|
||||
import json
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
import_nomad = None
|
||||
try:
|
||||
|
||||
@@ -270,7 +270,7 @@ import os
|
||||
import json
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
import_nomad = None
|
||||
try:
|
||||
|
||||
@@ -108,7 +108,7 @@ except ImportError:
|
||||
KAZOO_INSTALLED = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user