mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-28 09:26:44 +00:00
Compare commits
170 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4741d8ff6 | ||
|
|
d9c12d1d53 | ||
|
|
29c4cff580 | ||
|
|
1d07d6e3b5 | ||
|
|
3b9a571bd4 | ||
|
|
009c88dc64 | ||
|
|
e9356ad8fa | ||
|
|
7c18dbaf70 | ||
|
|
95d8364025 | ||
|
|
48b0a48b76 | ||
|
|
ef3d81b947 | ||
|
|
a0e32eaf62 | ||
|
|
0e17d74b15 | ||
|
|
a1682efa38 | ||
|
|
0fda418702 | ||
|
|
ca561aead8 | ||
|
|
58e56e11bd | ||
|
|
3df8ac28e1 | ||
|
|
1da0db4984 | ||
|
|
4281331639 | ||
|
|
0ba92cd677 | ||
|
|
8df0c82b8b | ||
|
|
af0ee5438c | ||
|
|
4391507a72 | ||
|
|
acc77182bb | ||
|
|
34f963e2f4 | ||
|
|
e3e25b60d3 | ||
|
|
754cd31195 | ||
|
|
641f8b3059 | ||
|
|
03d33a1d09 | ||
|
|
ce92da7e70 | ||
|
|
ea873ae471 | ||
|
|
859bebbfc5 | ||
|
|
257b268746 | ||
|
|
55ce4af134 | ||
|
|
f6afc0f019 | ||
|
|
16eb0b8749 | ||
|
|
e8eb6c1163 | ||
|
|
21c16ae0b3 | ||
|
|
175c481236 | ||
|
|
85d1fecd80 | ||
|
|
05aaeb3fce | ||
|
|
d5cf5bf567 | ||
|
|
024ef1d782 | ||
|
|
4e06d778ab | ||
|
|
72d0c21f56 | ||
|
|
f9438bd3c6 | ||
|
|
76377dd5bf | ||
|
|
f22fd3c121 | ||
|
|
640f5fd860 | ||
|
|
c670216e27 | ||
|
|
ed8de04cab | ||
|
|
7c4e11f504 | ||
|
|
5ee3d77924 | ||
|
|
9b4dd42813 | ||
|
|
049cace2e7 | ||
|
|
6418098602 | ||
|
|
4177da9560 | ||
|
|
d451fc6292 | ||
|
|
b3450ab331 | ||
|
|
eac1dfdc78 | ||
|
|
930b64226c | ||
|
|
885bb73cc6 | ||
|
|
6afde82f2c | ||
|
|
62d53eb3cf | ||
|
|
1ae9bcc2dd | ||
|
|
1533b5b244 | ||
|
|
99295fac75 | ||
|
|
434ff80ec6 | ||
|
|
be6d3e9aa1 | ||
|
|
b06d46f4d1 | ||
|
|
acea90ceec | ||
|
|
034d09532e | ||
|
|
f815bef3d1 | ||
|
|
e205494c8c | ||
|
|
1541eecd0e | ||
|
|
6cd87580da | ||
|
|
d227ace4a0 | ||
|
|
e7770b9132 | ||
|
|
d0f1d9efd9 | ||
|
|
22f0747e03 | ||
|
|
2ee7de681a | ||
|
|
2e20e9bb8f | ||
|
|
9d9e2bd797 | ||
|
|
d9aa9e8021 | ||
|
|
a9eeced6d7 | ||
|
|
066b306deb | ||
|
|
7426c3839e | ||
|
|
4d6735bebf | ||
|
|
1ceed02048 | ||
|
|
6dc31b13c3 | ||
|
|
c7899e384a | ||
|
|
35c8bbec8a | ||
|
|
87c37ea441 | ||
|
|
0f7e39fa1a | ||
|
|
cde48c3c03 | ||
|
|
778c91caa7 | ||
|
|
61258c9216 | ||
|
|
99e0f8a3a0 | ||
|
|
2dd159493b | ||
|
|
28caeff7bd | ||
|
|
76cf21a05b | ||
|
|
64248acce6 | ||
|
|
8ed5beb978 | ||
|
|
9b7194be53 | ||
|
|
984d9d91b8 | ||
|
|
071d89acac | ||
|
|
afc620fc74 | ||
|
|
acae2a11aa | ||
|
|
f17690e7d0 | ||
|
|
4ca716a1cf | ||
|
|
92f1a33d80 | ||
|
|
c9e07d19d8 | ||
|
|
c7bffaf270 | ||
|
|
1b0f4fdd28 | ||
|
|
02ea90f680 | ||
|
|
6d08dcdef3 | ||
|
|
8dd00a2b9b | ||
|
|
a090e2ff85 | ||
|
|
ca0b1efa5b | ||
|
|
b2f01f4c20 | ||
|
|
81b390b7dc | ||
|
|
9c7eed43a8 | ||
|
|
6999881985 | ||
|
|
d746293884 | ||
|
|
7b2853d9aa | ||
|
|
e05e7babbe | ||
|
|
01773c5338 | ||
|
|
e46e6e4dd0 | ||
|
|
270e3df416 | ||
|
|
d9524bae93 | ||
|
|
77fc407a73 | ||
|
|
2d73089ddc | ||
|
|
7a185cef08 | ||
|
|
6158b5f56b | ||
|
|
1b05e03384 | ||
|
|
0f0eb53efa | ||
|
|
6b58e784af | ||
|
|
7d644ef3d4 | ||
|
|
9db69a62b2 | ||
|
|
1c23ab8d44 | ||
|
|
96c5ceee97 | ||
|
|
768512645d | ||
|
|
66656abe17 | ||
|
|
022a7834df | ||
|
|
09de2dfd77 | ||
|
|
bb910f6aa1 | ||
|
|
56d8554b70 | ||
|
|
4fa140d896 | ||
|
|
5fc3f9c766 | ||
|
|
0f53fba20a | ||
|
|
d6c3661e3e | ||
|
|
b18c88248b | ||
|
|
fd5e05cc77 | ||
|
|
56a1d3ffd6 | ||
|
|
f1477ec8db | ||
|
|
2fb1dc0cf7 | ||
|
|
b9b4837d72 | ||
|
|
9ea8f41ebb | ||
|
|
b1fe3e34f3 | ||
|
|
841286444e | ||
|
|
4c13f10a05 | ||
|
|
9b844fc8d5 | ||
|
|
92514ee143 | ||
|
|
6621eb8b87 | ||
|
|
f4b4a2813a | ||
|
|
6f2cb85fae | ||
|
|
5cdc70bda9 | ||
|
|
89498d3650 | ||
|
|
c553351563 |
@@ -13,13 +13,25 @@ pr:
|
||||
- stable-*
|
||||
|
||||
schedules:
|
||||
- cron: 0 9 * * *
|
||||
displayName: Nightly
|
||||
- cron: 0 8 * * *
|
||||
displayName: Nightly (main)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable-*
|
||||
- cron: 0 10 * * *
|
||||
displayName: Nightly (active stable branches)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- stable-2
|
||||
- stable-3
|
||||
- cron: 0 11 * * 0
|
||||
displayName: Weekly (old stable branches)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- stable-1
|
||||
|
||||
variables:
|
||||
- name: checkoutPath
|
||||
@@ -112,6 +124,7 @@ stages:
|
||||
- test: 3.7
|
||||
- test: 3.8
|
||||
- test: 3.9
|
||||
- test: '3.10'
|
||||
- stage: Units_2_11
|
||||
displayName: Units 2.11
|
||||
dependsOn: []
|
||||
@@ -173,12 +186,12 @@ stages:
|
||||
test: macos/11.1
|
||||
- name: RHEL 7.9
|
||||
test: rhel/7.9
|
||||
- name: RHEL 8.3
|
||||
test: rhel/8.3
|
||||
- name: FreeBSD 11.4
|
||||
test: freebsd/11.4
|
||||
- name: RHEL 8.4
|
||||
test: rhel/8.4
|
||||
- name: FreeBSD 12.2
|
||||
test: freebsd/12.2
|
||||
- name: FreeBSD 13.0
|
||||
test: freebsd/13.0
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
@@ -256,10 +269,10 @@ stages:
|
||||
test: centos7
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 32
|
||||
test: fedora32
|
||||
- name: Fedora 33
|
||||
test: fedora33
|
||||
- name: Fedora 34
|
||||
test: fedora34
|
||||
- name: openSUSE 15 py2
|
||||
test: opensuse15py2
|
||||
- name: openSUSE 15 py3
|
||||
@@ -282,7 +295,7 @@ stages:
|
||||
targets:
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 32
|
||||
- name: Fedora 33
|
||||
test: fedora33
|
||||
- name: openSUSE 15 py3
|
||||
test: opensuse15
|
||||
|
||||
@@ -7,7 +7,7 @@ set -o pipefail -eu
|
||||
|
||||
output_path="$1"
|
||||
|
||||
curl --silent --show-error https://codecov.io/bash > codecov.sh
|
||||
curl --silent --show-error https://ansible-ci-files.s3.us-east-1.amazonaws.com/codecov/codecov.sh > codecov.sh
|
||||
|
||||
for file in "${output_path}"/reports/coverage*.xml; do
|
||||
name="${file}"
|
||||
|
||||
53
.github/BOTMETA.yml
vendored
53
.github/BOTMETA.yml
vendored
@@ -1,22 +1,21 @@
|
||||
automerge: true
|
||||
files:
|
||||
plugins/:
|
||||
supershipit: aminvakil russoz
|
||||
supershipit: quidame Ajpantuso
|
||||
changelogs/fragments/:
|
||||
support: community
|
||||
$actions:
|
||||
labels: action
|
||||
$actions/aireos.py:
|
||||
labels: aireos cisco networking
|
||||
$actions/ironware.py:
|
||||
maintainers: paulquack
|
||||
labels: ironware networking
|
||||
$actions/shutdown.py:
|
||||
$actions/system/iptables_state.py:
|
||||
maintainers: quidame
|
||||
$actions/system/shutdown.py:
|
||||
maintainers: nitzmahone samdoran aminvakil
|
||||
$becomes/:
|
||||
labels: become
|
||||
$callbacks/:
|
||||
labels: callbacks
|
||||
$callbacks/loganalytics.py:
|
||||
maintainers: zhcli
|
||||
$callbacks/logstash.py:
|
||||
maintainers: ujenmr
|
||||
$callbacks/say.py:
|
||||
@@ -59,6 +58,8 @@ files:
|
||||
maintainers: felixfontein
|
||||
$filters/dict_kv.py:
|
||||
maintainers: giner
|
||||
$filters/from_csv.py:
|
||||
maintainers: Ajpantuso
|
||||
$filters/jc.py:
|
||||
maintainers: kellyjonbrazil
|
||||
$filters/list.py:
|
||||
@@ -67,6 +68,8 @@ files:
|
||||
maintainers: felixfontein
|
||||
$filters/time.py:
|
||||
maintainers: resmo
|
||||
$filters/version_sort.py:
|
||||
maintainers: ericzolf
|
||||
$httpapis/:
|
||||
maintainers: $team_networking
|
||||
labels: networking
|
||||
@@ -80,6 +83,8 @@ files:
|
||||
maintainers: $team_linode
|
||||
labels: cloud linode
|
||||
keywords: linode dynamic inventory script
|
||||
$inventories/proxmox.py:
|
||||
maintainers: $team_virt ilijamt
|
||||
$inventories/scaleway.py:
|
||||
maintainers: $team_scaleway
|
||||
labels: cloud scaleway
|
||||
@@ -181,6 +186,8 @@ files:
|
||||
maintainers: zbal
|
||||
$modules/cloud/lxc/lxc_container.py:
|
||||
maintainers: cloudnull
|
||||
$modules/cloud/lxc/lxc_profile.py:
|
||||
maintainers: conloos
|
||||
$modules/cloud/lxd/:
|
||||
ignore: hnakamur
|
||||
$modules/cloud/memset/:
|
||||
@@ -216,7 +223,7 @@ files:
|
||||
$modules/cloud/misc/:
|
||||
ignore: ryansb
|
||||
$modules/cloud/misc/terraform.py:
|
||||
maintainers: m-yosefpor
|
||||
maintainers: m-yosefpor rainerleber
|
||||
$modules/cloud/misc/xenserver_facts.py:
|
||||
maintainers: caphrim007 cheese
|
||||
labels: xenserver_facts
|
||||
@@ -300,6 +307,7 @@ files:
|
||||
maintainers: bvitnik
|
||||
$modules/clustering/consul/:
|
||||
maintainers: $team_consul
|
||||
ignore: colin-nolan
|
||||
$modules/clustering/etcd3.py:
|
||||
maintainers: evrardjp
|
||||
ignore: vfauth
|
||||
@@ -424,6 +432,8 @@ files:
|
||||
maintainers: andsens
|
||||
$modules/monitoring/spectrum_device.py:
|
||||
maintainers: orgito
|
||||
$modules/monitoring/spectrum_model_attrs.py:
|
||||
maintainers: tgates81
|
||||
$modules/monitoring/stackdriver.py:
|
||||
maintainers: bwhaley
|
||||
$modules/monitoring/statsd.py:
|
||||
@@ -440,7 +450,7 @@ files:
|
||||
$modules/net_tools/dnsmadeeasy.py:
|
||||
maintainers: briceburg
|
||||
$modules/net_tools/haproxy.py:
|
||||
maintainers: ravibhure
|
||||
maintainers: ravibhure Normo
|
||||
$modules/net_tools/:
|
||||
maintainers: nerzhul
|
||||
$modules/net_tools/infinity/infinity.py:
|
||||
@@ -550,7 +560,8 @@ files:
|
||||
$modules/packaging/language/bundler.py:
|
||||
maintainers: thoiberg
|
||||
$modules/packaging/language/composer.py:
|
||||
maintainers: dmtrs resmo
|
||||
maintainers: dmtrs
|
||||
ignore: resmo
|
||||
$modules/packaging/language/cpanm.py:
|
||||
maintainers: fcuny
|
||||
$modules/packaging/language/easy_install.py:
|
||||
@@ -697,7 +708,9 @@ files:
|
||||
labels: zypper
|
||||
ignore: dirtyharrycallahan robinro
|
||||
$modules/packaging/os/zypper_repository.py:
|
||||
maintainers: matze
|
||||
maintainers: $team_suse
|
||||
labels: zypper
|
||||
ignore: matze
|
||||
$modules/remote_management/cobbler/:
|
||||
maintainers: dagwieers
|
||||
$modules/remote_management/dellemc/:
|
||||
@@ -759,6 +772,8 @@ files:
|
||||
ignore: erydo
|
||||
$modules/source_control/github/github_release.py:
|
||||
maintainers: adrianmoisey
|
||||
$modules/source_control/github/github_repo.py:
|
||||
maintainers: atorrescogollo
|
||||
$modules/source_control/github/:
|
||||
maintainers: stpierre
|
||||
$modules/source_control/gitlab/:
|
||||
@@ -841,8 +856,10 @@ files:
|
||||
labels: interfaces_file
|
||||
$modules/system/iptables_state.py:
|
||||
maintainers: quidame
|
||||
$modules/system/shutdown.py:
|
||||
maintainers: nitzmahone samdoran aminvakil
|
||||
$modules/system/java_cert.py:
|
||||
maintainers: haad
|
||||
maintainers: haad absynth76
|
||||
$modules/system/java_keystore.py:
|
||||
maintainers: Mogztter
|
||||
$modules/system/kernel_blacklist.py:
|
||||
@@ -1012,14 +1029,14 @@ macros:
|
||||
terminals: plugins/terminal
|
||||
team_aix: MorrisA bcoca d-little flynn1973 gforster kairoaraujo marvin-sinister mator molekuul ramooncamacho wtcross
|
||||
team_bsd: JoergFiedler MacLemon bcoca dch jasperla mekanix opoplawski overhacked tuxillo
|
||||
team_consul: colin-nolan sgargan
|
||||
team_consul: sgargan
|
||||
team_cyberark_conjur: jvanderhoof ryanprior
|
||||
team_e_spirit: MatrixCrawler getjack
|
||||
team_flatpak: JayKayy oolongbrothers
|
||||
team_gitlab: Lunik Shaps dj-wasabi marwatk waheedi zanssa scodeman
|
||||
team_gitlab: Lunik Shaps dj-wasabi marwatk waheedi zanssa scodeman metanovii
|
||||
team_hpux: bcoca davx8342
|
||||
team_huawei: QijunPan TommyLike edisonxiang freesky-edward hwDCN niuzhenguo xuxiaowei0512 yanzhangi zengchen1024 zhongjun2
|
||||
team_ipa: Akasurde Nosmoht fxfitz
|
||||
team_ipa: Akasurde Nosmoht fxfitz justchris1
|
||||
team_jboss: Wolfant jairojunior wbrefvem
|
||||
team_keycloak: eikef ndclt
|
||||
team_linode: InTheCloudDan decentral1se displague rmcintosh Charliekenney23 LBGarber
|
||||
@@ -1027,12 +1044,12 @@ macros:
|
||||
team_manageiq: abellotti cben gtanzillo yaacov zgalor dkorn evertmulder
|
||||
team_netapp: amit0701 carchi8py hulquest lmprice lonico ndswartz schmots1
|
||||
team_networking: NilashishC Qalthos danielmellado ganeshrn justjais trishnaguha sganesh-infoblox privateip
|
||||
team_opennebula: ilicmilan meerkampdvv rsmontero xorel
|
||||
team_opennebula: ilicmilan meerkampdvv rsmontero xorel nilsding
|
||||
team_oracle: manojmeda mross22 nalsaber
|
||||
team_purestorage: bannaych dnix101 genegr lionmax opslounge raekins sdodsley sile16
|
||||
team_redfish: mraineri tomasg2012 xmadsen renxulei
|
||||
team_rhn: FlossWare alikins barnabycourt vritant
|
||||
team_scaleway: QuentinBrosse abarbare jerome-quere kindermoumoute remyleone sieben
|
||||
team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l
|
||||
team_suse: commel dcermak evrardjp lrupp toabctl AnderEnder alxgu andytom
|
||||
team_virt: joshainglis karmab Aversiste Thulium-Drake
|
||||
team_suse: commel dcermak evrardjp lrupp toabctl AnderEnder alxgu andytom sealor
|
||||
team_virt: joshainglis karmab tleguern Thulium-Drake Ajpantuso
|
||||
|
||||
81
.gitignore
vendored
81
.gitignore
vendored
@@ -1,6 +1,6 @@
|
||||
|
||||
# Created by https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
|
||||
# Edit at https://www.gitignore.io/?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
|
||||
|
||||
### dotenv ###
|
||||
.env
|
||||
@@ -88,7 +88,7 @@ flycheck_*.el
|
||||
.nfs*
|
||||
|
||||
### PyCharm+all ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
@@ -98,6 +98,9 @@ flycheck_*.el
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
@@ -118,6 +121,9 @@ flycheck_*.el
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
@@ -198,7 +204,6 @@ parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
@@ -225,13 +230,25 @@ htmlcov/
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
@@ -239,9 +256,19 @@ coverage.xml
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
@@ -251,12 +278,24 @@ target/
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# celery beat schedule file
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
@@ -264,10 +303,6 @@ celerybeat-schedule
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
@@ -279,9 +314,16 @@ dmypy.json
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
### Vim ###
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
!*.svg # comment out if you don't need vector files
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
@@ -299,11 +341,13 @@ tags
|
||||
[._]*.un~
|
||||
|
||||
### WebStorm ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
|
||||
# AWS User-specific
|
||||
|
||||
# Generated files
|
||||
|
||||
# Sensitive or high-churn files
|
||||
@@ -314,6 +358,9 @@ tags
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
@@ -349,15 +396,27 @@ tags
|
||||
# *.ipr
|
||||
|
||||
# Sonarlint plugin
|
||||
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
||||
.idea/**/sonarlint/
|
||||
|
||||
# SonarQube Plugin
|
||||
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
||||
.idea/**/sonarIssues.xml
|
||||
|
||||
# Markdown Navigator plugin
|
||||
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
||||
.idea/**/markdown-navigator.xml
|
||||
.idea/**/markdown-navigator-enh.xml
|
||||
.idea/**/markdown-navigator/
|
||||
|
||||
# Cache file creation bug
|
||||
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
||||
.idea/$CACHE_FILE$
|
||||
|
||||
# CodeStream plugin
|
||||
# https://plugins.jetbrains.com/plugin/12206-codestream
|
||||
.idea/codestream.xml
|
||||
|
||||
### Windows ###
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
@@ -384,4 +443,4 @@ $RECYCLE.BIN/
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
|
||||
# End of https://www.toptal.com/developers/gitignore/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
|
||||
|
||||
188
CHANGELOG.rst
188
CHANGELOG.rst
@@ -6,6 +6,194 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 1.0.0.
|
||||
|
||||
v2.5.5
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Maintenance release.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- ali_instance_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- archive - fixed ``exclude_path`` values causing incorrect archive root (https://github.com/ansible-collections/community.general/pull/2816).
|
||||
- archive - fixed improper file names for single file zip archives (https://github.com/ansible-collections/community.general/issues/2818).
|
||||
- archive - fixed incorrect ``state`` result value documentation (https://github.com/ansible-collections/community.general/pull/2816).
|
||||
- archive - fixed task failure when using the ``remove`` option with a ``path`` containing nested files for ``format``s other than ``zip`` (https://github.com/ansible-collections/community.general/issues/2919).
|
||||
- archive - fixing archive root determination when longest common root is ``/`` (https://github.com/ansible-collections/community.general/pull/3036).
|
||||
- deploy_helper - improved parameter checking by using standard Ansible construct (https://github.com/ansible-collections/community.general/pull/3104).
|
||||
- ejabberd_user - replaced in-code check with ``required_if``, using ``get_bin_path()`` for the command, passing args to ``run_command()`` as list instead of string (https://github.com/ansible-collections/community.general/pull/3093).
|
||||
- gitlab_group_members - fixes issue when gitlab group has more then 20 members, pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
|
||||
- gitlab_project_members - fixes issue when gitlab group has more then 20 members, pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
|
||||
- gluster_heal_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- idrac_redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- ini_file - fix inconsistency between empty value and no value (https://github.com/ansible-collections/community.general/issues/3031).
|
||||
- java_cert - import private key as well as public certificate from PKCS#12 (https://github.com/ansible-collections/community.general/issues/2460).
|
||||
- launchd - fixed sanity check in the module's code (https://github.com/ansible-collections/community.general/pull/2960).
|
||||
- lvol - honor ``check_mode`` on thinpool (https://github.com/ansible-collections/community.general/issues/2934).
|
||||
- memset_memstore_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- memset_server_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- npm - correctly handle cases where a dependency does not have a ``version`` property because it is either missing or invalid (https://github.com/ansible-collections/community.general/issues/2917).
|
||||
- ome_device_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- oneview_datacenter_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_enclosure_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_ethernet_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_fc_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_fcoe_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_logical_interconnect_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_network_set_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_san_manager_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- openbsd_pkg - fix regexp matching crash. This bug could trigger on package names with special characters, for example ``g++`` (https://github.com/ansible-collections/community.general/pull/3161).
|
||||
- ovirt_affinity_label_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_api_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_cluster_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_datacenter_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_disk_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_event_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_external_provider_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_group_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_host_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_host_storage_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_network_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_nic_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_permission_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_quota_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_scheduling_policy_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_snapshot_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_domain_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_tag_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_user_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_vmpool_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- pacman - fix changed status when ignorepkg has been defined (https://github.com/ansible-collections/community.general/issues/1758).
|
||||
- pamd - fixed problem with files containing only one or two lines (https://github.com/ansible-collections/community.general/issues/2925).
|
||||
- pids - avoid crashes for older ``psutil`` versions, like on RHEL6 and RHEL7 (https://github.com/ansible-collections/community.general/pull/2808).
|
||||
- proxmox inventory plugin - fixed parsing failures when some cluster nodes are offline (https://github.com/ansible-collections/community.general/issues/2931).
|
||||
- proxmox inventory plugin - fixed plugin failure when a ``qemu`` guest has no ``template`` key (https://github.com/ansible-collections/community.general/pull/3052).
|
||||
- proxmox_kvm - fix result of clone, now returns ``newid`` instead of ``vmid`` (https://github.com/ansible-collections/community.general/pull/3034).
|
||||
- purefa_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- rax_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- redfish_command - fix extraneous error caused by missing ``bootdevice`` argument when using the ``DisableBootOverride`` sub-command (https://github.com/ansible-collections/community.general/issues/3005).
|
||||
- redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- smartos_image_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- snmp_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- taiga - some constructs in the module fixed to work also in Python 3 (https://github.com/ansible-collections/community.general/pull/3067).
|
||||
- tss lookup plugin - fixed incompatibility with ``python-tss-sdk`` version 1.0.0 (https://github.com/ansible-collections/community.general/issues/3057, https://github.com/ansible-collections/community.general/pull/3139).
|
||||
- utm_aaa_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_ca_host_key_cert_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_network_interface_address_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_proxy_frontend_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_proxy_location_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- xenserver_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- xfconf_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
|
||||
v2.5.4
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix release.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- _mount module utils - fixed the sanity checks (https://github.com/ansible-collections/community.general/pull/2883).
|
||||
- gitlab_project - user projects are created using namespace ID now, instead of user ID (https://github.com/ansible-collections/community.general/pull/2881).
|
||||
- ipa_sudorule - call ``sudorule_add_allow_command`` method instead of ``sudorule_add_allow_command_group`` (https://github.com/ansible-collections/community.general/issues/2442).
|
||||
- modprobe - added additional checks to ensure module load/unload is effective (https://github.com/ansible-collections/community.general/issues/1608).
|
||||
- nmcli - fixes team-slave configuration by adding connection.slave-type (https://github.com/ansible-collections/community.general/issues/766).
|
||||
- npm - when the ``version`` option is used the comparison of installed vs missing will use name@version instead of just name, allowing version specific updates (https://github.com/ansible-collections/community.general/issues/2021).
|
||||
- proxmox_kvm - fix parsing of Proxmox VM information with device info not containing a comma, like disks backed by ZFS zvols (https://github.com/ansible-collections/community.general/issues/2840).
|
||||
- scaleway plugin inventory - fix ``JSON object must be str, not 'bytes'`` with Python 3.5 (https://github.com/ansible-collections/community.general/issues/2769).
|
||||
|
||||
v2.5.3
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix release.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- consul_acl - update the hcl allowlist to include all supported options (https://github.com/ansible-collections/community.general/pull/2495).
|
||||
- consul_kv lookup plugin - allow to set ``recurse``, ``index``, ``datacenter`` and ``token`` as keyword arguments (https://github.com/ansible-collections/community.general/issues/2124).
|
||||
- influxdb_user - allow creation of admin users when InfluxDB authentication is enabled but no other user exists on the database. In this scenario, InfluxDB 1.x allows only ``CREATE USER`` queries and rejects any other query (https://github.com/ansible-collections/community.general/issues/2364).
|
||||
- influxdb_user - fix bug where an influxdb user has no privileges for 2 or more databases (https://github.com/ansible-collections/community.general/pull/2499).
|
||||
- influxdb_user - fix bug which removed current privileges instead of appending them to existing ones (https://github.com/ansible-collections/community.general/issues/2609, https://github.com/ansible-collections/community.general/pull/2614).
|
||||
- iptables_state - call ``async_status`` action plugin rather than its module (https://github.com/ansible-collections/community.general/issues/2700).
|
||||
- iptables_state - fix a 'FutureWarning' in a regex and do some basic code clean up (https://github.com/ansible-collections/community.general/pull/2525).
|
||||
- iptables_state - fix a broken query of ``async_status`` result with current ansible-core development version (https://github.com/ansible-collections/community.general/issues/2627, https://github.com/ansible-collections/community.general/pull/2671).
|
||||
- iptables_state - fix initialization of iptables from null state when adressing more than one table (https://github.com/ansible-collections/community.general/issues/2523).
|
||||
- java_cert - fix issue with incorrect alias used on PKCS#12 certificate import (https://github.com/ansible-collections/community.general/pull/2560).
|
||||
- jenkins_plugin - use POST method for sending request to jenkins API when ``state`` option is one of ``enabled``, ``disabled``, ``pinned``, ``unpinned``, or ``absent`` (https://github.com/ansible-collections/community.general/issues/2510).
|
||||
- json_query filter plugin - avoid 'unknown type' errors for more Ansible internal types (https://github.com/ansible-collections/community.general/pull/2607).
|
||||
- module_helper module utils - ``CmdMixin`` must also use ``LC_ALL`` to enforce locale choice (https://github.com/ansible-collections/community.general/pull/2731).
|
||||
- netcup_dns - use ``str(ex)`` instead of unreliable ``ex.message`` in exception handling to fix ``AttributeError`` in error cases (https://github.com/ansible-collections/community.general/pull/2590).
|
||||
- nmap inventory plugin - fix local variable error when cache is disabled (https://github.com/ansible-collections/community.general/issues/2512).
|
||||
- ovir4 inventory script - improve configparser creation to avoid crashes for options without values (https://github.com/ansible-collections/community.general/issues/674).
|
||||
- proxmox_kvm - fixed ``vmid`` return value when VM with ``name`` already exists (https://github.com/ansible-collections/community.general/issues/2648).
|
||||
- redis cache - improved connection string parsing (https://github.com/ansible-collections/community.general/issues/497).
|
||||
- rhsm_release - fix the issue that module considers 8, 7Client and 7Workstation as invalid releases (https://github.com/ansible-collections/community.general/pull/2571).
|
||||
- ssh_config - reduce stormssh searches based on host (https://github.com/ansible-collections/community.general/pull/2568/).
|
||||
- terraform - ensure the workspace is set back to its previous value when the apply fails (https://github.com/ansible-collections/community.general/pull/2634).
|
||||
- xfconf - also use ``LC_ALL`` to enforce locale choice (https://github.com/ansible-collections/community.general/issues/2715).
|
||||
- zypper_repository - fix idempotency on adding repository with ``$releasever`` and ``$basearch`` variables (https://github.com/ansible-collections/community.general/issues/1985).
|
||||
|
||||
v2.5.2
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix release.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- composer - use ``no-interaction`` option when discovering available options to avoid an issue where composer hangs (https://github.com/ansible-collections/community.general/pull/2348).
|
||||
- hiera lookup plugin - converts the return type of plugin to unicode string (https://github.com/ansible-collections/community.general/pull/2329).
|
||||
- influxdb_retention_policy - ensure idempotent module execution with different duration and shard duration parameter values (https://github.com/ansible-collections/community.general/issues/2281).
|
||||
- influxdb_retention_policy - fix bug where ``INF`` duration values failed parsing (https://github.com/ansible-collections/community.general/pull/2385).
|
||||
- inventory and vault scripts - change file permissions to make vendored inventory and vault scripts exectuable (https://github.com/ansible-collections/community.general/pull/2337).
|
||||
- jenkins_plugin - fixes Python 2 compatibility issue (https://github.com/ansible-collections/community.general/pull/2340).
|
||||
- jira - fixed error when loading base64-encoded content as attachment (https://github.com/ansible-collections/community.general/pull/2349).
|
||||
- linode_v4 - changed the error message to point to the correct bugtracker URL (https://github.com/ansible-collections/community.general/pull/2430).
|
||||
- nmap inventory plugin - fix cache and constructed group support (https://github.com/ansible-collections/community.general/issues/2242).
|
||||
- nmcli - compare MAC addresses case insensitively to fix idempotency issue (https://github.com/ansible-collections/community.general/issues/2409).
|
||||
- nmcli - if type is ``bridge-slave`` add ``slave-type bridge`` to ``nmcli`` command (https://github.com/ansible-collections/community.general/issues/2408).
|
||||
- one_vm - Allow missing NIC keys (https://github.com/ansible-collections/community.general/pull/2435).
|
||||
- ovirt* modules - remove bad unnecessary import for current ansible-core development version (https://github.com/ansible-collections/community.general/pull/2381).
|
||||
- proxmox inventory - added handling of commas in KVM agent configuration string (https://github.com/ansible-collections/community.general/pull/2245).
|
||||
- puppet - replace ``console` with ``stdout`` in ``logdest`` option when ``all`` has been chosen (https://github.com/ansible-collections/community.general/issues/1190).
|
||||
- stackpath_compute inventory script - fix broken validation checks for client ID and client secret (https://github.com/ansible-collections/community.general/pull/2448).
|
||||
- svr4pkg - convert string to a bytes-like object to avoid ``TypeError`` with Python 3 (https://github.com/ansible-collections/community.general/issues/2373).
|
||||
- terraform - fix issue that cause the destroy to fail because from Terraform 0.15 on, the ``terraform destroy -force`` option is replaced with ``terraform destroy -auto-approve`` (https://github.com/ansible-collections/community.general/issues/2247).
|
||||
- terraform - fix issue that cause the execution fail because from Terraform 0.15 on, the ``-var`` and ``-var-file`` options are no longer available on ``terraform validate`` (https://github.com/ansible-collections/community.general/pull/2246).
|
||||
- terraform - remove uses of ``use_unsafe_shell=True`` (https://github.com/ansible-collections/community.general/pull/2246).
|
||||
- zfs - certain ZFS properties, especially sizes, would lead to a task being falsely marked as "changed" even when no actual change was made (https://github.com/ansible-collections/community.general/issues/975, https://github.com/ansible-collections/community.general/pull/2454).
|
||||
|
||||
v2.5.1
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfix release for some bugs discovered right after the 2.5.0 release.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- funcd connection plugin - can now load (https://github.com/ansible-collections/community.general/pull/2235).
|
||||
- jira - fixed calling of ``isinstance`` (https://github.com/ansible-collections/community.general/issues/2234).
|
||||
|
||||
v2.5.0
|
||||
======
|
||||
|
||||
|
||||
36
CONTRIBUTING.md
Normal file
36
CONTRIBUTING.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Contributing
|
||||
|
||||
We follow [Ansible Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) in all our contributions and interactions within this repository.
|
||||
|
||||
If you are a committer, also refer to the [collection's committer guidelines](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md).
|
||||
|
||||
## Issue tracker
|
||||
|
||||
Whether you are looking for an opportunity to contribute or you found a bug and already know how to solve it, please go to the [issue tracker](https://github.com/ansible-collections/community.general/issues).
|
||||
There you can find feature ideas to implement, reports about bugs to solve, or submit an issue to discuss your idea before implementing it which can help choose a right direction at the beginning of your work and potentially save a lot of time and effort.
|
||||
Also somebody may already have started discussing or working on implementing the same or a similar idea,
|
||||
so you can cooperate to create a better solution together.
|
||||
|
||||
* If you are interested in starting with an easy issue, look for [issues with an `easyfix` label](https://github.com/ansible-collections/community.general/labels/easyfix).
|
||||
* Often issues that are waiting for contributors to pick up have [the `waiting_on_contributor` label](https://github.com/ansible-collections/community.general/labels/waiting_on_contributor).
|
||||
|
||||
## Open pull requests
|
||||
|
||||
Look through currently [open pull requests](https://github.com/ansible-collections/community.general/pulls).
|
||||
You can help by reviewing them. Reviews help move pull requests to merge state. Some good pull requests cannot be merged only due to a lack of reviews. And it is always worth saying that good reviews are often more valuable than pull requests themselves.
|
||||
Note that reviewing does not only mean code review, but also offering comments on new interfaces added to existing plugins/modules, interfaces of new plugins/modules, improving language (not everyone is a native english speaker), or testing bugfixes and new features!
|
||||
|
||||
Also, consider taking up a valuable, reviewed, but abandoned pull request which you could politely ask the original authors to complete yourself.
|
||||
|
||||
* Try committing your changes with an informative but short commit message.
|
||||
* Do not squash your commits and force-push to your branch if not needed. Reviews of your pull request are much easier with individual commits to comprehend the pull request history. All commits of your pull request branch will be squashed into one commit by GitHub upon merge.
|
||||
* Do not add merge commits to your PR. The bot will complain and you will have to rebase ([instructions for rebasing](https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html)) to remove them before your PR can be merged. To avoid that git automatically does merges during pulls, you can configure it to do rebases instead by running `git config pull.rebase true` inside the respository checkout.
|
||||
* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#changelogs-how-to). (You must not include a fragment for new modules or new plugins, except for test and filter plugins. Also you shouldn't include one for docs-only changes. If you're not sure, simply don't include one, we'll tell you whether one is needed or not :) )
|
||||
|
||||
You can also read [our Quick-start development guide](https://github.com/ansible/community-docs/blob/main/create_pr_quick_start_guide.rst).
|
||||
|
||||
## Test pull requests
|
||||
|
||||
If you want to test a PR locally, refer to [our testing guide](https://github.com/ansible/community-docs/blob/main/test_pr_locally_guide.rst) for instructions on how do it quickly.
|
||||
|
||||
If you find any inconsistencies or places in this document which can be improved, feel free to raise an issue or pull request to fix it.
|
||||
53
README.md
53
README.md
@@ -3,10 +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.
|
||||
@@ -21,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
|
||||
|
||||
@@ -32,38 +42,51 @@ collections:
|
||||
- name: community.general
|
||||
```
|
||||
|
||||
Note that if you install the collection manually, it will not be upgraded automatically when you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install community.general --upgrade
|
||||
```
|
||||
|
||||
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where `X.Y.Z` can be any [available version](https://galaxy.ansible.com/community/general):
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install community.general:==X.Y.Z
|
||||
```
|
||||
|
||||
See [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
|
||||
|
||||
## Contributing to this collection
|
||||
|
||||
If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATH`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there.
|
||||
The content of this collection is made by good people just like you, a community of individuals collaborating on making the world better through developing automation software.
|
||||
|
||||
For example, if you are working in the `~/dev` directory:
|
||||
We are actively accepting new contributors.
|
||||
|
||||
```
|
||||
cd ~/dev
|
||||
git clone git@github.com:ansible-collections/community.general.git collections/ansible_collections/community/general
|
||||
export COLLECTIONS_PATH=$(pwd)/collections:$COLLECTIONS_PATH
|
||||
```
|
||||
All types of contributions are very welcome.
|
||||
|
||||
You don't know how to start? Refer to our [contribution guide](https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md)!
|
||||
|
||||
The current maintainers are listed in the [commit-rights.md](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md#people) file. If you have questions or need help, feel free to mention them in the proposals.
|
||||
|
||||
You can find more information in the [developer guide for collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html).
|
||||
|
||||
Also for some notes specific to this collection see [our CONTRIBUTING documentation](https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md).
|
||||
|
||||
### Running tests
|
||||
|
||||
See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#testing-collections).
|
||||
|
||||
### Communication
|
||||
|
||||
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 Freenode IRC channels -
|
||||
- `#ansible` - For general use questions and support.
|
||||
- `#ansible-devel` - For discussions on developer topics and code related to features or bugs.
|
||||
- `#ansible-community` - For discussions on community topics and community meetings.
|
||||
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
|
||||
|
||||
|
||||
@@ -1804,3 +1804,304 @@ releases:
|
||||
name: path_join
|
||||
namespace: null
|
||||
release_date: '2021-04-13'
|
||||
2.5.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- funcd connection plugin - can now load (https://github.com/ansible-collections/community.general/pull/2235).
|
||||
- jira - fixed calling of ``isinstance`` (https://github.com/ansible-collections/community.general/issues/2234).
|
||||
release_summary: Bugfix release for some bugs discovered right after the 2.5.0
|
||||
release.
|
||||
fragments:
|
||||
- 2.5.1.yml
|
||||
- 2236-jira-isinstance.yml
|
||||
- allow_funcd_to_load.yml
|
||||
release_date: '2021-04-14'
|
||||
2.5.2:
|
||||
changes:
|
||||
bugfixes:
|
||||
- composer - use ``no-interaction`` option when discovering available options
|
||||
to avoid an issue where composer hangs (https://github.com/ansible-collections/community.general/pull/2348).
|
||||
- hiera lookup plugin - converts the return type of plugin to unicode string
|
||||
(https://github.com/ansible-collections/community.general/pull/2329).
|
||||
- influxdb_retention_policy - ensure idempotent module execution with different
|
||||
duration and shard duration parameter values (https://github.com/ansible-collections/community.general/issues/2281).
|
||||
- influxdb_retention_policy - fix bug where ``INF`` duration values failed parsing
|
||||
(https://github.com/ansible-collections/community.general/pull/2385).
|
||||
- inventory and vault scripts - change file permissions to make vendored inventory
|
||||
and vault scripts exectuable (https://github.com/ansible-collections/community.general/pull/2337).
|
||||
- jenkins_plugin - fixes Python 2 compatibility issue (https://github.com/ansible-collections/community.general/pull/2340).
|
||||
- jira - fixed error when loading base64-encoded content as attachment (https://github.com/ansible-collections/community.general/pull/2349).
|
||||
- linode_v4 - changed the error message to point to the correct bugtracker URL
|
||||
(https://github.com/ansible-collections/community.general/pull/2430).
|
||||
- nmap inventory plugin - fix cache and constructed group support (https://github.com/ansible-collections/community.general/issues/2242).
|
||||
- nmcli - compare MAC addresses case insensitively to fix idempotency issue
|
||||
(https://github.com/ansible-collections/community.general/issues/2409).
|
||||
- nmcli - if type is ``bridge-slave`` add ``slave-type bridge`` to ``nmcli``
|
||||
command (https://github.com/ansible-collections/community.general/issues/2408).
|
||||
- one_vm - Allow missing NIC keys (https://github.com/ansible-collections/community.general/pull/2435).
|
||||
- ovirt* modules - remove bad unnecessary import for current ansible-core development
|
||||
version (https://github.com/ansible-collections/community.general/pull/2381).
|
||||
- proxmox inventory - added handling of commas in KVM agent configuration string
|
||||
(https://github.com/ansible-collections/community.general/pull/2245).
|
||||
- puppet - replace ``console` with ``stdout`` in ``logdest`` option when ``all``
|
||||
has been chosen (https://github.com/ansible-collections/community.general/issues/1190).
|
||||
- stackpath_compute inventory script - fix broken validation checks for client
|
||||
ID and client secret (https://github.com/ansible-collections/community.general/pull/2448).
|
||||
- svr4pkg - convert string to a bytes-like object to avoid ``TypeError`` with
|
||||
Python 3 (https://github.com/ansible-collections/community.general/issues/2373).
|
||||
- terraform - fix issue that cause the destroy to fail because from Terraform
|
||||
0.15 on, the ``terraform destroy -force`` option is replaced with ``terraform
|
||||
destroy -auto-approve`` (https://github.com/ansible-collections/community.general/issues/2247).
|
||||
- terraform - fix issue that cause the execution fail because from Terraform
|
||||
0.15 on, the ``-var`` and ``-var-file`` options are no longer available on
|
||||
``terraform validate`` (https://github.com/ansible-collections/community.general/pull/2246).
|
||||
- terraform - remove uses of ``use_unsafe_shell=True`` (https://github.com/ansible-collections/community.general/pull/2246).
|
||||
- zfs - certain ZFS properties, especially sizes, would lead to a task being
|
||||
falsely marked as "changed" even when no actual change was made (https://github.com/ansible-collections/community.general/issues/975,
|
||||
https://github.com/ansible-collections/community.general/pull/2454).
|
||||
release_summary: Regular bugfix release.
|
||||
fragments:
|
||||
- 2.5.2.yml
|
||||
- 2245-proxmox_fix_agent_string_handling.yml
|
||||
- 2246-terraform.yaml
|
||||
- 2282-nmap-fix-cache-support.yml
|
||||
- 2284-influxdb_retention_policy-fix_duration_parsing.yml
|
||||
- 2284-influxdb_retention_policy-idempotence.yml
|
||||
- 2329-hiera-lookup-plugin-return-type.yaml
|
||||
- 2337-mark-inventory-scripts-executable.yml
|
||||
- 2340-jenkins_plugin-py2.yml
|
||||
- 2348-composer-no-interaction-option-discovery-to-avoid-hang.yaml
|
||||
- 2349-jira-bugfix-b64decode.yml
|
||||
- 2373-svr4pkg-fix-typeerror.yml
|
||||
- 2407-puppet-change_stdout_to_console.yaml
|
||||
- 2409-nmcli_add_slave-type_bridge_to_nmcli_command_if_type_is_bridge-slave.yml
|
||||
- 2416-nmcli_compare_mac_addresses_case_insensitively.yml
|
||||
- 2430-linodev4-error-message.yml
|
||||
- 2435-one_vm-fix_missing_keys.yml
|
||||
- 2448-stackpath_compute-fix.yml
|
||||
- 2454-detect_zfs_changed.yml
|
||||
- ovirt-fixup.yml
|
||||
release_date: '2021-05-11'
|
||||
2.5.3:
|
||||
changes:
|
||||
bugfixes:
|
||||
- consul_acl - update the hcl allowlist to include all supported options (https://github.com/ansible-collections/community.general/pull/2495).
|
||||
- consul_kv lookup plugin - allow to set ``recurse``, ``index``, ``datacenter``
|
||||
and ``token`` as keyword arguments (https://github.com/ansible-collections/community.general/issues/2124).
|
||||
- influxdb_user - allow creation of admin users when InfluxDB authentication
|
||||
is enabled but no other user exists on the database. In this scenario, InfluxDB
|
||||
1.x allows only ``CREATE USER`` queries and rejects any other query (https://github.com/ansible-collections/community.general/issues/2364).
|
||||
- influxdb_user - fix bug where an influxdb user has no privileges for 2 or
|
||||
more databases (https://github.com/ansible-collections/community.general/pull/2499).
|
||||
- influxdb_user - fix bug which removed current privileges instead of appending
|
||||
them to existing ones (https://github.com/ansible-collections/community.general/issues/2609,
|
||||
https://github.com/ansible-collections/community.general/pull/2614).
|
||||
- iptables_state - call ``async_status`` action plugin rather than its module
|
||||
(https://github.com/ansible-collections/community.general/issues/2700).
|
||||
- iptables_state - fix a 'FutureWarning' in a regex and do some basic code clean
|
||||
up (https://github.com/ansible-collections/community.general/pull/2525).
|
||||
- iptables_state - fix a broken query of ``async_status`` result with current
|
||||
ansible-core development version (https://github.com/ansible-collections/community.general/issues/2627,
|
||||
https://github.com/ansible-collections/community.general/pull/2671).
|
||||
- iptables_state - fix initialization of iptables from null state when adressing
|
||||
more than one table (https://github.com/ansible-collections/community.general/issues/2523).
|
||||
- java_cert - fix issue with incorrect alias used on PKCS#12 certificate import
|
||||
(https://github.com/ansible-collections/community.general/pull/2560).
|
||||
- jenkins_plugin - use POST method for sending request to jenkins API when ``state``
|
||||
option is one of ``enabled``, ``disabled``, ``pinned``, ``unpinned``, or ``absent``
|
||||
(https://github.com/ansible-collections/community.general/issues/2510).
|
||||
- json_query filter plugin - avoid 'unknown type' errors for more Ansible internal
|
||||
types (https://github.com/ansible-collections/community.general/pull/2607).
|
||||
- module_helper module utils - ``CmdMixin`` must also use ``LC_ALL`` to enforce
|
||||
locale choice (https://github.com/ansible-collections/community.general/pull/2731).
|
||||
- netcup_dns - use ``str(ex)`` instead of unreliable ``ex.message`` in exception
|
||||
handling to fix ``AttributeError`` in error cases (https://github.com/ansible-collections/community.general/pull/2590).
|
||||
- nmap inventory plugin - fix local variable error when cache is disabled (https://github.com/ansible-collections/community.general/issues/2512).
|
||||
- ovir4 inventory script - improve configparser creation to avoid crashes for
|
||||
options without values (https://github.com/ansible-collections/community.general/issues/674).
|
||||
- proxmox_kvm - fixed ``vmid`` return value when VM with ``name`` already exists
|
||||
(https://github.com/ansible-collections/community.general/issues/2648).
|
||||
- redis cache - improved connection string parsing (https://github.com/ansible-collections/community.general/issues/497).
|
||||
- rhsm_release - fix the issue that module considers 8, 7Client and 7Workstation
|
||||
as invalid releases (https://github.com/ansible-collections/community.general/pull/2571).
|
||||
- ssh_config - reduce stormssh searches based on host (https://github.com/ansible-collections/community.general/pull/2568/).
|
||||
- terraform - ensure the workspace is set back to its previous value when the
|
||||
apply fails (https://github.com/ansible-collections/community.general/pull/2634).
|
||||
- xfconf - also use ``LC_ALL`` to enforce locale choice (https://github.com/ansible-collections/community.general/issues/2715).
|
||||
- zypper_repository - fix idempotency on adding repository with ``$releasever``
|
||||
and ``$basearch`` variables (https://github.com/ansible-collections/community.general/issues/1985).
|
||||
release_summary: Regular bugfix release.
|
||||
fragments:
|
||||
- 1085-consul-acl-hcl-whitelist-update.yml
|
||||
- 2.5.3.yml
|
||||
- 2126-consul_kv-pass-token.yml
|
||||
- 2364-influxdb_user-first_user.yml
|
||||
- 2461-ovirt4-fix-configparser.yml
|
||||
- 2499-influxdb_user-fix-multiple-no-privileges.yml
|
||||
- 2510-jenkins_plugin_use_post_method.yml
|
||||
- 2518-nmap-fix-cache-disabled.yml
|
||||
- 2525-iptables_state-fix-initialization-command.yml
|
||||
- 2560-java_cert-pkcs12-alias-bugfix.yml
|
||||
- 2568-ssh_config-reduce-stormssh-searches-based-on-host.yml
|
||||
- 2571-rhsm_release-fix-release_matcher.yaml
|
||||
- 2579-redis-cache-ipv6.yml
|
||||
- 2590-netcup_dns-exception-no-message-attr.yml
|
||||
- 2614-influxdb_user-fix-issue-introduced-in-PR#2499.yml
|
||||
- 2634-terraform-switch-workspace.yml
|
||||
- 2648-proxmox_kvm-fix-vmid-return-value.yml
|
||||
- 2671-fix-broken-query-of-async_status-result.yml
|
||||
- 2711-fix-iptables_state-2700-async_status-call.yml
|
||||
- 2722-zypper_repository-fix_idempotency_on_adding_repo_with_releasever.yml
|
||||
- 2731-mh-cmd-locale.yml
|
||||
- json_query_more_types.yml
|
||||
release_date: '2021-06-08'
|
||||
2.5.4:
|
||||
changes:
|
||||
bugfixes:
|
||||
- _mount module utils - fixed the sanity checks (https://github.com/ansible-collections/community.general/pull/2883).
|
||||
- gitlab_project - user projects are created using namespace ID now, instead
|
||||
of user ID (https://github.com/ansible-collections/community.general/pull/2881).
|
||||
- ipa_sudorule - call ``sudorule_add_allow_command`` method instead of ``sudorule_add_allow_command_group``
|
||||
(https://github.com/ansible-collections/community.general/issues/2442).
|
||||
- modprobe - added additional checks to ensure module load/unload is effective
|
||||
(https://github.com/ansible-collections/community.general/issues/1608).
|
||||
- nmcli - fixes team-slave configuration by adding connection.slave-type (https://github.com/ansible-collections/community.general/issues/766).
|
||||
- npm - when the ``version`` option is used the comparison of installed vs missing
|
||||
will use name@version instead of just name, allowing version specific updates
|
||||
(https://github.com/ansible-collections/community.general/issues/2021).
|
||||
- proxmox_kvm - fix parsing of Proxmox VM information with device info not containing
|
||||
a comma, like disks backed by ZFS zvols (https://github.com/ansible-collections/community.general/issues/2840).
|
||||
- scaleway plugin inventory - fix ``JSON object must be str, not 'bytes'`` with
|
||||
Python 3.5 (https://github.com/ansible-collections/community.general/issues/2769).
|
||||
release_summary: Regular bugfix release.
|
||||
fragments:
|
||||
- 2.5.4.yml
|
||||
- 2771-scaleway_inventory_json_accept_byte_array.yml
|
||||
- 2821-ipa_sudorule.yml
|
||||
- 2827-nmcli_fix_team_slave.yml
|
||||
- 2830-npm-version-update.yml
|
||||
- 2841-proxmox_kvm_zfs_devstr.yml
|
||||
- 2843-modprobe-failure-conditions.yml
|
||||
- 2881-gitlab_project-fix_workspace_user.yaml
|
||||
- 2883-_mount-fixed-sanity-checks.yml
|
||||
release_date: '2021-06-29'
|
||||
2.5.5:
|
||||
changes:
|
||||
bugfixes:
|
||||
- ali_instance_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- archive - fixed ``exclude_path`` values causing incorrect archive root (https://github.com/ansible-collections/community.general/pull/2816).
|
||||
- archive - fixed improper file names for single file zip archives (https://github.com/ansible-collections/community.general/issues/2818).
|
||||
- archive - fixed incorrect ``state`` result value documentation (https://github.com/ansible-collections/community.general/pull/2816).
|
||||
- archive - fixed task failure when using the ``remove`` option with a ``path``
|
||||
containing nested files for ``format``s other than ``zip`` (https://github.com/ansible-collections/community.general/issues/2919).
|
||||
- archive - fixing archive root determination when longest common root is ``/``
|
||||
(https://github.com/ansible-collections/community.general/pull/3036).
|
||||
- deploy_helper - improved parameter checking by using standard Ansible construct
|
||||
(https://github.com/ansible-collections/community.general/pull/3104).
|
||||
- ejabberd_user - replaced in-code check with ``required_if``, using ``get_bin_path()``
|
||||
for the command, passing args to ``run_command()`` as list instead of string
|
||||
(https://github.com/ansible-collections/community.general/pull/3093).
|
||||
- gitlab_group_members - fixes issue when gitlab group has more then 20 members,
|
||||
pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
|
||||
- gitlab_project_members - fixes issue when gitlab group has more then 20 members,
|
||||
pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
|
||||
- gluster_heal_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- idrac_redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- ini_file - fix inconsistency between empty value and no value (https://github.com/ansible-collections/community.general/issues/3031).
|
||||
- java_cert - import private key as well as public certificate from PKCS#12
|
||||
(https://github.com/ansible-collections/community.general/issues/2460).
|
||||
- launchd - fixed sanity check in the module's code (https://github.com/ansible-collections/community.general/pull/2960).
|
||||
- lvol - honor ``check_mode`` on thinpool (https://github.com/ansible-collections/community.general/issues/2934).
|
||||
- memset_memstore_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- memset_server_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- npm - correctly handle cases where a dependency does not have a ``version``
|
||||
property because it is either missing or invalid (https://github.com/ansible-collections/community.general/issues/2917).
|
||||
- ome_device_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- oneview_datacenter_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_enclosure_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_ethernet_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_fc_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_fcoe_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_logical_interconnect_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_network_set_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_san_manager_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- openbsd_pkg - fix regexp matching crash. This bug could trigger on package
|
||||
names with special characters, for example ``g++`` (https://github.com/ansible-collections/community.general/pull/3161).
|
||||
- ovirt_affinity_label_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_api_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_cluster_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_datacenter_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_disk_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_event_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_external_provider_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_group_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_host_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_host_storage_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_network_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_nic_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_permission_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_quota_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_scheduling_policy_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_snapshot_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_domain_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_tag_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_user_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_vmpool_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- pacman - fix changed status when ignorepkg has been defined (https://github.com/ansible-collections/community.general/issues/1758).
|
||||
- pamd - fixed problem with files containing only one or two lines (https://github.com/ansible-collections/community.general/issues/2925).
|
||||
- pids - avoid crashes for older ``psutil`` versions, like on RHEL6 and RHEL7
|
||||
(https://github.com/ansible-collections/community.general/pull/2808).
|
||||
- proxmox inventory plugin - fixed parsing failures when some cluster nodes
|
||||
are offline (https://github.com/ansible-collections/community.general/issues/2931).
|
||||
- proxmox inventory plugin - fixed plugin failure when a ``qemu`` guest has
|
||||
no ``template`` key (https://github.com/ansible-collections/community.general/pull/3052).
|
||||
- proxmox_kvm - fix result of clone, now returns ``newid`` instead of ``vmid``
|
||||
(https://github.com/ansible-collections/community.general/pull/3034).
|
||||
- purefa_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- rax_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- redfish_command - fix extraneous error caused by missing ``bootdevice`` argument
|
||||
when using the ``DisableBootOverride`` sub-command (https://github.com/ansible-collections/community.general/issues/3005).
|
||||
- redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- smartos_image_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- snmp_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- taiga - some constructs in the module fixed to work also in Python 3 (https://github.com/ansible-collections/community.general/pull/3067).
|
||||
- tss lookup plugin - fixed incompatibility with ``python-tss-sdk`` version
|
||||
1.0.0 (https://github.com/ansible-collections/community.general/issues/3057,
|
||||
https://github.com/ansible-collections/community.general/pull/3139).
|
||||
- utm_aaa_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_ca_host_key_cert_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_network_interface_address_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_proxy_frontend_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_proxy_location_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- xenserver_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- xfconf_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
release_summary: Maintenance release.
|
||||
fragments:
|
||||
- 2.5.5.yml
|
||||
- 2808-pids-older-psutil.yml
|
||||
- 2816-archive-refactor.yml
|
||||
- 2923-archive-remove-bugfix.yml
|
||||
- 2924-npm-fix-package-json.yml
|
||||
- 2935-lvol-support_check_mode_thinpool.yml
|
||||
- 2936-pacman-fix_changed_status_when_ignorepkg_has_been_defined.yml
|
||||
- 2960-launchd-validation-check.yaml
|
||||
- 2967-proxmox_inventory-offline-node-fix.yml
|
||||
- 2989-pamd-single-line.yaml
|
||||
- 3006-redfish_command-bootoverride-argument-check.yaml
|
||||
- 3034-promox-kvm-return-new-id.yaml
|
||||
- 3036-archive-root-path-fix.yml
|
||||
- 3041-fix_gitlab_group_members_gitlab_project_mambers.yml
|
||||
- 3052_proxmox_inventory_plugin.yml
|
||||
- 3067-taiga-bugfix.yaml
|
||||
- 3074-ini_file-3031-empty-value-inconsistency.yml
|
||||
- 3080-java_cert-2460-import_private_key.yml
|
||||
- 3084-info-checkmode.yaml
|
||||
- 3093-ejabberd_user-refactor.yaml
|
||||
- 3104-deploy_helper-required_if.yaml
|
||||
- 3139-tss-lookup-plugin-update-to-make-compatible-with-sdk-v1.yml
|
||||
- 3161-openbsd-pkg-fix-regexp-matching-crash.yml
|
||||
release_date: '2021-08-10'
|
||||
|
||||
@@ -67,6 +67,7 @@ Individuals who have been asked to become a part of this group have generally be
|
||||
|
||||
| Name | GitHub ID | IRC Nick | Other |
|
||||
| ------------------- | -------------------- | ------------------ | -------------------- |
|
||||
| Alexei Znamensky | russoz | russoz | |
|
||||
| Andrew Klychkov | andersson007 | andersson007_ | |
|
||||
| Felix Fontein | felixfontein | felixfontein | |
|
||||
| John R Barker | gundalow | gundalow | |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace: community
|
||||
name: general
|
||||
version: 2.5.0
|
||||
version: 2.5.5
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright: (c) 2020, quidame <quidame@poivron.org>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -7,7 +8,7 @@ __metaclass__ = type
|
||||
import time
|
||||
|
||||
from ansible.plugins.action import ActionBase
|
||||
from ansible.errors import AnsibleError, AnsibleActionFail, AnsibleConnectionFailure
|
||||
from ansible.errors import AnsibleActionFail, AnsibleConnectionFailure
|
||||
from ansible.utils.vars import merge_hash
|
||||
from ansible.utils.display import Display
|
||||
|
||||
@@ -40,19 +41,27 @@ class ActionModule(ActionBase):
|
||||
"(=%s) to 0, and 'async' (=%s) to a value >2 and not greater than "
|
||||
"'ansible_timeout' (=%s) (recommended).")
|
||||
|
||||
def _async_result(self, module_args, task_vars, timeout):
|
||||
def _async_result(self, async_status_args, task_vars, timeout):
|
||||
'''
|
||||
Retrieve results of the asynchonous task, and display them in place of
|
||||
the async wrapper results (those with the ansible_job_id key).
|
||||
'''
|
||||
async_status = self._task.copy()
|
||||
async_status.args = async_status_args
|
||||
async_status.action = 'ansible.builtin.async_status'
|
||||
async_status.async_val = 0
|
||||
async_action = self._shared_loader_obj.action_loader.get(
|
||||
async_status.action, task=async_status, connection=self._connection,
|
||||
play_context=self._play_context, loader=self._loader, templar=self._templar,
|
||||
shared_loader_obj=self._shared_loader_obj)
|
||||
|
||||
if async_status.args['mode'] == 'cleanup':
|
||||
return async_action.run(task_vars=task_vars)
|
||||
|
||||
# At least one iteration is required, even if timeout is 0.
|
||||
for i in range(max(1, timeout)):
|
||||
async_result = self._execute_module(
|
||||
module_name='ansible.builtin.async_status',
|
||||
module_args=module_args,
|
||||
task_vars=task_vars,
|
||||
wrap_async=False)
|
||||
if async_result['finished'] == 1:
|
||||
for dummy in range(max(1, timeout)):
|
||||
async_result = async_action.run(task_vars=task_vars)
|
||||
if async_result.get('finished', 0) == 1:
|
||||
break
|
||||
time.sleep(min(1, timeout))
|
||||
|
||||
@@ -76,7 +85,6 @@ class ActionModule(ActionBase):
|
||||
task_async = self._task.async_val
|
||||
check_mode = self._play_context.check_mode
|
||||
max_timeout = self._connection._play_context.timeout
|
||||
module_name = self._task.action
|
||||
module_args = self._task.args
|
||||
|
||||
if module_args.get('state', None) == 'restored':
|
||||
@@ -107,7 +115,7 @@ class ActionModule(ActionBase):
|
||||
# longer on the controller); and set a backup file path.
|
||||
module_args['_timeout'] = task_async
|
||||
module_args['_back'] = '%s/iptables.state' % async_dir
|
||||
async_status_args = dict(_async_dir=async_dir)
|
||||
async_status_args = dict(mode='status')
|
||||
confirm_cmd = 'rm -f %s' % module_args['_back']
|
||||
starter_cmd = 'touch %s.starter' % module_args['_back']
|
||||
remaining_time = max(task_async, max_timeout)
|
||||
@@ -133,7 +141,7 @@ class ActionModule(ActionBase):
|
||||
# The module is aware to not process the main iptables-restore
|
||||
# command before finding (and deleting) the 'starter' cookie on
|
||||
# the host, so the previous query will not reach ssh timeout.
|
||||
garbage = self._low_level_execute_command(starter_cmd, sudoable=self.DEFAULT_SUDOABLE)
|
||||
dummy = self._low_level_execute_command(starter_cmd, sudoable=self.DEFAULT_SUDOABLE)
|
||||
|
||||
# As the main command is not yet executed on the target, here
|
||||
# 'finished' means 'failed before main command be executed'.
|
||||
@@ -143,7 +151,7 @@ class ActionModule(ActionBase):
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
for x in range(max_timeout):
|
||||
for dummy in range(max_timeout):
|
||||
time.sleep(1)
|
||||
remaining_time -= 1
|
||||
# - AnsibleConnectionFailure covers rejected requests (i.e.
|
||||
@@ -151,7 +159,7 @@ class ActionModule(ActionBase):
|
||||
# - ansible_timeout is able to cover dropped requests (due
|
||||
# to a rule or policy DROP) if not lower than async_val.
|
||||
try:
|
||||
garbage = self._low_level_execute_command(confirm_cmd, sudoable=self.DEFAULT_SUDOABLE)
|
||||
dummy = self._low_level_execute_command(confirm_cmd, sudoable=self.DEFAULT_SUDOABLE)
|
||||
break
|
||||
except AnsibleConnectionFailure:
|
||||
continue
|
||||
@@ -164,16 +172,12 @@ class ActionModule(ActionBase):
|
||||
del result[key]
|
||||
|
||||
if result.get('invocation', {}).get('module_args'):
|
||||
if '_timeout' in result['invocation']['module_args']:
|
||||
del result['invocation']['module_args']['_back']
|
||||
del result['invocation']['module_args']['_timeout']
|
||||
for key in ('_back', '_timeout', '_async_dir', 'jid'):
|
||||
if result['invocation']['module_args'].get(key):
|
||||
del result['invocation']['module_args'][key]
|
||||
|
||||
async_status_args['mode'] = 'cleanup'
|
||||
garbage = self._execute_module(
|
||||
module_name='ansible.builtin.async_status',
|
||||
module_args=async_status_args,
|
||||
task_vars=task_vars,
|
||||
wrap_async=False)
|
||||
dummy = self._async_result(async_status_args, task_vars, 0)
|
||||
|
||||
if not wrap_async:
|
||||
# remove a temporary path we created
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright: (c) 2020, Amin Vakil <info@aminvakil.com>
|
||||
# Copyright: (c) 2016-2018, Matt Davis <mdavis@ansible.com>
|
||||
# Copyright: (c) 2018, Sam Doran <sdoran@redhat.com>
|
||||
|
||||
@@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = """
|
||||
become: sudosu
|
||||
name: sudosu
|
||||
short_description: Run tasks using sudo su -
|
||||
description:
|
||||
- This become plugins allows your remote/login user to execute commands as another user via the C(sudo) and C(su) utilities combined.
|
||||
|
||||
0
plugins/cache/__init__.py
vendored
0
plugins/cache/__init__.py
vendored
1
plugins/cache/memcached.py
vendored
1
plugins/cache/memcached.py
vendored
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2014, Brian Coca, Josh Drake, et al
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
1
plugins/cache/pickle.py
vendored
1
plugins/cache/pickle.py
vendored
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2017, Brian Coca
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
15
plugins/cache/redis.py
vendored
15
plugins/cache/redis.py
vendored
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2014, Brian Coca, Josh Drake, et al
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
@@ -61,6 +62,7 @@ DOCUMENTATION = '''
|
||||
type: integer
|
||||
'''
|
||||
|
||||
import re
|
||||
import time
|
||||
import json
|
||||
|
||||
@@ -91,6 +93,8 @@ class CacheModule(BaseCacheModule):
|
||||
performance.
|
||||
"""
|
||||
_sentinel_service_name = None
|
||||
re_url_conn = re.compile(r'^([^:]+|\[[^]]+\]):(\d+):(\d+)(?::(.*))?$')
|
||||
re_sent_conn = re.compile(r'^(.*):(\d+)$')
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
uri = ''
|
||||
@@ -130,11 +134,18 @@ class CacheModule(BaseCacheModule):
|
||||
self._db = self._get_sentinel_connection(uri, kw)
|
||||
# normal connection
|
||||
else:
|
||||
connection = uri.split(':')
|
||||
connection = self._parse_connection(self.re_url_conn, uri)
|
||||
self._db = StrictRedis(*connection, **kw)
|
||||
|
||||
display.vv('Redis connection: %s' % self._db)
|
||||
|
||||
@staticmethod
|
||||
def _parse_connection(re_patt, uri):
|
||||
match = re_patt.match(uri)
|
||||
if not match:
|
||||
raise AnsibleError("Unable to parse connection string")
|
||||
return match.groups()
|
||||
|
||||
def _get_sentinel_connection(self, uri, kw):
|
||||
"""
|
||||
get sentinel connection details from _uri
|
||||
@@ -158,7 +169,7 @@ class CacheModule(BaseCacheModule):
|
||||
except IndexError:
|
||||
pass # password is optional
|
||||
|
||||
sentinels = [tuple(shost.split(':')) for shost in connections]
|
||||
sentinels = [self._parse_connection(self.re_sent_conn, shost) for shost in connections]
|
||||
display.vv('\nUsing redis sentinels: %s' % sentinels)
|
||||
scon = Sentinel(sentinels, **kw)
|
||||
try:
|
||||
|
||||
1
plugins/cache/yaml.py
vendored
1
plugins/cache/yaml.py
vendored
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2017, Brian Coca
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2018, Ivan Aragones Muniesa <ivan.aragones.muniesa@gmail.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
'''
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2016, Dag Wieers <dag@wieers.com>
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (C) 2014, Matt Martz <matt@sivel.net>
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright (C) 2016 maxn nikolaev.makc@gmail.com
|
||||
# Copyright (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# coding: utf-8 -*-
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
callback: loganalytics
|
||||
name: loganalytics
|
||||
type: aggregate
|
||||
short_description: Posts task results to Azure Log Analytics
|
||||
author: "Cyrus Li (@zhcli) <cyrus1006@gmail.com>"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2018, Samir Musali <samir.musali@logdna.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2015, Logentries.com, Jimmy Tang <jimmy.tang@logentries.com>
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (C) 2020, Yevhen Khmelenko <ujenmr@gmail.com>
|
||||
# (C) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) Fastly, inc 2016
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (C) 2014-2015, Matt Martz <matt@sivel.net>
|
||||
# (C) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright: (c) 2017, Allyson Bowles <@akatch>
|
||||
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
#
|
||||
# (c) 2013, Maykel Moya <mmoya@speedyrails.com>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
|
||||
# Copyright (c) 2013, Michael Scherer <misc@zarb.org>
|
||||
@@ -37,12 +38,13 @@ import tempfile
|
||||
import shutil
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.connection import ConnectionBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class Connection(object):
|
||||
class Connection(ConnectionBase):
|
||||
''' Func-based connections '''
|
||||
|
||||
has_pipelining = False
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Based on jail.py
|
||||
# (c) 2013, Michael Scherer <misc@zarb.org>
|
||||
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Based on local.py by Michael DeHaan <michael.dehaan@gmail.com>
|
||||
# and chroot.py by Maykel Moya <mmoya@speedyrails.com>
|
||||
# Copyright (c) 2013, Michael Scherer <misc@zarb.org>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2015, Joerg Thalheim <joerg@higgsboson.tk>
|
||||
# Copyright (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# (c) 2016 Matt Clay <matt@mystile.com>
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Based on the buildah connection plugin
|
||||
# Copyright (c) 2017 Ansible Project
|
||||
# 2018 Kushal Das
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
|
||||
# Based on func.py
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
# and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
|
||||
# and jail.py (c) 2013, Michael Scherer <misc@zarb.org>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright: (c) 2018, Hewlett Packard Enterprise Development LP
|
||||
# GNU General Public License v3.0+
|
||||
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright: (c) 2018, Huawei Inc.
|
||||
# GNU General Public License v3.0+
|
||||
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright (c) 2018, Oracle and/or its affiliates.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright (c) 2018, Oracle and/or its affiliates.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright (c) 2018, Oracle and/or its affiliates.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright (c) 2018, Oracle and/or its affiliates.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright (c) 2018, Oracle and/or its affiliates.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
# Copyright (c) 2018, Oracle and/or its affiliates.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8 -*-
|
||||
#
|
||||
# Copyright: (c) 2019, Sandeep Kasargod <sandeep@vexata.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
@@ -35,9 +35,11 @@ def json_query(data, expr):
|
||||
raise AnsibleError('You need to install "jmespath" prior to running '
|
||||
'json_query filter')
|
||||
|
||||
# Hack to handle Ansible String Types
|
||||
# Hack to handle Ansible Unsafe text, AnsibleMapping and AnsibleSequence
|
||||
# See issue: https://github.com/ansible-collections/community.general/issues/320
|
||||
jmespath.functions.REVERSE_TYPES_MAP['string'] = jmespath.functions.REVERSE_TYPES_MAP['string'] + ('AnsibleUnicode', 'AnsibleUnsafeText', )
|
||||
jmespath.functions.REVERSE_TYPES_MAP['array'] = jmespath.functions.REVERSE_TYPES_MAP['array'] + ('AnsibleSequence', )
|
||||
jmespath.functions.REVERSE_TYPES_MAP['object'] = jmespath.functions.REVERSE_TYPES_MAP['object'] + ('AnsibleMapping', )
|
||||
try:
|
||||
return jmespath.search(expr, data)
|
||||
except jmespath.exceptions.JMESPathError as e:
|
||||
|
||||
@@ -71,6 +71,25 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
self._nmap = None
|
||||
super(InventoryModule, self).__init__()
|
||||
|
||||
def _populate(self, hosts):
|
||||
# Use constructed if applicable
|
||||
strict = self.get_option('strict')
|
||||
|
||||
for host in hosts:
|
||||
hostname = host['name']
|
||||
self.inventory.add_host(hostname)
|
||||
for var, value in host.items():
|
||||
self.inventory.set_variable(hostname, var, value)
|
||||
|
||||
# Composed variables
|
||||
self._set_composite_vars(self.get_option('compose'), host, hostname, strict=strict)
|
||||
|
||||
# Complex groups based on jinja2 conditionals, hosts that meet the conditional are added to group
|
||||
self._add_host_to_composed_groups(self.get_option('groups'), host, hostname, strict=strict)
|
||||
|
||||
# Create groups based on variable values and add the corresponding hosts to it
|
||||
self._add_host_to_keyed_groups(self.get_option('keyed_groups'), host, hostname, strict=strict)
|
||||
|
||||
def verify_file(self, path):
|
||||
|
||||
valid = False
|
||||
@@ -82,7 +101,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
|
||||
return valid
|
||||
|
||||
def parse(self, inventory, loader, path, cache=False):
|
||||
def parse(self, inventory, loader, path, cache=True):
|
||||
|
||||
try:
|
||||
self._nmap = get_bin_path('nmap')
|
||||
@@ -93,75 +112,102 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
|
||||
self._read_config_data(path)
|
||||
|
||||
# setup command
|
||||
cmd = [self._nmap]
|
||||
if not self._options['ports']:
|
||||
cmd.append('-sP')
|
||||
cache_key = self.get_cache_key(path)
|
||||
|
||||
if self._options['ipv4'] and not self._options['ipv6']:
|
||||
cmd.append('-4')
|
||||
elif self._options['ipv6'] and not self._options['ipv4']:
|
||||
cmd.append('-6')
|
||||
elif not self._options['ipv6'] and not self._options['ipv4']:
|
||||
raise AnsibleParserError('One of ipv4 or ipv6 must be enabled for this plugin')
|
||||
# cache may be True or False at this point to indicate if the inventory is being refreshed
|
||||
# get the user's cache option too to see if we should save the cache if it is changing
|
||||
user_cache_setting = self.get_option('cache')
|
||||
|
||||
if self._options['exclude']:
|
||||
cmd.append('--exclude')
|
||||
cmd.append(','.join(self._options['exclude']))
|
||||
|
||||
cmd.append(self._options['address'])
|
||||
try:
|
||||
# execute
|
||||
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode != 0:
|
||||
raise AnsibleParserError('Failed to run nmap, rc=%s: %s' % (p.returncode, to_native(stderr)))
|
||||
|
||||
# parse results
|
||||
host = None
|
||||
ip = None
|
||||
ports = []
|
||||
# read if the user has caching enabled and the cache isn't being refreshed
|
||||
attempt_to_read_cache = user_cache_setting and cache
|
||||
# update if the user has caching enabled and the cache is being refreshed; update this value to True if the cache has expired below
|
||||
cache_needs_update = user_cache_setting and not cache
|
||||
|
||||
if attempt_to_read_cache:
|
||||
try:
|
||||
t_stdout = to_text(stdout, errors='surrogate_or_strict')
|
||||
except UnicodeError as e:
|
||||
raise AnsibleParserError('Invalid (non unicode) input returned: %s' % to_native(e))
|
||||
results = self._cache[cache_key]
|
||||
except KeyError:
|
||||
# This occurs if the cache_key is not in the cache or if the cache_key expired, so the cache needs to be updated
|
||||
cache_needs_update = True
|
||||
|
||||
for line in t_stdout.splitlines():
|
||||
hits = self.find_host.match(line)
|
||||
if hits:
|
||||
if host is not None:
|
||||
self.inventory.set_variable(host, 'ports', ports)
|
||||
if not user_cache_setting or cache_needs_update:
|
||||
# setup command
|
||||
cmd = [self._nmap]
|
||||
if not self._options['ports']:
|
||||
cmd.append('-sP')
|
||||
|
||||
# if dns only shows arpa, just use ip instead as hostname
|
||||
if hits.group(1).endswith('.in-addr.arpa'):
|
||||
host = hits.group(2)
|
||||
else:
|
||||
host = hits.group(1)
|
||||
if self._options['ipv4'] and not self._options['ipv6']:
|
||||
cmd.append('-4')
|
||||
elif self._options['ipv6'] and not self._options['ipv4']:
|
||||
cmd.append('-6')
|
||||
elif not self._options['ipv6'] and not self._options['ipv4']:
|
||||
raise AnsibleParserError('One of ipv4 or ipv6 must be enabled for this plugin')
|
||||
|
||||
# if no reverse dns exists, just use ip instead as hostname
|
||||
if hits.group(2) is not None:
|
||||
ip = hits.group(2)
|
||||
else:
|
||||
ip = hits.group(1)
|
||||
if self._options['exclude']:
|
||||
cmd.append('--exclude')
|
||||
cmd.append(','.join(self._options['exclude']))
|
||||
|
||||
if host is not None:
|
||||
# update inventory
|
||||
self.inventory.add_host(host)
|
||||
self.inventory.set_variable(host, 'ip', ip)
|
||||
ports = []
|
||||
continue
|
||||
cmd.append(self._options['address'])
|
||||
try:
|
||||
# execute
|
||||
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode != 0:
|
||||
raise AnsibleParserError('Failed to run nmap, rc=%s: %s' % (p.returncode, to_native(stderr)))
|
||||
|
||||
host_ports = self.find_port.match(line)
|
||||
if host is not None and host_ports:
|
||||
ports.append({'port': host_ports.group(1), 'protocol': host_ports.group(2), 'state': host_ports.group(3), 'service': host_ports.group(4)})
|
||||
continue
|
||||
# parse results
|
||||
host = None
|
||||
ip = None
|
||||
ports = []
|
||||
results = []
|
||||
|
||||
# TODO: parse more data, OS?
|
||||
try:
|
||||
t_stdout = to_text(stdout, errors='surrogate_or_strict')
|
||||
except UnicodeError as e:
|
||||
raise AnsibleParserError('Invalid (non unicode) input returned: %s' % to_native(e))
|
||||
|
||||
# if any leftovers
|
||||
if host and ports:
|
||||
self.inventory.set_variable(host, 'ports', ports)
|
||||
for line in t_stdout.splitlines():
|
||||
hits = self.find_host.match(line)
|
||||
if hits:
|
||||
if host is not None and ports:
|
||||
results[-1]['ports'] = ports
|
||||
|
||||
except Exception as e:
|
||||
raise AnsibleParserError("failed to parse %s: %s " % (to_native(path), to_native(e)))
|
||||
# if dns only shows arpa, just use ip instead as hostname
|
||||
if hits.group(1).endswith('.in-addr.arpa'):
|
||||
host = hits.group(2)
|
||||
else:
|
||||
host = hits.group(1)
|
||||
|
||||
# if no reverse dns exists, just use ip instead as hostname
|
||||
if hits.group(2) is not None:
|
||||
ip = hits.group(2)
|
||||
else:
|
||||
ip = hits.group(1)
|
||||
|
||||
if host is not None:
|
||||
# update inventory
|
||||
results.append(dict())
|
||||
results[-1]['name'] = host
|
||||
results[-1]['ip'] = ip
|
||||
ports = []
|
||||
continue
|
||||
|
||||
host_ports = self.find_port.match(line)
|
||||
if host is not None and host_ports:
|
||||
ports.append({'port': host_ports.group(1),
|
||||
'protocol': host_ports.group(2),
|
||||
'state': host_ports.group(3),
|
||||
'service': host_ports.group(4)})
|
||||
continue
|
||||
|
||||
# if any leftovers
|
||||
if host and ports:
|
||||
results[-1]['ports'] = ports
|
||||
|
||||
except Exception as e:
|
||||
raise AnsibleParserError("failed to parse %s: %s " % (to_native(path), to_native(e)))
|
||||
|
||||
if cache_needs_update:
|
||||
self._cache[cache_key] = results
|
||||
|
||||
self._populate(results)
|
||||
|
||||
@@ -281,7 +281,9 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
parsed_value = [tag.strip() for tag in value.split(",")]
|
||||
self.inventory.set_variable(name, parsed_key, parsed_value)
|
||||
|
||||
if config == 'agent' and int(value):
|
||||
# The first field in the agent string tells you whether the agent is enabled
|
||||
# the rest of the comma separated string is extra config for the agent
|
||||
if config == 'agent' and int(value.split(',')[0]):
|
||||
agent_iface_key = self.to_safe('%s%s' % (key, "_interfaces"))
|
||||
agent_iface_value = self._get_agent_network_interfaces(node, vmid, vmtype)
|
||||
if agent_iface_value:
|
||||
@@ -351,6 +353,9 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
if node['type'] == 'node':
|
||||
self.inventory.add_child(nodes_group, node['node'])
|
||||
|
||||
if node['status'] == 'offline':
|
||||
continue
|
||||
|
||||
# get node IP address
|
||||
ip = self._get_node_ip(node['node'])
|
||||
self.inventory.set_variable(node['node'], 'ansible_host', ip)
|
||||
@@ -381,7 +386,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
node_qemu_group = self.to_safe('%s%s' % (self.get_option('group_prefix'), ('%s_qemu' % node['node']).lower()))
|
||||
self.inventory.add_group(node_qemu_group)
|
||||
for qemu in self._get_qemu_per_node(node['node']):
|
||||
if qemu['template']:
|
||||
if qemu.get('template'):
|
||||
continue
|
||||
|
||||
self.inventory.add_host(qemu['name'])
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
# Copyright (c) 2017 Ansible Project
|
||||
# Copyright: (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
name: scaleway
|
||||
author:
|
||||
- Remy Leone (@sieben)
|
||||
short_description: Scaleway inventory source
|
||||
description:
|
||||
- Get inventory hosts from Scaleway
|
||||
- Get inventory hosts from Scaleway.
|
||||
options:
|
||||
plugin:
|
||||
description: token that ensures this is a source file for the 'scaleway' plugin.
|
||||
description: Token that ensures this is a source file for the 'scaleway' plugin.
|
||||
required: True
|
||||
choices: ['scaleway', 'community.general.scaleway']
|
||||
regions:
|
||||
description: Filter results on a specific Scaleway region
|
||||
description: Filter results on a specific Scaleway region.
|
||||
type: list
|
||||
default:
|
||||
- ams1
|
||||
@@ -26,11 +26,13 @@ DOCUMENTATION = '''
|
||||
- par2
|
||||
- waw1
|
||||
tags:
|
||||
description: Filter results on a specific tag
|
||||
description: Filter results on a specific tag.
|
||||
type: list
|
||||
oauth_token:
|
||||
required: True
|
||||
description: Scaleway OAuth token.
|
||||
description:
|
||||
- Scaleway OAuth token.
|
||||
- More details on L(how to generate token, https://www.scaleway.com/en/docs/generate-api-keys/).
|
||||
env:
|
||||
# in order of precedence
|
||||
- name: SCW_TOKEN
|
||||
@@ -48,14 +50,14 @@ DOCUMENTATION = '''
|
||||
- hostname
|
||||
- id
|
||||
variables:
|
||||
description: 'set individual variables: keys are variable names and
|
||||
description: 'Set individual variables: keys are variable names and
|
||||
values are templates. Any value returned by the
|
||||
L(Scaleway API, https://developer.scaleway.com/#servers-server-get)
|
||||
can be used.'
|
||||
type: dict
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r'''
|
||||
# scaleway_inventory.yml file in YAML format
|
||||
# Example command line: ansible-inventory --list -i scaleway_inventory.yml
|
||||
|
||||
@@ -81,6 +83,15 @@ regions:
|
||||
- par1
|
||||
variables:
|
||||
ansible_host: public_ip.address
|
||||
|
||||
# Using static strings as variables
|
||||
plugin: community.general.scaleway
|
||||
hostnames:
|
||||
- hostname
|
||||
variables:
|
||||
ansible_host: public_ip.address
|
||||
ansible_connection: "'ssh'"
|
||||
ansible_user: "'admin'"
|
||||
'''
|
||||
|
||||
import json
|
||||
@@ -89,7 +100,7 @@ from ansible.errors import AnsibleError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, parse_pagination_link
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
|
||||
import ansible.module_utils.six.moves.urllib.parse as urllib_parse
|
||||
|
||||
@@ -105,7 +116,7 @@ def _fetch_information(token, url):
|
||||
except Exception as e:
|
||||
raise AnsibleError("Error while fetching %s: %s" % (url, to_native(e)))
|
||||
try:
|
||||
raw_json = json.loads(response.read())
|
||||
raw_json = json.loads(to_text(response.read()))
|
||||
except ValueError:
|
||||
raise AnsibleError("Incorrect JSON payload")
|
||||
|
||||
@@ -230,8 +241,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||
|
||||
if not matching_tags:
|
||||
return set()
|
||||
else:
|
||||
return matching_tags.union((server_zone,))
|
||||
return matching_tags.union((server_zone,))
|
||||
|
||||
def _filter_host(self, host_infos, hostname_preferences):
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ DOCUMENTATION = '''
|
||||
name: stackpath_compute
|
||||
short_description: StackPath Edge Computing inventory source
|
||||
version_added: 1.2.0
|
||||
author:
|
||||
- UNKNOWN (@shayrybak)
|
||||
extends_documentation_fragment:
|
||||
- inventory_cache
|
||||
- constructed
|
||||
@@ -102,13 +104,13 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
raise AnsibleError("plugin doesn't match this plugin")
|
||||
try:
|
||||
client_id = config['client_id']
|
||||
if client_id != 32:
|
||||
if len(client_id) != 32:
|
||||
raise AnsibleError("client_id must be 32 characters long")
|
||||
except KeyError:
|
||||
raise AnsibleError("config missing client_id, a required option")
|
||||
try:
|
||||
client_secret = config['client_secret']
|
||||
if client_secret != 64:
|
||||
if len(client_secret) != 64:
|
||||
raise AnsibleError("client_secret must be 64 characters long")
|
||||
except KeyError:
|
||||
raise AnsibleError("config missing client_id, a required option")
|
||||
|
||||
@@ -171,10 +171,10 @@ class LookupModule(LookupBase):
|
||||
|
||||
paramvals = {
|
||||
'key': params[0],
|
||||
'token': None,
|
||||
'recurse': False,
|
||||
'index': None,
|
||||
'datacenter': None
|
||||
'token': self.get_option('token'),
|
||||
'recurse': self.get_option('recurse'),
|
||||
'index': self.get_option('index'),
|
||||
'datacenter': self.get_option('datacenter')
|
||||
}
|
||||
|
||||
# parameters specified?
|
||||
|
||||
@@ -31,7 +31,9 @@ EXAMPLES = r"""
|
||||
- name: Template files (explicitly skip directories in order to use the 'src' attribute)
|
||||
ansible.builtin.template:
|
||||
src: '{{ item.src }}'
|
||||
dest: /web/{{ item.path }}
|
||||
# Your template files should be stored with a .j2 file extension,
|
||||
# but should not be deployed with it. splitext|first removes it.
|
||||
dest: /web/{{ item.path | splitext | first }}
|
||||
mode: '{{ item.mode }}'
|
||||
with_community.general.filetree: web/
|
||||
when: item.state == 'file'
|
||||
@@ -41,6 +43,7 @@ EXAMPLES = r"""
|
||||
src: '{{ item.src }}'
|
||||
dest: /web/{{ item.path }}
|
||||
state: link
|
||||
follow: false # avoid corrupting target files if the link already exists
|
||||
force: yes
|
||||
mode: '{{ item.mode }}'
|
||||
with_community.general.filetree: web/
|
||||
|
||||
@@ -63,6 +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
|
||||
|
||||
ANSIBLE_HIERA_CFG = os.getenv('ANSIBLE_HIERA_CFG', '/etc/hiera.yaml')
|
||||
ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera')
|
||||
@@ -78,7 +79,7 @@ class Hiera(object):
|
||||
rc, output, err = run_cmd("{0} -c {1} {2}".format(
|
||||
ANSIBLE_HIERA_BIN, ANSIBLE_HIERA_CFG, hiera_key[0]))
|
||||
|
||||
return output.strip()
|
||||
return to_text(output.strip())
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
||||
@@ -103,17 +103,26 @@ EXAMPLES = r"""
|
||||
| items2dict(key_name='slug',
|
||||
value_name='itemValue'))['password']
|
||||
}}
|
||||
"""
|
||||
|
||||
- hosts: localhost
|
||||
vars:
|
||||
secret_password: >-
|
||||
{{ ((lookup('community.general.tss', 1) | from_json).get('items') | items2dict(key_name='slug', value_name='itemValue'))['password'] }}"
|
||||
tasks:
|
||||
- ansible.builtin.debug:
|
||||
msg: the password is {{ secret_password }}
|
||||
"""
|
||||
from distutils.version import LooseVersion
|
||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||
|
||||
sdk_is_missing = False
|
||||
|
||||
try:
|
||||
from thycotic import __version__ as sdk_version
|
||||
from thycotic.secrets.server import (
|
||||
SecretServer,
|
||||
SecretServerAccessError,
|
||||
SecretServerError,
|
||||
PasswordGrantAuthorizer,
|
||||
)
|
||||
except ImportError:
|
||||
sdk_is_missing = True
|
||||
@@ -128,7 +137,20 @@ display = Display()
|
||||
class LookupModule(LookupBase):
|
||||
@staticmethod
|
||||
def Client(server_parameters):
|
||||
return SecretServer(**server_parameters)
|
||||
|
||||
if LooseVersion(sdk_version) < LooseVersion('1.0.0'):
|
||||
return SecretServer(**server_parameters)
|
||||
else:
|
||||
authorizer = PasswordGrantAuthorizer(
|
||||
server_parameters["base_url"],
|
||||
server_parameters["username"],
|
||||
server_parameters["password"],
|
||||
server_parameters["token_path_uri"],
|
||||
)
|
||||
|
||||
return SecretServer(
|
||||
server_parameters["base_url"], authorizer, server_parameters["api_path_uri"]
|
||||
)
|
||||
|
||||
def run(self, terms, variables, **kwargs):
|
||||
if sdk_is_missing:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -487,13 +487,16 @@ class CmdMixin(object):
|
||||
def run_command(self, extra_params=None, params=None, *args, **kwargs):
|
||||
self.vars.cmd_args = self._calculate_args(extra_params, params)
|
||||
options = dict(self.run_command_fixed_options)
|
||||
env_update = dict(options.get('environ_update', {}))
|
||||
options['check_rc'] = options.get('check_rc', self.check_rc)
|
||||
options.update(kwargs)
|
||||
env_update = dict(options.get('environ_update', {}))
|
||||
if self.force_lang:
|
||||
env_update.update({'LANGUAGE': self.force_lang})
|
||||
env_update.update({
|
||||
'LANGUAGE': self.force_lang,
|
||||
'LC_ALL': self.force_lang,
|
||||
})
|
||||
self.update_output(force_lang=self.force_lang)
|
||||
options['environ_update'] = env_update
|
||||
options.update(kwargs)
|
||||
rc, out, err = self.module.run_command(self.vars.cmd_args, *args, **options)
|
||||
self.update_output(rc=rc, stdout=out, stderr=err)
|
||||
return self.process_command_output(rc, out, err)
|
||||
|
||||
@@ -201,7 +201,7 @@ class OneViewModuleBase(object):
|
||||
|
||||
resource_client = None
|
||||
|
||||
def __init__(self, additional_arg_spec=None, validate_etag_support=False):
|
||||
def __init__(self, additional_arg_spec=None, validate_etag_support=False, supports_check_mode=False):
|
||||
"""
|
||||
OneViewModuleBase constructor.
|
||||
|
||||
@@ -210,7 +210,7 @@ class OneViewModuleBase(object):
|
||||
"""
|
||||
argument_spec = self._build_argument_spec(additional_arg_spec, validate_etag_support)
|
||||
|
||||
self.module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=False)
|
||||
self.module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=supports_check_mode)
|
||||
|
||||
self._check_hpe_oneview_sdk()
|
||||
self._create_oneview_client()
|
||||
|
||||
@@ -1586,13 +1586,14 @@ class RedfishUtils(object):
|
||||
|
||||
boot = data[key]
|
||||
|
||||
annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues'
|
||||
if annotation in boot:
|
||||
allowable_values = boot[annotation]
|
||||
if isinstance(allowable_values, list) and bootdevice not in allowable_values:
|
||||
return {'ret': False,
|
||||
'msg': "Boot device %s not in list of allowable values (%s)" %
|
||||
(bootdevice, allowable_values)}
|
||||
if override_enabled != 'Disabled':
|
||||
annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues'
|
||||
if annotation in boot:
|
||||
allowable_values = boot[annotation]
|
||||
if isinstance(allowable_values, list) and bootdevice not in allowable_values:
|
||||
return {'ret': False,
|
||||
'msg': "Boot device %s not in list of allowable values (%s)" %
|
||||
(bootdevice, allowable_values)}
|
||||
|
||||
# read existing values
|
||||
cur_enabled = boot.get('BootSourceOverrideEnabled')
|
||||
|
||||
@@ -20,7 +20,6 @@ except ImportError:
|
||||
XENAPI_IMP_ERR = traceback.format_exc()
|
||||
|
||||
from ansible.module_utils.basic import env_fallback, missing_required_lib
|
||||
from ansible.module_utils.common.network import is_mac
|
||||
from ansible.module_utils.ansible_release import __version__ as ANSIBLE_VERSION
|
||||
|
||||
|
||||
|
||||
@@ -382,7 +382,10 @@ def main():
|
||||
filters=dict(type='dict')
|
||||
)
|
||||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
module = AnsibleModule(
|
||||
argument_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
if module._name in ('ali_instance_facts', 'community.general.ali_instance_facts'):
|
||||
module.deprecate("The 'ali_instance_facts' module has been renamed to 'ali_instance_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
@@ -28,7 +28,6 @@ options:
|
||||
- The region of the instance. This is a required parameter only when
|
||||
creating Linode instances. See
|
||||
U(https://www.linode.com/docs/api/regions/).
|
||||
required: false
|
||||
type: str
|
||||
image:
|
||||
description:
|
||||
@@ -36,14 +35,12 @@ options:
|
||||
creating Linode instances. See
|
||||
U(https://www.linode.com/docs/api/images/).
|
||||
type: str
|
||||
required: false
|
||||
type:
|
||||
description:
|
||||
- The type of the instance. This is a required parameter only when
|
||||
creating Linode instances. See
|
||||
U(https://www.linode.com/docs/api/linode-types/).
|
||||
type: str
|
||||
required: false
|
||||
label:
|
||||
description:
|
||||
- The instance label. This label is used as the main determiner for
|
||||
@@ -56,12 +53,10 @@ options:
|
||||
group labelling is deprecated but still supported. The encouraged
|
||||
method for marking instances is to use tags.
|
||||
type: str
|
||||
required: false
|
||||
tags:
|
||||
description:
|
||||
- The tags that the instance should be marked under. See
|
||||
U(https://www.linode.com/docs/api/tags/).
|
||||
required: false
|
||||
type: list
|
||||
elements: str
|
||||
root_pass:
|
||||
@@ -69,12 +64,10 @@ options:
|
||||
- The password for the root user. If not specified, one will be
|
||||
generated. This generated password will be available in the task
|
||||
success JSON.
|
||||
required: false
|
||||
type: str
|
||||
authorized_keys:
|
||||
description:
|
||||
- A list of SSH public key parts to deploy for the root user.
|
||||
required: false
|
||||
type: list
|
||||
elements: str
|
||||
state:
|
||||
@@ -208,9 +201,8 @@ def create_linode(module, client, **kwargs):
|
||||
else:
|
||||
return response._raw_json
|
||||
except TypeError:
|
||||
module.fail_json(msg='Unable to parse Linode instance creation'
|
||||
' response. Please raise a bug against this'
|
||||
' module on https://github.com/ansible/ansible/issues'
|
||||
module.fail_json(msg='Unable to parse Linode instance creation response. Please raise a bug against this'
|
||||
' module on https://github.com/ansible-collections/community.general/issues'
|
||||
)
|
||||
|
||||
|
||||
@@ -242,15 +234,15 @@ def initialise_module():
|
||||
no_log=True,
|
||||
fallback=(env_fallback, ['LINODE_ACCESS_TOKEN']),
|
||||
),
|
||||
authorized_keys=dict(type='list', elements='str', required=False, no_log=False),
|
||||
group=dict(type='str', required=False),
|
||||
image=dict(type='str', required=False),
|
||||
region=dict(type='str', required=False),
|
||||
root_pass=dict(type='str', required=False, no_log=True),
|
||||
tags=dict(type='list', elements='str', required=False),
|
||||
type=dict(type='str', required=False),
|
||||
stackscript_id=dict(type='int', required=False),
|
||||
stackscript_data=dict(type='dict', required=False),
|
||||
authorized_keys=dict(type='list', elements='str', no_log=False),
|
||||
group=dict(type='str'),
|
||||
image=dict(type='str'),
|
||||
region=dict(type='str'),
|
||||
root_pass=dict(type='str', no_log=True),
|
||||
tags=dict(type='list', elements='str'),
|
||||
type=dict(type='str'),
|
||||
stackscript_id=dict(type='int'),
|
||||
stackscript_data=dict(type='dict'),
|
||||
),
|
||||
supports_check_mode=False,
|
||||
required_one_of=(
|
||||
|
||||
@@ -149,7 +149,7 @@ def main():
|
||||
api_key=dict(required=True, type='str', no_log=True),
|
||||
name=dict(required=True, type='str')
|
||||
),
|
||||
supports_check_mode=False
|
||||
supports_check_mode=True,
|
||||
)
|
||||
if module._name in ('memset_memstore_facts', 'community.general.memset_memstore_facts'):
|
||||
module.deprecate("The 'memset_memstore_facts' module has been renamed to 'memset_memstore_info'",
|
||||
|
||||
@@ -274,7 +274,7 @@ def main():
|
||||
api_key=dict(required=True, type='str', no_log=True),
|
||||
name=dict(required=True, type='str')
|
||||
),
|
||||
supports_check_mode=False
|
||||
supports_check_mode=True,
|
||||
)
|
||||
if module._name in ('memset_server_facts', 'community.general.memset_server_facts'):
|
||||
module.deprecate("The 'memset_server_facts' module has been renamed to 'memset_server_info'",
|
||||
|
||||
@@ -243,7 +243,6 @@ except ImportError:
|
||||
HAS_OVIRTSDK = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.removed import removed_module
|
||||
|
||||
|
||||
# ------------------------------------------------------------------- #
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright: Tristan Le Guern (@Aversiste) <tleguern at bouledef.eu>
|
||||
# Copyright: Tristan Le Guern (@tleguern) <tleguern at bouledef.eu>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -21,7 +21,7 @@ options:
|
||||
- Restrict results to a specific authentication realm.
|
||||
aliases: ['realm', 'name']
|
||||
type: str
|
||||
author: Tristan Le Guern (@Aversiste)
|
||||
author: Tristan Le Guern (@tleguern)
|
||||
extends_documentation_fragment: community.general.proxmox.documentation
|
||||
'''
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ options:
|
||||
- Restrict results to a specific group.
|
||||
aliases: ['groupid', 'name']
|
||||
type: str
|
||||
author: Tristan Le Guern (@Aversiste)
|
||||
author: Tristan Le Guern (@tleguern)
|
||||
extends_documentation_fragment: community.general.proxmox.documentation
|
||||
'''
|
||||
|
||||
|
||||
@@ -815,26 +815,27 @@ def get_vminfo(module, proxmox, node, vmid, **kwargs):
|
||||
del kwargs[k]
|
||||
|
||||
# Split information by type
|
||||
for k, v in kwargs.items():
|
||||
if re.match(r'net[0-9]', k) is not None:
|
||||
interface = k
|
||||
k = vm[k]
|
||||
k = re.search('=(.*?),', k).group(1)
|
||||
mac[interface] = k
|
||||
if (re.match(r'virtio[0-9]', k) is not None or
|
||||
re.match(r'ide[0-9]', k) is not None or
|
||||
re.match(r'scsi[0-9]', k) is not None or
|
||||
re.match(r'sata[0-9]', k) is not None):
|
||||
device = k
|
||||
k = vm[k]
|
||||
k = re.search('(.*?),', k).group(1)
|
||||
devices[device] = k
|
||||
re_net = re.compile(r'net[0-9]')
|
||||
re_dev = re.compile(r'(virtio|ide|scsi|sata)[0-9]')
|
||||
for k in kwargs.keys():
|
||||
if re_net.match(k):
|
||||
mac[k] = parse_mac(vm[k])
|
||||
elif re_dev.match(k):
|
||||
devices[k] = parse_dev(vm[k])
|
||||
|
||||
results['mac'] = mac
|
||||
results['devices'] = devices
|
||||
results['vmid'] = int(vmid)
|
||||
|
||||
|
||||
def parse_mac(netstr):
|
||||
return re.search('=(.*?),', netstr).group(1)
|
||||
|
||||
|
||||
def parse_dev(devstr):
|
||||
return re.search('(.*?)(,|$)', devstr).group(1)
|
||||
|
||||
|
||||
def settings(module, proxmox, vmid, node, name, **kwargs):
|
||||
proxmox_node = proxmox.nodes(node)
|
||||
|
||||
@@ -1226,7 +1227,7 @@ def main():
|
||||
if get_vm(proxmox, vmid) and not (update or clone):
|
||||
module.exit_json(changed=False, vmid=vmid, msg="VM with vmid <%s> already exists" % vmid)
|
||||
elif get_vmid(proxmox, name) and not (update or clone):
|
||||
module.exit_json(changed=False, vmid=vmid, msg="VM with name <%s> already exists" % name)
|
||||
module.exit_json(changed=False, vmid=get_vmid(proxmox, name)[0], msg="VM with name <%s> already exists" % name)
|
||||
elif not (node, name):
|
||||
module.fail_json(msg='node, name is mandatory for creating/updating vm')
|
||||
elif not node_check(proxmox, node):
|
||||
@@ -1302,7 +1303,7 @@ def main():
|
||||
if update:
|
||||
module.exit_json(changed=True, vmid=vmid, msg="VM %s with vmid %s updated" % (name, vmid))
|
||||
elif clone is not None:
|
||||
module.exit_json(changed=True, vmid=vmid, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid))
|
||||
module.exit_json(changed=True, vmid=newid, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid))
|
||||
else:
|
||||
module.exit_json(changed=True, msg="VM %s with vmid %s deployed" % (name, vmid), **results)
|
||||
except Exception as e:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright: Tristan Le Guern (@Aversiste) <tleguern at bouledef.eu>
|
||||
# Copyright: Tristan Le Guern (@tleguern) <tleguern at bouledef.eu>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -25,7 +25,7 @@ options:
|
||||
description:
|
||||
- Filter on a specifc storage type.
|
||||
type: str
|
||||
author: Tristan Le Guern (@Aversiste)
|
||||
author: Tristan Le Guern (@tleguern)
|
||||
extends_documentation_fragment: community.general.proxmox.documentation
|
||||
notes:
|
||||
- Storage specific options can be returned by this module, please look at the documentation at U(https://pve.proxmox.com/wiki/Storage).
|
||||
|
||||
@@ -30,7 +30,7 @@ options:
|
||||
description:
|
||||
- Restrict results to a specific user ID, which is a concatenation of a user and domain parts.
|
||||
type: str
|
||||
author: Tristan Le Guern (@Aversiste)
|
||||
author: Tristan Le Guern (@tleguern)
|
||||
extends_documentation_fragment: community.general.proxmox.documentation
|
||||
'''
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user