mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eec743f791 | ||
|
|
c6a3392bea | ||
|
|
403597da09 | ||
|
|
49df4f4b81 | ||
|
|
12b7c5c584 | ||
|
|
5336872b3e | ||
|
|
5cba378c75 | ||
|
|
25ee06d5de | ||
|
|
d526d96899 | ||
|
|
d079384e75 | ||
|
|
abc786bddd | ||
|
|
85a1eea4e6 | ||
|
|
ca385c8a45 | ||
|
|
bb689550b3 | ||
|
|
41aacb1472 | ||
|
|
3f92a6b738 | ||
|
|
ebdd8c88ec | ||
|
|
b24d27d4bd | ||
|
|
7b3319dd81 | ||
|
|
94b2e9d9ca | ||
|
|
82060a7b21 | ||
|
|
580cced80a | ||
|
|
a4d1d064c8 | ||
|
|
4e3d85798c | ||
|
|
28458b2477 | ||
|
|
e21ddcb5b6 | ||
|
|
4006db89bf | ||
|
|
62557a0e10 | ||
|
|
c305178950 | ||
|
|
8ba08ae383 | ||
|
|
ffafcb34b2 | ||
|
|
2ed03d7fb6 | ||
|
|
a007eebba8 | ||
|
|
a0a5a10c67 | ||
|
|
f01ac6f31f | ||
|
|
055b7fe4c1 | ||
|
|
906fd97c24 | ||
|
|
e91c22bbe6 | ||
|
|
ab6b2346a6 | ||
|
|
01b47a8a1f | ||
|
|
2b2386b6af | ||
|
|
c7736ab921 | ||
|
|
457c92c8e2 | ||
|
|
79f68629ff | ||
|
|
4167832db3 | ||
|
|
a57689f118 | ||
|
|
6d804ed77a | ||
|
|
90e22b93fd | ||
|
|
b372b3241a | ||
|
|
5a5ed8c3f0 | ||
|
|
f72029a518 | ||
|
|
71e894ab68 | ||
|
|
c82bc7f041 | ||
|
|
c28cade77e | ||
|
|
7ee401ab14 | ||
|
|
5652423dce | ||
|
|
0fbb0039b1 | ||
|
|
c38420d741 | ||
|
|
eb5695845e | ||
|
|
7481436027 | ||
|
|
4b54805693 | ||
|
|
5b33b0f61f | ||
|
|
83370ee97d | ||
|
|
f534ecbd2c | ||
|
|
e32de4841a | ||
|
|
611f3ed3a9 | ||
|
|
cf144df715 | ||
|
|
f717c1f4fd | ||
|
|
f51cdb367f | ||
|
|
12d3c4e174 | ||
|
|
0d1f2fd513 | ||
|
|
3b6ceeba0d | ||
|
|
20939e340e | ||
|
|
69b3489527 | ||
|
|
e734cf9384 | ||
|
|
0d23047f12 | ||
|
|
6227260432 | ||
|
|
3d923f06ed | ||
|
|
9a647554b6 | ||
|
|
fa32c1376e | ||
|
|
f7cb57677f | ||
|
|
bc97d291aa | ||
|
|
4860420c07 |
@@ -14,12 +14,24 @@ pr:
|
|||||||
|
|
||||||
schedules:
|
schedules:
|
||||||
- cron: 0 8 * * *
|
- cron: 0 8 * * *
|
||||||
displayName: Nightly
|
displayName: Nightly (main)
|
||||||
always: true
|
always: true
|
||||||
branches:
|
branches:
|
||||||
include:
|
include:
|
||||||
- main
|
- 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:
|
variables:
|
||||||
- name: checkoutPath
|
- name: checkoutPath
|
||||||
@@ -36,20 +48,20 @@ variables:
|
|||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: default
|
- container: default
|
||||||
image: quay.io/ansible/azure-pipelines-test-container:1.8.0
|
image: quay.io/ansible/azure-pipelines-test-container:1.9.0
|
||||||
|
|
||||||
pool: Standard
|
pool: Standard
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
### Sanity
|
### Sanity
|
||||||
- stage: Sanity_devel
|
- stage: Sanity_2_11
|
||||||
displayName: Sanity devel
|
displayName: Sanity 2.11
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
nameFormat: Test {0}
|
nameFormat: Test {0}
|
||||||
testFormat: devel/sanity/{0}
|
testFormat: 2.11/sanity/{0}
|
||||||
targets:
|
targets:
|
||||||
- test: 1
|
- test: 1
|
||||||
- test: 2
|
- test: 2
|
||||||
@@ -83,14 +95,14 @@ stages:
|
|||||||
- test: 3
|
- test: 3
|
||||||
- test: 4
|
- test: 4
|
||||||
### Units
|
### Units
|
||||||
- stage: Units_devel
|
- stage: Units_2_11
|
||||||
displayName: Units devel
|
displayName: Units 2.11
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
nameFormat: Python {0}
|
nameFormat: Python {0}
|
||||||
testFormat: devel/units/{0}/1
|
testFormat: 2.11/units/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- test: 2.6
|
- test: 2.6
|
||||||
- test: 2.7
|
- test: 2.7
|
||||||
@@ -132,13 +144,13 @@ stages:
|
|||||||
- test: 3.8
|
- test: 3.8
|
||||||
|
|
||||||
## Remote
|
## Remote
|
||||||
- stage: Remote_devel
|
- stage: Remote_2_11
|
||||||
displayName: Remote devel
|
displayName: Remote 2.11
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
testFormat: devel/{0}
|
testFormat: 2.11/{0}
|
||||||
targets:
|
targets:
|
||||||
- name: macOS 11.1
|
- name: macOS 11.1
|
||||||
test: macos/11.1
|
test: macos/11.1
|
||||||
@@ -196,13 +208,13 @@ stages:
|
|||||||
- 2
|
- 2
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
- stage: Docker_devel
|
- stage: Docker_2_11
|
||||||
displayName: Docker devel
|
displayName: Docker 2.11
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
testFormat: devel/linux/{0}
|
testFormat: 2.11/linux/{0}
|
||||||
targets:
|
targets:
|
||||||
- name: CentOS 6
|
- name: CentOS 6
|
||||||
test: centos6
|
test: centos6
|
||||||
@@ -270,14 +282,14 @@ stages:
|
|||||||
- 5
|
- 5
|
||||||
|
|
||||||
### Cloud
|
### Cloud
|
||||||
- stage: Cloud_devel
|
- stage: Cloud_2_11
|
||||||
displayName: Cloud devel
|
displayName: Cloud 2.11
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
nameFormat: Python {0}
|
nameFormat: Python {0}
|
||||||
testFormat: devel/cloud/{0}/1
|
testFormat: 2.11/cloud/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- test: 2.7
|
- test: 2.7
|
||||||
- test: 3.6
|
- test: 3.6
|
||||||
@@ -304,19 +316,19 @@ stages:
|
|||||||
- stage: Summary
|
- stage: Summary
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- Sanity_devel
|
- Sanity_2_11
|
||||||
- Sanity_2_9
|
- Sanity_2_9
|
||||||
- Sanity_2_10
|
- Sanity_2_10
|
||||||
- Units_devel
|
- Units_2_11
|
||||||
- Units_2_9
|
- Units_2_9
|
||||||
- Units_2_10
|
- Units_2_10
|
||||||
- Remote_devel
|
- Remote_2_11
|
||||||
- Remote_2_9
|
- Remote_2_9
|
||||||
- Remote_2_10
|
- Remote_2_10
|
||||||
- Docker_devel
|
- Docker_2_11
|
||||||
- Docker_2_9
|
- Docker_2_9
|
||||||
- Docker_2_10
|
- Docker_2_10
|
||||||
- Cloud_devel
|
- Cloud_2_11
|
||||||
- Cloud_2_9
|
- Cloud_2_9
|
||||||
- Cloud_2_10
|
- Cloud_2_10
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ set -o pipefail -eu
|
|||||||
|
|
||||||
output_path="$1"
|
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
|
for file in "${output_path}"/reports/coverage*.xml; do
|
||||||
name="${file}"
|
name="${file}"
|
||||||
|
|||||||
29
.github/BOTMETA.yml
vendored
29
.github/BOTMETA.yml
vendored
@@ -1,5 +1,7 @@
|
|||||||
automerge: true
|
automerge: true
|
||||||
files:
|
files:
|
||||||
|
plugins/:
|
||||||
|
supershipit: quidame Ajpantuso
|
||||||
changelogs/fragments/:
|
changelogs/fragments/:
|
||||||
support: community
|
support: community
|
||||||
$actions:
|
$actions:
|
||||||
@@ -106,6 +108,8 @@ files:
|
|||||||
maintainers: $team_linode
|
maintainers: $team_linode
|
||||||
labels: cloud linode
|
labels: cloud linode
|
||||||
keywords: linode dynamic inventory script
|
keywords: linode dynamic inventory script
|
||||||
|
$inventories/proxmox.py:
|
||||||
|
maintainers: $team_virt ilijamt
|
||||||
$inventories/scaleway.py:
|
$inventories/scaleway.py:
|
||||||
maintainers: $team_scaleway
|
maintainers: $team_scaleway
|
||||||
labels: cloud scaleway
|
labels: cloud scaleway
|
||||||
@@ -258,6 +262,8 @@ files:
|
|||||||
maintainers: zbal
|
maintainers: zbal
|
||||||
$modules/cloud/lxc/lxc_container.py:
|
$modules/cloud/lxc/lxc_container.py:
|
||||||
maintainers: cloudnull
|
maintainers: cloudnull
|
||||||
|
$modules/cloud/lxc/lxc_profile.py:
|
||||||
|
maintainers: conloos
|
||||||
$modules/cloud/lxd/:
|
$modules/cloud/lxd/:
|
||||||
ignore: hnakamur
|
ignore: hnakamur
|
||||||
$modules/cloud/memset/:
|
$modules/cloud/memset/:
|
||||||
@@ -373,6 +379,7 @@ files:
|
|||||||
maintainers: bvitnik
|
maintainers: bvitnik
|
||||||
$modules/clustering/consul/:
|
$modules/clustering/consul/:
|
||||||
maintainers: $team_consul
|
maintainers: $team_consul
|
||||||
|
ignore: colin-nolan
|
||||||
$modules/clustering/etcd3.py:
|
$modules/clustering/etcd3.py:
|
||||||
maintainers: evrardjp
|
maintainers: evrardjp
|
||||||
ignore: vfauth
|
ignore: vfauth
|
||||||
@@ -523,7 +530,7 @@ files:
|
|||||||
$modules/net_tools/dnsmadeeasy.py:
|
$modules/net_tools/dnsmadeeasy.py:
|
||||||
maintainers: briceburg
|
maintainers: briceburg
|
||||||
$modules/net_tools/haproxy.py:
|
$modules/net_tools/haproxy.py:
|
||||||
maintainers: ravibhure
|
maintainers: ravibhure Normo
|
||||||
$modules/net_tools/hetzner_failover_ip.py:
|
$modules/net_tools/hetzner_failover_ip.py:
|
||||||
maintainers: felixfontein
|
maintainers: felixfontein
|
||||||
$modules/net_tools/hetzner_failover_ip_info.py:
|
$modules/net_tools/hetzner_failover_ip_info.py:
|
||||||
@@ -821,7 +828,7 @@ files:
|
|||||||
$modules/remote_management/oneview/oneview_fcoe_network.py:
|
$modules/remote_management/oneview/oneview_fcoe_network.py:
|
||||||
maintainers: fgbulsoni
|
maintainers: fgbulsoni
|
||||||
$modules/remote_management/redfish/:
|
$modules/remote_management/redfish/:
|
||||||
maintainers: $team_redfish billdodd
|
maintainers: $team_redfish
|
||||||
ignore: jose-delarosa
|
ignore: jose-delarosa
|
||||||
$modules/remote_management/stacki/stacki_host.py:
|
$modules/remote_management/stacki/stacki_host.py:
|
||||||
maintainers: bsanders bbyhuy
|
maintainers: bsanders bbyhuy
|
||||||
@@ -846,6 +853,8 @@ files:
|
|||||||
ignore: erydo
|
ignore: erydo
|
||||||
$modules/source_control/github/github_release.py:
|
$modules/source_control/github/github_release.py:
|
||||||
maintainers: adrianmoisey
|
maintainers: adrianmoisey
|
||||||
|
$modules/source_control/github/github_repo.py:
|
||||||
|
maintainers: atorrescogollo
|
||||||
$modules/source_control/github/:
|
$modules/source_control/github/:
|
||||||
maintainers: stpierre
|
maintainers: stpierre
|
||||||
$modules/source_control/gitlab/:
|
$modules/source_control/gitlab/:
|
||||||
@@ -929,7 +938,7 @@ files:
|
|||||||
$modules/system/iptables_state.py:
|
$modules/system/iptables_state.py:
|
||||||
maintainers: quidame
|
maintainers: quidame
|
||||||
$modules/system/java_cert.py:
|
$modules/system/java_cert.py:
|
||||||
maintainers: haad
|
maintainers: haad absynth76
|
||||||
$modules/system/java_keystore.py:
|
$modules/system/java_keystore.py:
|
||||||
maintainers: Mogztter
|
maintainers: Mogztter
|
||||||
$modules/system/kernel_blacklist.py:
|
$modules/system/kernel_blacklist.py:
|
||||||
@@ -1012,7 +1021,7 @@ files:
|
|||||||
maintainers: ahtik ovcharenko pyykkis
|
maintainers: ahtik ovcharenko pyykkis
|
||||||
labels: ufw
|
labels: ufw
|
||||||
$modules/system/vdo.py:
|
$modules/system/vdo.py:
|
||||||
maintainers: bgurney-rh
|
maintainers: rhawalsh
|
||||||
$modules/system/xfconf.py:
|
$modules/system/xfconf.py:
|
||||||
maintainers: russoz jbenden
|
maintainers: russoz jbenden
|
||||||
labels: xfconf
|
labels: xfconf
|
||||||
@@ -1097,16 +1106,16 @@ macros:
|
|||||||
terminals: plugins/terminal
|
terminals: plugins/terminal
|
||||||
team_aix: MorrisA bcoca d-little flynn1973 gforster kairoaraujo marvin-sinister mator molekuul ramooncamacho wtcross
|
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_bsd: JoergFiedler MacLemon bcoca dch jasperla mekanix opoplawski overhacked tuxillo
|
||||||
team_consul: colin-nolan sgargan
|
team_consul: sgargan
|
||||||
team_cyberark_conjur: jvanderhoof ryanprior
|
team_cyberark_conjur: jvanderhoof ryanprior
|
||||||
team_docker: DBendit WojciechowskiPiotr akshay196 danihodovic dariko felixfontein jwitko kassiansun tbouvet chouseknecht
|
team_docker: DBendit WojciechowskiPiotr akshay196 danihodovic dariko felixfontein jwitko kassiansun tbouvet chouseknecht
|
||||||
team_e_spirit: MatrixCrawler getjack
|
team_e_spirit: MatrixCrawler getjack
|
||||||
team_flatpak: JayKayy oolongbrothers
|
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_google: erjohnso rambleraptor
|
team_google: erjohnso rambleraptor
|
||||||
team_hpux: bcoca davx8342
|
team_hpux: bcoca davx8342
|
||||||
team_huawei: QijunPan TommyLike edisonxiang freesky-edward hwDCN niuzhenguo xuxiaowei0512 yanzhangi zengchen1024 zhongjun2
|
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_jboss: Wolfant jairojunior wbrefvem
|
||||||
team_keycloak: eikef ndclt
|
team_keycloak: eikef ndclt
|
||||||
team_kubevirt: machacekondra mmazur pkliczewski
|
team_kubevirt: machacekondra mmazur pkliczewski
|
||||||
@@ -1115,13 +1124,13 @@ macros:
|
|||||||
team_manageiq: abellotti cben gtanzillo yaacov zgalor dkorn evertmulder
|
team_manageiq: abellotti cben gtanzillo yaacov zgalor dkorn evertmulder
|
||||||
team_netapp: amit0701 carchi8py hulquest lmprice lonico ndswartz schmots1
|
team_netapp: amit0701 carchi8py hulquest lmprice lonico ndswartz schmots1
|
||||||
team_networking: NilashishC Qalthos danielmellado ganeshrn justjais trishnaguha sganesh-infoblox privateip
|
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_oracle: manojmeda mross22 nalsaber
|
||||||
team_postgresql: Andersson007 Dorn- andytom jbscalia kostiantyn-nemchenko matburt nerzhul sebasmannem tcraxs ilicmilan
|
team_postgresql: Andersson007 Dorn- andytom jbscalia kostiantyn-nemchenko matburt nerzhul sebasmannem tcraxs ilicmilan
|
||||||
team_purestorage: bannaych dnix101 genegr lionmax opslounge raekins sdodsley sile16
|
team_purestorage: bannaych dnix101 genegr lionmax opslounge raekins sdodsley sile16
|
||||||
team_redfish: billdodd mraineri tomasg2012 xmadsen renxulei
|
team_redfish: mraineri tomasg2012 xmadsen renxulei
|
||||||
team_rhn: FlossWare alikins barnabycourt vritant
|
team_rhn: FlossWare alikins barnabycourt vritant
|
||||||
team_scaleway: QuentinBrosse abarbare jerome-quere kindermoumoute remyleone sieben
|
team_scaleway: QuentinBrosse abarbare jerome-quere kindermoumoute remyleone sieben
|
||||||
team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l
|
team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l
|
||||||
team_suse: commel dcermak evrardjp lrupp toabctl AnderEnder alxgu andytom
|
team_suse: commel dcermak evrardjp lrupp toabctl AnderEnder alxgu andytom
|
||||||
team_virt: joshainglis karmab Aversiste
|
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
|
# 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.gitignore.io/?templates=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 ###
|
### dotenv ###
|
||||||
.env
|
.env
|
||||||
@@ -88,7 +88,7 @@ flycheck_*.el
|
|||||||
.nfs*
|
.nfs*
|
||||||
|
|
||||||
### PyCharm+all ###
|
### 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
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
# User-specific stuff
|
# User-specific stuff
|
||||||
@@ -98,6 +98,9 @@ flycheck_*.el
|
|||||||
.idea/**/dictionaries
|
.idea/**/dictionaries
|
||||||
.idea/**/shelf
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# AWS User-specific
|
||||||
|
.idea/**/aws.xml
|
||||||
|
|
||||||
# Generated files
|
# Generated files
|
||||||
.idea/**/contentModel.xml
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
@@ -118,6 +121,9 @@ flycheck_*.el
|
|||||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
# 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
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
# auto-import.
|
# auto-import.
|
||||||
|
# .idea/artifacts
|
||||||
|
# .idea/compiler.xml
|
||||||
|
# .idea/jarRepositories.xml
|
||||||
# .idea/modules.xml
|
# .idea/modules.xml
|
||||||
# .idea/*.iml
|
# .idea/*.iml
|
||||||
# .idea/modules
|
# .idea/modules
|
||||||
@@ -198,7 +204,6 @@ parts/
|
|||||||
sdist/
|
sdist/
|
||||||
var/
|
var/
|
||||||
wheels/
|
wheels/
|
||||||
pip-wheel-metadata/
|
|
||||||
share/python-wheels/
|
share/python-wheels/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
.installed.cfg
|
.installed.cfg
|
||||||
@@ -225,13 +230,25 @@ htmlcov/
|
|||||||
nosetests.xml
|
nosetests.xml
|
||||||
coverage.xml
|
coverage.xml
|
||||||
*.cover
|
*.cover
|
||||||
|
*.py,cover
|
||||||
.hypothesis/
|
.hypothesis/
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
*.pot
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
# Scrapy stuff:
|
# Scrapy stuff:
|
||||||
.scrapy
|
.scrapy
|
||||||
|
|
||||||
@@ -239,9 +256,19 @@ coverage.xml
|
|||||||
docs/_build/
|
docs/_build/
|
||||||
|
|
||||||
# PyBuilder
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
target/
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
# pyenv
|
# 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
|
.python-version
|
||||||
|
|
||||||
# pipenv
|
# pipenv
|
||||||
@@ -251,12 +278,24 @@ target/
|
|||||||
# install all needed dependencies.
|
# install all needed dependencies.
|
||||||
#Pipfile.lock
|
#Pipfile.lock
|
||||||
|
|
||||||
# celery beat schedule file
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
celerybeat-schedule
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
# SageMath parsed files
|
# SageMath parsed files
|
||||||
*.sage.py
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
# Spyder project settings
|
# Spyder project settings
|
||||||
.spyderproject
|
.spyderproject
|
||||||
.spyproject
|
.spyproject
|
||||||
@@ -264,10 +303,6 @@ celerybeat-schedule
|
|||||||
# Rope project settings
|
# Rope project settings
|
||||||
.ropeproject
|
.ropeproject
|
||||||
|
|
||||||
# Mr Developer
|
|
||||||
.mr.developer.cfg
|
|
||||||
.project
|
|
||||||
|
|
||||||
# mkdocs documentation
|
# mkdocs documentation
|
||||||
/site
|
/site
|
||||||
|
|
||||||
@@ -279,9 +314,16 @@ dmypy.json
|
|||||||
# Pyre type checker
|
# Pyre type checker
|
||||||
.pyre/
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
### Vim ###
|
### Vim ###
|
||||||
# Swap
|
# Swap
|
||||||
[._]*.s[a-v][a-z]
|
[._]*.s[a-v][a-z]
|
||||||
|
!*.svg # comment out if you don't need vector files
|
||||||
[._]*.sw[a-p]
|
[._]*.sw[a-p]
|
||||||
[._]s[a-rt-v][a-z]
|
[._]s[a-rt-v][a-z]
|
||||||
[._]ss[a-gi-z]
|
[._]ss[a-gi-z]
|
||||||
@@ -299,11 +341,13 @@ tags
|
|||||||
[._]*.un~
|
[._]*.un~
|
||||||
|
|
||||||
### WebStorm ###
|
### 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
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
# User-specific stuff
|
# User-specific stuff
|
||||||
|
|
||||||
|
# AWS User-specific
|
||||||
|
|
||||||
# Generated files
|
# Generated files
|
||||||
|
|
||||||
# Sensitive or high-churn files
|
# Sensitive or high-churn files
|
||||||
@@ -314,6 +358,9 @@ tags
|
|||||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
# 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
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
# auto-import.
|
# auto-import.
|
||||||
|
# .idea/artifacts
|
||||||
|
# .idea/compiler.xml
|
||||||
|
# .idea/jarRepositories.xml
|
||||||
# .idea/modules.xml
|
# .idea/modules.xml
|
||||||
# .idea/*.iml
|
# .idea/*.iml
|
||||||
# .idea/modules
|
# .idea/modules
|
||||||
@@ -349,15 +396,27 @@ tags
|
|||||||
# *.ipr
|
# *.ipr
|
||||||
|
|
||||||
# Sonarlint plugin
|
# Sonarlint plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
||||||
.idea/**/sonarlint/
|
.idea/**/sonarlint/
|
||||||
|
|
||||||
# SonarQube Plugin
|
# SonarQube Plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
||||||
.idea/**/sonarIssues.xml
|
.idea/**/sonarIssues.xml
|
||||||
|
|
||||||
# Markdown Navigator plugin
|
# Markdown Navigator plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
||||||
.idea/**/markdown-navigator.xml
|
.idea/**/markdown-navigator.xml
|
||||||
|
.idea/**/markdown-navigator-enh.xml
|
||||||
.idea/**/markdown-navigator/
|
.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 ###
|
||||||
# Windows thumbnail cache files
|
# Windows thumbnail cache files
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
@@ -384,4 +443,4 @@ $RECYCLE.BIN/
|
|||||||
# Windows shortcuts
|
# Windows shortcuts
|
||||||
*.lnk
|
*.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
|
||||||
|
|||||||
133
CHANGELOG.rst
133
CHANGELOG.rst
@@ -5,6 +5,139 @@ Community General Release Notes
|
|||||||
.. contents:: Topics
|
.. contents:: Topics
|
||||||
|
|
||||||
|
|
||||||
|
v1.3.12
|
||||||
|
=======
|
||||||
|
|
||||||
|
Release Summary
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Fix check mode support for ``_info`` and ``_facts`` modules.
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- ali_instance_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||||
|
- docker_stack_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
||||||
|
- docker_stack_task_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
||||||
|
- gcpubsub_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
||||||
|
- 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).
|
||||||
|
- 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).
|
||||||
|
- 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).
|
||||||
|
- 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).
|
||||||
|
- 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_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).
|
||||||
|
- 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).
|
||||||
|
|
||||||
|
v1.3.11
|
||||||
|
=======
|
||||||
|
|
||||||
|
Release Summary
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Maintenance release.
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- ovirt* modules - remove bad unnecessary import for current ansible-core development version (https://github.com/ansible-collections/community.general/pull/2381).
|
||||||
|
|
||||||
|
v1.3.10
|
||||||
|
=======
|
||||||
|
|
||||||
|
Release Summary
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Last regular bugfix release. There will only be new bugfix releases for security fixes and major bugfixes.
|
||||||
|
|
||||||
|
Minor Changes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- atomic_container - using ``get_bin_path()`` before calling ``run_command()`` (https://github.com/ansible-collections/community.general/pull/2144).
|
||||||
|
- atomic_host - using ``get_bin_path()`` before calling ``run_command()`` (https://github.com/ansible-collections/community.general/pull/2144).
|
||||||
|
- atomic_image - using ``get_bin_path()`` before calling ``run_command()`` (https://github.com/ansible-collections/community.general/pull/2144).
|
||||||
|
- beadm - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- bitbucket_pipeline_variable - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
||||||
|
- hiera lookup - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- ipwcli_dns - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- known_hosts module utils - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- nictagadm - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- ovh_ip_failover - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
||||||
|
- rhevm - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
||||||
|
- smartos_image_info - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- svr4pkg - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- xattr - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- zfs_facts - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- zpool_facts - minor refactor converting multiple statements to a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
|
||||||
|
Security Fixes
|
||||||
|
--------------
|
||||||
|
|
||||||
|
- java_keystore - pass secret to keytool through an environment variable to not expose it as a commandline argument (https://github.com/ansible-collections/community.general/issues/1668).
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- dimensiondata_network - bug when formatting message, instead of % a simple comma was used (https://github.com/ansible-collections/community.general/pull/2139).
|
||||||
|
- funcd connection plugin - can now load (https://github.com/ansible-collections/community.general/pull/2235).
|
||||||
|
- haproxy - fix a bug preventing haproxy from properly entering ``DRAIN`` mode (https://github.com/ansible-collections/community.general/issues/1913).
|
||||||
|
- hiera lookup plugin - converts the return type of plugin to unicode string (https://github.com/ansible-collections/community.general/pull/2329).
|
||||||
|
- ipa_user - allow ``sshpubkey`` to permit multiple word comments (https://github.com/ansible-collections/community.general/pull/2159).
|
||||||
|
- java_keystore - improve error handling and return ``cmd`` as documented. Force ``LANG``, ``LC_ALL`` and ``LC_MESSAGES`` environment variables to ``C`` to rely on ``keytool`` output parsing. Fix pylint's ``unused-variable`` and ``no-else-return`` hints (https://github.com/ansible-collections/community.general/pull/2183).
|
||||||
|
- java_keystore - use tempfile lib to create temporary files with randomized names, and remove the temporary PKCS#12 keystore as well as other materials (https://github.com/ansible-collections/community.general/issues/1667).
|
||||||
|
- jenkins_plugin - fixes Python 2 compatibility issue (https://github.com/ansible-collections/community.general/pull/2340).
|
||||||
|
- kibana_plugin - added missing parameter to ``remove_plugin`` when using ``state=present force=true``, and fix potential quoting errors when invoking ``kibana`` (https://github.com/ansible-collections/community.general/pull/2143).
|
||||||
|
- module_helper module utils - fixed decorator ``cause_changes`` (https://github.com/ansible-collections/community.general/pull/2203).
|
||||||
|
- nmap inventory plugin - fix cache and constructed group support (https://github.com/ansible-collections/community.general/issues/2242).
|
||||||
|
- pkgutil - fixed calls to ``list.extend()`` (https://github.com/ansible-collections/community.general/pull/2161).
|
||||||
|
- 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).
|
||||||
|
- vmadm - correct type of list elements in ``resolvers`` parameter (https://github.com/ansible-collections/community.general/issues/2135).
|
||||||
|
- xfconf - module was not honoring check mode when ``state`` was ``absent`` (https://github.com/ansible-collections/community.general/pull/2185).
|
||||||
|
- zypper, zypper_repository - respect ``PATH`` environment variable when resolving zypper executable path (https://github.com/ansible-collections/community.general/pull/2094).
|
||||||
|
|
||||||
v1.3.9
|
v1.3.9
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|||||||
32
CONTRIBUTING.md
Normal file
32
CONTRIBUTING.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# 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).
|
||||||
|
|
||||||
|
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.
|
||||||
12
README.md
12
README.md
@@ -7,9 +7,11 @@ This repo contains the `community.general` Ansible Collection. The collection in
|
|||||||
|
|
||||||
You can find [documentation for this collection on the Ansible docs site](https://docs.ansible.com/ansible/latest/collections/community/general/).
|
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.
|
||||||
|
|
||||||
## Tested with Ansible
|
## Tested with Ansible
|
||||||
|
|
||||||
Tested with the current Ansible 2.9 and 2.10 releases and the current development version of Ansible. Ansible versions before 2.9.10 are not supported.
|
Tested with the current Ansible 2.9, ansible-base 2.10 and ansible-core 2.11 releases. Ansible versions before 2.9.10 are not supported.
|
||||||
|
|
||||||
## External requirements
|
## External requirements
|
||||||
|
|
||||||
@@ -48,6 +50,8 @@ export COLLECTIONS_PATH=$(pwd)/collections:$COLLECTIONS_PATH
|
|||||||
|
|
||||||
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).
|
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
|
### Running tests
|
||||||
|
|
||||||
See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#testing-collections).
|
See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#testing-collections).
|
||||||
@@ -56,10 +60,10 @@ See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collectio
|
|||||||
|
|
||||||
We have a dedicated Working Group for Ansible development.
|
We have a dedicated Working Group for Ansible development.
|
||||||
|
|
||||||
You can find other people interested on the following Freenode IRC channels -
|
You can find other people interested on the following [Libera.chat](https://libera.chat/) IRC channels -
|
||||||
- `#ansible` - For general use questions and support.
|
- `#ansible` - For general use questions and support.
|
||||||
- `#ansible-devel` - For discussions on developer topics and code related to features or bugs.
|
- `#ansible-devel` - For discussions on developer topics and code related to features or bugs in ansible-core.
|
||||||
- `#ansible-community` - For discussions on community topics and community meetings.
|
- `#ansible-community` - For discussions on community topics and community meetings, and for general development questions for community collections.
|
||||||
|
|
||||||
For more information about communities, meetings and agendas see [Community Wiki](https://github.com/ansible/community/wiki/Community).
|
For more information about communities, meetings and agendas see [Community Wiki](https://github.com/ansible/community/wiki/Community).
|
||||||
|
|
||||||
|
|||||||
@@ -1627,6 +1627,169 @@ releases:
|
|||||||
- fix_parsing_array_values_in_osx_defaults.yml
|
- fix_parsing_array_values_in_osx_defaults.yml
|
||||||
- nios_host_record-fix-aliases-removal.yml
|
- nios_host_record-fix-aliases-removal.yml
|
||||||
release_date: '2020-12-21'
|
release_date: '2020-12-21'
|
||||||
|
1.3.10:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- dimensiondata_network - bug when formatting message, instead of % a simple
|
||||||
|
comma was used (https://github.com/ansible-collections/community.general/pull/2139).
|
||||||
|
- funcd connection plugin - can now load (https://github.com/ansible-collections/community.general/pull/2235).
|
||||||
|
- haproxy - fix a bug preventing haproxy from properly entering ``DRAIN`` mode
|
||||||
|
(https://github.com/ansible-collections/community.general/issues/1913).
|
||||||
|
- hiera lookup plugin - converts the return type of plugin to unicode string
|
||||||
|
(https://github.com/ansible-collections/community.general/pull/2329).
|
||||||
|
- ipa_user - allow ``sshpubkey`` to permit multiple word comments (https://github.com/ansible-collections/community.general/pull/2159).
|
||||||
|
- java_keystore - improve error handling and return ``cmd`` as documented. Force
|
||||||
|
``LANG``, ``LC_ALL`` and ``LC_MESSAGES`` environment variables to ``C`` to
|
||||||
|
rely on ``keytool`` output parsing. Fix pylint's ``unused-variable`` and ``no-else-return``
|
||||||
|
hints (https://github.com/ansible-collections/community.general/pull/2183).
|
||||||
|
- java_keystore - use tempfile lib to create temporary files with randomized
|
||||||
|
names, and remove the temporary PKCS#12 keystore as well as other materials
|
||||||
|
(https://github.com/ansible-collections/community.general/issues/1667).
|
||||||
|
- jenkins_plugin - fixes Python 2 compatibility issue (https://github.com/ansible-collections/community.general/pull/2340).
|
||||||
|
- kibana_plugin - added missing parameter to ``remove_plugin`` when using ``state=present
|
||||||
|
force=true``, and fix potential quoting errors when invoking ``kibana`` (https://github.com/ansible-collections/community.general/pull/2143).
|
||||||
|
- module_helper module utils - fixed decorator ``cause_changes`` (https://github.com/ansible-collections/community.general/pull/2203).
|
||||||
|
- nmap inventory plugin - fix cache and constructed group support (https://github.com/ansible-collections/community.general/issues/2242).
|
||||||
|
- pkgutil - fixed calls to ``list.extend()`` (https://github.com/ansible-collections/community.general/pull/2161).
|
||||||
|
- 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).
|
||||||
|
- vmadm - correct type of list elements in ``resolvers`` parameter (https://github.com/ansible-collections/community.general/issues/2135).
|
||||||
|
- xfconf - module was not honoring check mode when ``state`` was ``absent``
|
||||||
|
(https://github.com/ansible-collections/community.general/pull/2185).
|
||||||
|
- zypper, zypper_repository - respect ``PATH`` environment variable when resolving
|
||||||
|
zypper executable path (https://github.com/ansible-collections/community.general/pull/2094).
|
||||||
|
minor_changes:
|
||||||
|
- atomic_container - using ``get_bin_path()`` before calling ``run_command()``
|
||||||
|
(https://github.com/ansible-collections/community.general/pull/2144).
|
||||||
|
- atomic_host - using ``get_bin_path()`` before calling ``run_command()`` (https://github.com/ansible-collections/community.general/pull/2144).
|
||||||
|
- atomic_image - using ``get_bin_path()`` before calling ``run_command()`` (https://github.com/ansible-collections/community.general/pull/2144).
|
||||||
|
- beadm - minor refactor converting multiple statements to a single list literal
|
||||||
|
(https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- bitbucket_pipeline_variable - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
||||||
|
- hiera lookup - minor refactor converting multiple statements to a single list
|
||||||
|
literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- ipwcli_dns - minor refactor converting multiple statements to a single list
|
||||||
|
literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- known_hosts module utils - minor refactor converting multiple statements to
|
||||||
|
a single list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- nictagadm - minor refactor converting multiple statements to a single list
|
||||||
|
literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- ovh_ip_failover - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
||||||
|
- rhevm - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
||||||
|
- smartos_image_info - minor refactor converting multiple statements to a single
|
||||||
|
list literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- svr4pkg - minor refactor converting multiple statements to a single list literal
|
||||||
|
(https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- xattr - minor refactor converting multiple statements to a single list literal
|
||||||
|
(https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- zfs_facts - minor refactor converting multiple statements to a single list
|
||||||
|
literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
- zpool_facts - minor refactor converting multiple statements to a single list
|
||||||
|
literal (https://github.com/ansible-collections/community.general/pull/2160).
|
||||||
|
release_summary: Last regular bugfix release. There will only be new bugfix
|
||||||
|
releases for security fixes and major bugfixes.
|
||||||
|
security_fixes:
|
||||||
|
- java_keystore - pass secret to keytool through an environment variable to
|
||||||
|
not expose it as a commandline argument (https://github.com/ansible-collections/community.general/issues/1668).
|
||||||
|
fragments:
|
||||||
|
- 1.3.10.yml
|
||||||
|
- 1993-haproxy-fix-draining.yml
|
||||||
|
- 2094-bugfix-respect-PATH-env-variable-in-zypper-modules.yaml
|
||||||
|
- 2135-vmadm-resolvers-type-fix.yml
|
||||||
|
- 2139-dimensiondata_network-str-format.yml
|
||||||
|
- 2143-kibana_plugin-fixed-function-calls.yml
|
||||||
|
- 2144-atomic_get_bin_path.yml
|
||||||
|
- 2157-unreachable-code.yml
|
||||||
|
- 2159-ipa-user-sshpubkey-multi-word-comments.yaml
|
||||||
|
- 2160-list-literals.yml
|
||||||
|
- 2161-pkgutil-list-extend.yml
|
||||||
|
- 2163-java_keystore_1667_improve_temp_files_storage.yml
|
||||||
|
- 2177-java_keystore_1668_dont_expose_secrets_on_cmdline.yml
|
||||||
|
- 2183-java_keystore_improve_error_handling.yml
|
||||||
|
- 2185-xfconf-absent-check-mode.yml
|
||||||
|
- 2203-modhelper-cause-changes-deco.yml
|
||||||
|
- 2246-terraform.yaml
|
||||||
|
- 2282-nmap-fix-cache-support.yml
|
||||||
|
- 2329-hiera-lookup-plugin-return-type.yaml
|
||||||
|
- 2340-jenkins_plugin-py2.yml
|
||||||
|
- allow_funcd_to_load.yml
|
||||||
|
release_date: '2021-04-26'
|
||||||
|
1.3.11:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- ovirt* modules - remove bad unnecessary import for current ansible-core development
|
||||||
|
version (https://github.com/ansible-collections/community.general/pull/2381).
|
||||||
|
release_summary: Maintenance release.
|
||||||
|
fragments:
|
||||||
|
- 1.3.11.yml
|
||||||
|
- ovirt-fixup.yml
|
||||||
|
release_date: '2021-06-28'
|
||||||
|
1.3.12:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- ali_instance_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||||
|
- docker_stack_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
||||||
|
- docker_stack_task_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
||||||
|
- gcpubsub_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
||||||
|
- 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).
|
||||||
|
- 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).
|
||||||
|
- 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).
|
||||||
|
- 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).
|
||||||
|
- 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_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).
|
||||||
|
- 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: Fix check mode support for ``_info`` and ``_facts`` modules.
|
||||||
|
fragments:
|
||||||
|
- 1.3.12.yml
|
||||||
|
- 3084-info-checkmode.yaml
|
||||||
|
release_date: '2021-08-31'
|
||||||
1.3.2:
|
1.3.2:
|
||||||
changes:
|
changes:
|
||||||
bugfixes:
|
bugfixes:
|
||||||
|
|||||||
73
commit-rights.md
Normal file
73
commit-rights.md
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
Committers Guidelines for community.general
|
||||||
|
===========================================
|
||||||
|
|
||||||
|
This document is based on the [Ansible committer guidelines](https://github.com/ansible/ansible/blob/b57444af14062ec96e0af75fdfc2098c74fe2d9a/docs/docsite/rst/community/committer_guidelines.rst) ([latest version](https://docs.ansible.com/ansible/devel/community/committer_guidelines.html)).
|
||||||
|
|
||||||
|
These are the guidelines for people with commit privileges on the Ansible Community General Collection GitHub repository. Please read the guidelines before you commit.
|
||||||
|
|
||||||
|
These guidelines apply to everyone. At the same time, this is NOT a process document. So just use good judgment. You have been given commit access because we trust your judgment.
|
||||||
|
|
||||||
|
That said, use the trust wisely.
|
||||||
|
|
||||||
|
If you abuse the trust and break components and builds, and so on, the trust level falls and you may be asked not to commit or you may lose your commit privileges.
|
||||||
|
|
||||||
|
Our workflow on GitHub
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
As a committer, you may already know this, but our workflow forms a lot of our team policies. Please ensure you are aware of the following workflow steps:
|
||||||
|
|
||||||
|
* Fork the repository upon which you want to do some work to your own personal repository
|
||||||
|
* Work on the specific branch upon which you need to commit
|
||||||
|
* Create a Pull Request back to the collection repository and await reviews
|
||||||
|
* Adjust code as necessary based on the Comments provided
|
||||||
|
* Ask someone from the other committers to do a final review and merge
|
||||||
|
|
||||||
|
Sometimes, committers merge their own pull requests. This section is a set of guidelines. If you are changing a comma in a doc or making a very minor change, you can use your best judgement. This is another trust thing. The process is critical for any major change, but for little things or getting something done quickly, use your best judgement and make sure people on the team are aware of your work.
|
||||||
|
|
||||||
|
Roles
|
||||||
|
-----
|
||||||
|
* Release managers: Merge pull requests to `stable-X` branches, create tags to do releases.
|
||||||
|
* Committers: Fine to do PRs for most things, but we should have a timebox. Hanging PRs may merge on the judgement of these devs.
|
||||||
|
* Module maintainers: Module maintainers own specific modules and have indirect commit access through the current module PR mechanisms. This is primary [ansibullbot](https://github.com/ansibullbot)'s `shipit` mechanism.
|
||||||
|
|
||||||
|
General rules
|
||||||
|
-------------
|
||||||
|
Individuals with direct commit access to this collection repository are entrusted with powers that allow them to do a broad variety of things--probably more than we can write down. Rather than rules, treat these as general *guidelines*, individuals with this power are expected to use their best judgement.
|
||||||
|
|
||||||
|
* Do NOTs:
|
||||||
|
|
||||||
|
- Do not commit directly.
|
||||||
|
- Do not merge your own PRs. Someone else should have a chance to review and approve the PR merge. You have a small amount of leeway here for very minor changes.
|
||||||
|
- Do not forget about non-standard / alternate environments. Consider the alternatives. Yes, people have bad/unusual/strange environments (like binaries from multiple init systems installed), but they are the ones who need us the most.
|
||||||
|
- Do not drag your community team members down. Discuss the technical merits of any pull requests you review. Avoid negativity and personal comments. For more guidance on being a good community member, read the [Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
|
||||||
|
- Do not forget about the maintenance burden. High-maintenance features may not be worth adding.
|
||||||
|
- Do not break playbooks. Always keep backwards compatibility in mind.
|
||||||
|
- Do not forget to keep it simple. Complexity breeds all kinds of problems.
|
||||||
|
- Do not merge to branches other than `main`, especially not to `stable-X`, if you do not have explicit permission to do so.
|
||||||
|
- Do not create tags. Tags are used in the release process, and should only be created by the people responsible for managing the stable branches.
|
||||||
|
|
||||||
|
* Do:
|
||||||
|
|
||||||
|
- Squash, avoid merges whenever possible, use GitHub's squash commits or cherry pick if needed (bisect thanks you).
|
||||||
|
- Be active. Committers who have no activity on the project (through merges, triage, commits, and so on) will have their permissions suspended.
|
||||||
|
- Consider backwards compatibility (goes back to "do not break existing playbooks").
|
||||||
|
- Write tests. PRs with tests are looked at with more priority than PRs without tests that should have them included. While not all changes require tests, be sure to add them for bug fixes or functionality changes.
|
||||||
|
- Discuss with other committers, specially when you are unsure of something.
|
||||||
|
- Document! If your PR is a new feature or a change to behavior, make sure you've updated all associated documentation or have notified the right people to do so.
|
||||||
|
- Consider scope, sometimes a fix can be generalized.
|
||||||
|
- Keep it simple, then things are maintainable, debuggable and intelligible.
|
||||||
|
|
||||||
|
Committers are expected to continue to follow the same community and contribution guidelines followed by the rest of the Ansible community.
|
||||||
|
|
||||||
|
|
||||||
|
People
|
||||||
|
------
|
||||||
|
|
||||||
|
Individuals who have been asked to become a part of this group have generally been contributing in significant ways to the community.general collection for some time. Should they agree, they are requested to add their names and GitHub IDs to this file, in the section below, through a pull request. Doing so indicates that these individuals agree to act in the ways that their fellow committers trust that they will act.
|
||||||
|
|
||||||
|
| 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
|
namespace: community
|
||||||
name: general
|
name: general
|
||||||
version: 1.3.9
|
version: 1.3.12
|
||||||
readme: README.md
|
readme: README.md
|
||||||
authors:
|
authors:
|
||||||
- Ansible (https://github.com/ansible)
|
- Ansible (https://github.com/ansible)
|
||||||
|
|||||||
@@ -37,12 +37,13 @@ import tempfile
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
|
from ansible.plugins.connection import ConnectionBase
|
||||||
from ansible.utils.display import Display
|
from ansible.utils.display import Display
|
||||||
|
|
||||||
display = Display()
|
display = Display()
|
||||||
|
|
||||||
|
|
||||||
class Connection(object):
|
class Connection(ConnectionBase):
|
||||||
''' Func-based connections '''
|
''' Func-based connections '''
|
||||||
|
|
||||||
has_pipelining = False
|
has_pipelining = False
|
||||||
|
|||||||
@@ -13,12 +13,32 @@ class ModuleDocFragment(object):
|
|||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r'''
|
||||||
options:
|
options:
|
||||||
config:
|
config:
|
||||||
description:
|
description:
|
||||||
- Path to a .json configuration file containing the OneView client configuration.
|
- Path to a .json configuration file containing the OneView client configuration.
|
||||||
The configuration file is optional and when used should be present in the host running the ansible commands.
|
The configuration file is optional and when used should be present in the host running the ansible commands.
|
||||||
If the file path is not provided, the configuration will be loaded from environment variables.
|
If the file path is not provided, the configuration will be loaded from environment variables.
|
||||||
For links to example configuration files or how to use the environment variables verify the notes section.
|
For links to example configuration files or how to use the environment variables verify the notes section.
|
||||||
type: path
|
type: path
|
||||||
|
api_version:
|
||||||
|
description:
|
||||||
|
- OneView API Version.
|
||||||
|
type: int
|
||||||
|
image_streamer_hostname:
|
||||||
|
description:
|
||||||
|
- IP address or hostname for the HPE Image Streamer REST API.
|
||||||
|
type: str
|
||||||
|
hostname:
|
||||||
|
description:
|
||||||
|
- IP address or hostname for the appliance.
|
||||||
|
type: str
|
||||||
|
username:
|
||||||
|
description:
|
||||||
|
- Username for API authentication.
|
||||||
|
type: str
|
||||||
|
password:
|
||||||
|
description:
|
||||||
|
- Password for API authentication.
|
||||||
|
type: str
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- python >= 2.7.9
|
- python >= 2.7.9
|
||||||
|
|||||||
@@ -72,6 +72,25 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||||||
self._nmap = None
|
self._nmap = None
|
||||||
super(InventoryModule, self).__init__()
|
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):
|
def verify_file(self, path):
|
||||||
|
|
||||||
valid = False
|
valid = False
|
||||||
@@ -83,7 +102,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||||||
|
|
||||||
return valid
|
return valid
|
||||||
|
|
||||||
def parse(self, inventory, loader, path, cache=False):
|
def parse(self, inventory, loader, path, cache=True):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._nmap = get_bin_path('nmap')
|
self._nmap = get_bin_path('nmap')
|
||||||
@@ -94,75 +113,101 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||||||
|
|
||||||
self._read_config_data(path)
|
self._read_config_data(path)
|
||||||
|
|
||||||
# setup command
|
cache_key = self.get_cache_key(path)
|
||||||
cmd = [self._nmap]
|
|
||||||
if not self._options['ports']:
|
|
||||||
cmd.append('-sP')
|
|
||||||
|
|
||||||
if self._options['ipv4'] and not self._options['ipv6']:
|
# cache may be True or False at this point to indicate if the inventory is being refreshed
|
||||||
cmd.append('-4')
|
# get the user's cache option too to see if we should save the cache if it is changing
|
||||||
elif self._options['ipv6'] and not self._options['ipv4']:
|
user_cache_setting = self.get_option('cache')
|
||||||
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 self._options['exclude']:
|
# read if the user has caching enabled and the cache isn't being refreshed
|
||||||
cmd.append('--exclude')
|
attempt_to_read_cache = user_cache_setting and cache
|
||||||
cmd.append(','.join(self._options['exclude']))
|
# 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
|
||||||
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 = []
|
|
||||||
|
|
||||||
|
if attempt_to_read_cache:
|
||||||
try:
|
try:
|
||||||
t_stdout = to_text(stdout, errors='surrogate_or_strict')
|
results = self._cache[cache_key]
|
||||||
except UnicodeError as e:
|
except KeyError:
|
||||||
raise AnsibleParserError('Invalid (non unicode) input returned: %s' % to_native(e))
|
# 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():
|
if cache_needs_update:
|
||||||
hits = self.find_host.match(line)
|
# setup command
|
||||||
if hits:
|
cmd = [self._nmap]
|
||||||
if host is not None:
|
if not self._options['ports']:
|
||||||
self.inventory.set_variable(host, 'ports', ports)
|
cmd.append('-sP')
|
||||||
|
|
||||||
# if dns only shows arpa, just use ip instead as hostname
|
if self._options['ipv4'] and not self._options['ipv6']:
|
||||||
if hits.group(1).endswith('.in-addr.arpa'):
|
cmd.append('-4')
|
||||||
host = hits.group(2)
|
elif self._options['ipv6'] and not self._options['ipv4']:
|
||||||
else:
|
cmd.append('-6')
|
||||||
host = hits.group(1)
|
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 self._options['exclude']:
|
||||||
if hits.group(2) is not None:
|
cmd.append('--exclude')
|
||||||
ip = hits.group(2)
|
cmd.append(','.join(self._options['exclude']))
|
||||||
else:
|
|
||||||
ip = hits.group(1)
|
|
||||||
|
|
||||||
if host is not None:
|
cmd.append(self._options['address'])
|
||||||
# update inventory
|
try:
|
||||||
self.inventory.add_host(host)
|
# execute
|
||||||
self.inventory.set_variable(host, 'ip', ip)
|
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
|
||||||
ports = []
|
stdout, stderr = p.communicate()
|
||||||
continue
|
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)
|
# parse results
|
||||||
if host is not None and host_ports:
|
host = None
|
||||||
ports.append({'port': host_ports.group(1), 'protocol': host_ports.group(2), 'state': host_ports.group(3), 'service': host_ports.group(4)})
|
ip = None
|
||||||
continue
|
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
|
for line in t_stdout.splitlines():
|
||||||
if host and ports:
|
hits = self.find_host.match(line)
|
||||||
self.inventory.set_variable(host, 'ports', ports)
|
if hits:
|
||||||
|
if host is not None and ports:
|
||||||
|
results[-1]['ports'] = ports
|
||||||
|
|
||||||
except Exception as e:
|
# if dns only shows arpa, just use ip instead as hostname
|
||||||
raise AnsibleParserError("failed to parse %s: %s " % (to_native(path), to_native(e)))
|
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)))
|
||||||
|
|
||||||
|
self._cache[cache_key] = results
|
||||||
|
|
||||||
|
self._populate(results)
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ DOCUMENTATION = '''
|
|||||||
plugin_type: inventory
|
plugin_type: inventory
|
||||||
short_description: StackPath Edge Computing inventory source
|
short_description: StackPath Edge Computing inventory source
|
||||||
version_added: 1.2.0
|
version_added: 1.2.0
|
||||||
|
author:
|
||||||
|
- UNKNOWN (@shayrybak)
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- inventory_cache
|
- inventory_cache
|
||||||
- constructed
|
- constructed
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ EXAMPLES = r"""
|
|||||||
- name: Template files (explicitly skip directories in order to use the 'src' attribute)
|
- name: Template files (explicitly skip directories in order to use the 'src' attribute)
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: '{{ item.src }}'
|
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 }}'
|
mode: '{{ item.mode }}'
|
||||||
with_community.general.filetree: web/
|
with_community.general.filetree: web/
|
||||||
when: item.state == 'file'
|
when: item.state == 'file'
|
||||||
@@ -41,6 +43,7 @@ EXAMPLES = r"""
|
|||||||
src: '{{ item.src }}'
|
src: '{{ item.src }}'
|
||||||
dest: /web/{{ item.path }}
|
dest: /web/{{ item.path }}
|
||||||
state: link
|
state: link
|
||||||
|
follow: false # avoid corrupting target files if the link already exists
|
||||||
force: yes
|
force: yes
|
||||||
mode: '{{ item.mode }}'
|
mode: '{{ item.mode }}'
|
||||||
with_community.general.filetree: web/
|
with_community.general.filetree: web/
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ import os
|
|||||||
|
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible.utils.cmd_functions import run_cmd
|
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_CFG = os.getenv('ANSIBLE_HIERA_CFG', '/etc/hiera.yaml')
|
||||||
ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera')
|
ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera')
|
||||||
@@ -78,13 +79,11 @@ class Hiera(object):
|
|||||||
rc, output, err = run_cmd("{0} -c {1} {2}".format(
|
rc, output, err = run_cmd("{0} -c {1} {2}".format(
|
||||||
ANSIBLE_HIERA_BIN, ANSIBLE_HIERA_CFG, hiera_key[0]))
|
ANSIBLE_HIERA_BIN, ANSIBLE_HIERA_CFG, hiera_key[0]))
|
||||||
|
|
||||||
return output.strip()
|
return to_text(output.strip())
|
||||||
|
|
||||||
|
|
||||||
class LookupModule(LookupBase):
|
class LookupModule(LookupBase):
|
||||||
def run(self, terms, variables=''):
|
def run(self, terms, variables=''):
|
||||||
hiera = Hiera()
|
hiera = Hiera()
|
||||||
ret = []
|
ret = [hiera.get(terms)]
|
||||||
|
|
||||||
ret.append(hiera.get(terms))
|
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
@@ -87,11 +87,12 @@ def not_in_host_file(self, host):
|
|||||||
user_host_file = "~/.ssh/known_hosts"
|
user_host_file = "~/.ssh/known_hosts"
|
||||||
user_host_file = os.path.expanduser(user_host_file)
|
user_host_file = os.path.expanduser(user_host_file)
|
||||||
|
|
||||||
host_file_list = []
|
host_file_list = [
|
||||||
host_file_list.append(user_host_file)
|
user_host_file,
|
||||||
host_file_list.append("/etc/ssh/ssh_known_hosts")
|
"/etc/ssh/ssh_known_hosts",
|
||||||
host_file_list.append("/etc/ssh/ssh_known_hosts2")
|
"/etc/ssh/ssh_known_hosts2",
|
||||||
host_file_list.append("/etc/openssh/ssh_known_hosts")
|
"/etc/openssh/ssh_known_hosts",
|
||||||
|
]
|
||||||
|
|
||||||
hfiles_not_found = 0
|
hfiles_not_found = 0
|
||||||
for hf in host_file_list:
|
for hf in host_file_list:
|
||||||
|
|||||||
@@ -81,18 +81,27 @@ class ArgFormat(object):
|
|||||||
return [str(p) for p in func(value)]
|
return [str(p) for p in func(value)]
|
||||||
|
|
||||||
|
|
||||||
def cause_changes(func, on_success=True, on_failure=False):
|
def cause_changes(on_success=None, on_failure=None):
|
||||||
@wraps(func)
|
|
||||||
def wrapper(self, *args, **kwargs):
|
def deco(func):
|
||||||
try:
|
if on_success is None and on_failure is None:
|
||||||
func(*args, **kwargs)
|
return func
|
||||||
if on_success:
|
|
||||||
self.changed = True
|
@wraps(func)
|
||||||
except Exception as e:
|
def wrapper(*args, **kwargs):
|
||||||
if on_failure:
|
try:
|
||||||
self.changed = True
|
self = args[0]
|
||||||
raise
|
func(*args, **kwargs)
|
||||||
return wrapper
|
if on_success is not None:
|
||||||
|
self.changed = on_success
|
||||||
|
except Exception:
|
||||||
|
if on_failure is not None:
|
||||||
|
self.changed = on_failure
|
||||||
|
raise
|
||||||
|
|
||||||
|
return wrapper
|
||||||
|
|
||||||
|
return deco
|
||||||
|
|
||||||
|
|
||||||
def module_fails_on_exception(func):
|
def module_fails_on_exception(func):
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ class OneViewModuleBase(object):
|
|||||||
|
|
||||||
resource_client = None
|
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.
|
OneViewModuleBase constructor.
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ class OneViewModuleBase(object):
|
|||||||
"""
|
"""
|
||||||
argument_spec = self._build_argument_spec(additional_arg_spec, validate_etag_support)
|
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._check_hpe_oneview_sdk()
|
||||||
self._create_oneview_client()
|
self._create_oneview_client()
|
||||||
|
|||||||
@@ -382,7 +382,10 @@ def main():
|
|||||||
filters=dict(type='dict')
|
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'):
|
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'",
|
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
|
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ def do_install(module, mode, rootfs, container, image, values_list, backend):
|
|||||||
system_list = ["--system"] if mode == 'system' else []
|
system_list = ["--system"] if mode == 'system' else []
|
||||||
user_list = ["--user"] if mode == 'user' else []
|
user_list = ["--user"] if mode == 'user' else []
|
||||||
rootfs_list = ["--rootfs=%s" % rootfs] if rootfs else []
|
rootfs_list = ["--rootfs=%s" % rootfs] if rootfs else []
|
||||||
args = ['atomic', 'install', "--storage=%s" % backend, '--name=%s' % container] + system_list + user_list + rootfs_list + values_list + [image]
|
atomic_bin = module.get_bin_path('atomic')
|
||||||
|
args = [atomic_bin, 'install', "--storage=%s" % backend, '--name=%s' % container] + system_list + user_list + rootfs_list + values_list + [image]
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
@@ -112,7 +113,8 @@ def do_install(module, mode, rootfs, container, image, values_list, backend):
|
|||||||
|
|
||||||
|
|
||||||
def do_update(module, container, image, values_list):
|
def do_update(module, container, image, values_list):
|
||||||
args = ['atomic', 'containers', 'update', "--rebase=%s" % image] + values_list + [container]
|
atomic_bin = module.get_bin_path('atomic')
|
||||||
|
args = [atomic_bin, 'containers', 'update', "--rebase=%s" % image] + values_list + [container]
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
@@ -122,7 +124,8 @@ def do_update(module, container, image, values_list):
|
|||||||
|
|
||||||
|
|
||||||
def do_uninstall(module, name, backend):
|
def do_uninstall(module, name, backend):
|
||||||
args = ['atomic', 'uninstall', "--storage=%s" % backend, name]
|
atomic_bin = module.get_bin_path('atomic')
|
||||||
|
args = [atomic_bin, 'uninstall', "--storage=%s" % backend, name]
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
@@ -130,7 +133,8 @@ def do_uninstall(module, name, backend):
|
|||||||
|
|
||||||
|
|
||||||
def do_rollback(module, name):
|
def do_rollback(module, name):
|
||||||
args = ['atomic', 'containers', 'rollback', name]
|
atomic_bin = module.get_bin_path('atomic')
|
||||||
|
args = [atomic_bin, 'containers', 'rollback', name]
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
@@ -148,14 +152,12 @@ def core(module):
|
|||||||
backend = module.params['backend']
|
backend = module.params['backend']
|
||||||
state = module.params['state']
|
state = module.params['state']
|
||||||
|
|
||||||
|
atomic_bin = module.get_bin_path('atomic')
|
||||||
module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
||||||
out = {}
|
|
||||||
err = {}
|
|
||||||
rc = 0
|
|
||||||
|
|
||||||
values_list = ["--set=%s" % x for x in values] if values else []
|
values_list = ["--set=%s" % x for x in values] if values else []
|
||||||
|
|
||||||
args = ['atomic', 'containers', 'list', '--no-trunc', '-n', '--all', '-f', 'backend=%s' % backend, '-f', 'container=%s' % name]
|
args = [atomic_bin, 'containers', 'list', '--no-trunc', '-n', '--all', '-f', 'backend=%s' % backend, '-f', 'container=%s' % name]
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
@@ -194,9 +196,7 @@ def main():
|
|||||||
module.fail_json(msg="values is supported only with user or system mode")
|
module.fail_json(msg="values is supported only with user or system mode")
|
||||||
|
|
||||||
# Verify that the platform supports atomic command
|
# Verify that the platform supports atomic command
|
||||||
rc, out, err = module.run_command('atomic -v', check_rc=False)
|
dummy = module.get_bin_path('atomic', required=True)
|
||||||
if rc != 0:
|
|
||||||
module.fail_json(msg="Error in running atomic command", err=err)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
core(module)
|
core(module)
|
||||||
|
|||||||
@@ -57,18 +57,14 @@ from ansible.module_utils._text import to_native
|
|||||||
|
|
||||||
def core(module):
|
def core(module):
|
||||||
revision = module.params['revision']
|
revision = module.params['revision']
|
||||||
args = []
|
atomic_bin = module.get_bin_path('atomic', required=True)
|
||||||
|
|
||||||
module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
||||||
|
|
||||||
if revision == 'latest':
|
if revision == 'latest':
|
||||||
args = ['atomic', 'host', 'upgrade']
|
args = [atomic_bin, 'host', 'upgrade']
|
||||||
else:
|
else:
|
||||||
args = ['atomic', 'host', 'deploy', revision]
|
args = [atomic_bin, 'host', 'deploy', revision]
|
||||||
|
|
||||||
out = {}
|
|
||||||
err = {}
|
|
||||||
rc = 0
|
|
||||||
|
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ from ansible.module_utils._text import to_native
|
|||||||
|
|
||||||
|
|
||||||
def do_upgrade(module, image):
|
def do_upgrade(module, image):
|
||||||
args = ['atomic', 'update', '--force', image]
|
atomic_bin = module.get_bin_path('atomic')
|
||||||
|
args = [atomic_bin, 'update', '--force', image]
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
if rc != 0: # something went wrong emit the msg
|
if rc != 0: # something went wrong emit the msg
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
@@ -91,20 +92,21 @@ def core(module):
|
|||||||
is_upgraded = False
|
is_upgraded = False
|
||||||
|
|
||||||
module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
||||||
|
atomic_bin = module.get_bin_path('atomic')
|
||||||
out = {}
|
out = {}
|
||||||
err = {}
|
err = {}
|
||||||
rc = 0
|
rc = 0
|
||||||
|
|
||||||
if backend:
|
if backend:
|
||||||
if state == 'present' or state == 'latest':
|
if state == 'present' or state == 'latest':
|
||||||
args = ['atomic', 'pull', "--storage=%s" % backend, image]
|
args = [atomic_bin, 'pull', "--storage=%s" % backend, image]
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
if rc < 0:
|
if rc < 0:
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
else:
|
else:
|
||||||
out_run = ""
|
out_run = ""
|
||||||
if started:
|
if started:
|
||||||
args = ['atomic', 'run', "--storage=%s" % backend, image]
|
args = [atomic_bin, 'run', "--storage=%s" % backend, image]
|
||||||
rc, out_run, err = module.run_command(args, check_rc=False)
|
rc, out_run, err = module.run_command(args, check_rc=False)
|
||||||
if rc < 0:
|
if rc < 0:
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
@@ -112,7 +114,7 @@ def core(module):
|
|||||||
changed = "Extracting" in out or "Copying blob" in out
|
changed = "Extracting" in out or "Copying blob" in out
|
||||||
module.exit_json(msg=(out + out_run), changed=changed)
|
module.exit_json(msg=(out + out_run), changed=changed)
|
||||||
elif state == 'absent':
|
elif state == 'absent':
|
||||||
args = ['atomic', 'images', 'delete', "--storage=%s" % backend, image]
|
args = [atomic_bin, 'images', 'delete', "--storage=%s" % backend, image]
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
if rc < 0:
|
if rc < 0:
|
||||||
module.fail_json(rc=rc, msg=err)
|
module.fail_json(rc=rc, msg=err)
|
||||||
@@ -126,11 +128,11 @@ def core(module):
|
|||||||
is_upgraded = do_upgrade(module, image)
|
is_upgraded = do_upgrade(module, image)
|
||||||
|
|
||||||
if started:
|
if started:
|
||||||
args = ['atomic', 'run', image]
|
args = [atomic_bin, 'run', image]
|
||||||
else:
|
else:
|
||||||
args = ['atomic', 'install', image]
|
args = [atomic_bin, 'install', image]
|
||||||
elif state == 'absent':
|
elif state == 'absent':
|
||||||
args = ['atomic', 'uninstall', image]
|
args = [atomic_bin, 'uninstall', image]
|
||||||
|
|
||||||
rc, out, err = module.run_command(args, check_rc=False)
|
rc, out, err = module.run_command(args, check_rc=False)
|
||||||
|
|
||||||
@@ -155,9 +157,7 @@ def main():
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Verify that the platform supports atomic command
|
# Verify that the platform supports atomic command
|
||||||
rc, out, err = module.run_command('atomic -v', check_rc=False)
|
dummy = module.get_bin_path('atomic', required=True)
|
||||||
if rc != 0:
|
|
||||||
module.fail_json(msg="Error in running atomic command", err=err)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
core(module)
|
core(module)
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ class DimensionDataNetworkModule(DimensionDataModule):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.module.fail_json(
|
self.module.fail_json(
|
||||||
"Unexpected failure deleting network with id %s", network.id
|
"Unexpected failure deleting network with id %s" % network.id
|
||||||
)
|
)
|
||||||
|
|
||||||
except DimensionDataAPIException as e:
|
except DimensionDataAPIException as e:
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ def main():
|
|||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec={
|
argument_spec={
|
||||||
},
|
},
|
||||||
supports_check_mode=False
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
|
||||||
rc, out, err = docker_stack_list(module)
|
rc, out, err = docker_stack_list(module)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ def main():
|
|||||||
argument_spec={
|
argument_spec={
|
||||||
'name': dict(type='str', required=True)
|
'name': dict(type='str', required=True)
|
||||||
},
|
},
|
||||||
supports_check_mode=False
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
|
||||||
name = module.params['name']
|
name = module.params['name']
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ def main():
|
|||||||
state=dict(choices=['list'], default='list'),
|
state=dict(choices=['list'], default='list'),
|
||||||
service_account_email=dict(),
|
service_account_email=dict(),
|
||||||
credentials_file=dict(),
|
credentials_file=dict(),
|
||||||
project_id=dict(), ),)
|
project_id=dict(), ), supports_check_mode=True)
|
||||||
if module._name in ('gcpubsub_facts', 'community.general.gcpubsub_facts'):
|
if module._name in ('gcpubsub_facts', 'community.general.gcpubsub_facts'):
|
||||||
module.deprecate("The 'gcpubsub_facts' module has been renamed to 'gcpubsub_info'",
|
module.deprecate("The 'gcpubsub_facts' module has been renamed to 'gcpubsub_info'",
|
||||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ def main():
|
|||||||
api_key=dict(required=True, type='str', no_log=True),
|
api_key=dict(required=True, type='str', no_log=True),
|
||||||
name=dict(required=True, type='str')
|
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'):
|
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'",
|
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),
|
api_key=dict(required=True, type='str', no_log=True),
|
||||||
name=dict(required=True, type='str')
|
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'):
|
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'",
|
module.deprecate("The 'memset_server_facts' module has been renamed to 'memset_server_info'",
|
||||||
|
|||||||
@@ -243,7 +243,6 @@ except ImportError:
|
|||||||
HAS_OVIRTSDK = False
|
HAS_OVIRTSDK = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------- #
|
# ------------------------------------------------------------------- #
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- 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)
|
# 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
|
from __future__ import absolute_import, division, print_function
|
||||||
@@ -21,7 +21,7 @@ options:
|
|||||||
- Restrict results to a specific authentication realm.
|
- Restrict results to a specific authentication realm.
|
||||||
aliases: ['realm', 'name']
|
aliases: ['realm', 'name']
|
||||||
type: str
|
type: str
|
||||||
author: Tristan Le Guern (@Aversiste)
|
author: Tristan Le Guern (@tleguern)
|
||||||
extends_documentation_fragment: community.general.proxmox.documentation
|
extends_documentation_fragment: community.general.proxmox.documentation
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ options:
|
|||||||
- Restrict results to a specific group.
|
- Restrict results to a specific group.
|
||||||
aliases: ['groupid', 'name']
|
aliases: ['groupid', 'name']
|
||||||
type: str
|
type: str
|
||||||
author: Tristan Le Guern (@Aversiste)
|
author: Tristan Le Guern (@tleguern)
|
||||||
extends_documentation_fragment: community.general.proxmox.documentation
|
extends_documentation_fragment: community.general.proxmox.documentation
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Restrict results to a specific user ID, which is a concatenation of a user and domain parts.
|
- Restrict results to a specific user ID, which is a concatenation of a user and domain parts.
|
||||||
type: str
|
type: str
|
||||||
author: Tristan Le Guern (@Aversiste)
|
author: Tristan Le Guern (@tleguern)
|
||||||
extends_documentation_fragment: community.general.proxmox.documentation
|
extends_documentation_fragment: community.general.proxmox.documentation
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|||||||
@@ -1229,24 +1229,6 @@ class RHEV(object):
|
|||||||
self.__get_conn()
|
self.__get_conn()
|
||||||
return self.conn.set_VM_Host(vmname, vmhost)
|
return self.conn.set_VM_Host(vmname, vmhost)
|
||||||
|
|
||||||
# pylint: disable=unreachable
|
|
||||||
VM = self.conn.get_VM(vmname)
|
|
||||||
HOST = self.conn.get_Host(vmhost)
|
|
||||||
|
|
||||||
if VM.placement_policy.host is None:
|
|
||||||
self.conn.set_VM_Host(vmname, vmhost)
|
|
||||||
elif str(VM.placement_policy.host.id) != str(HOST.id):
|
|
||||||
self.conn.set_VM_Host(vmname, vmhost)
|
|
||||||
else:
|
|
||||||
setMsg("VM's startup host was already set to " + vmhost)
|
|
||||||
checkFail()
|
|
||||||
|
|
||||||
if str(VM.status.state) == "up":
|
|
||||||
self.conn.migrate_VM(vmname, vmhost)
|
|
||||||
checkFail()
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
def setHost(self, hostname, cluster, ifaces):
|
def setHost(self, hostname, cluster, ifaces):
|
||||||
self.__get_conn()
|
self.__get_conn()
|
||||||
return self.conn.set_Host(hostname, cluster, ifaces)
|
return self.conn.set_Host(hostname, cluster, ifaces)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function
|
|||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r'''
|
||||||
---
|
---
|
||||||
module: terraform
|
module: terraform
|
||||||
short_description: Manages a Terraform deployment (and plans)
|
short_description: Manages a Terraform deployment (and plans)
|
||||||
@@ -177,24 +177,31 @@ command:
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from distutils.version import LooseVersion
|
||||||
from ansible.module_utils.six.moves import shlex_quote
|
from ansible.module_utils.six.moves import shlex_quote
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
DESTROY_ARGS = ('destroy', '-no-color', '-force')
|
|
||||||
APPLY_ARGS = ('apply', '-no-color', '-input=false', '-auto-approve=true')
|
|
||||||
module = None
|
module = None
|
||||||
|
|
||||||
|
|
||||||
def preflight_validation(bin_path, project_path, variables_args=None, plan_file=None):
|
def get_version(bin_path):
|
||||||
|
extract_version = module.run_command([bin_path, 'version', '-json'])
|
||||||
|
terraform_version = (json.loads(extract_version[1]))['terraform_version']
|
||||||
|
return terraform_version
|
||||||
|
|
||||||
|
|
||||||
|
def preflight_validation(bin_path, project_path, version, variables_args=None, plan_file=None):
|
||||||
if project_path in [None, ''] or '/' not in project_path:
|
if project_path in [None, ''] or '/' not in project_path:
|
||||||
module.fail_json(msg="Path for Terraform project can not be None or ''.")
|
module.fail_json(msg="Path for Terraform project can not be None or ''.")
|
||||||
if not os.path.exists(bin_path):
|
if not os.path.exists(bin_path):
|
||||||
module.fail_json(msg="Path for Terraform binary '{0}' doesn't exist on this host - check the path and try again please.".format(bin_path))
|
module.fail_json(msg="Path for Terraform binary '{0}' doesn't exist on this host - check the path and try again please.".format(bin_path))
|
||||||
if not os.path.isdir(project_path):
|
if not os.path.isdir(project_path):
|
||||||
module.fail_json(msg="Path for Terraform project '{0}' doesn't exist on this host - check the path and try again please.".format(project_path))
|
module.fail_json(msg="Path for Terraform project '{0}' doesn't exist on this host - check the path and try again please.".format(project_path))
|
||||||
|
if LooseVersion(version) < LooseVersion('0.15.0'):
|
||||||
rc, out, err = module.run_command([bin_path, 'validate'] + variables_args, check_rc=True, cwd=project_path, use_unsafe_shell=True)
|
rc, out, err = module.run_command([bin_path, 'validate'] + variables_args, check_rc=True, cwd=project_path)
|
||||||
|
else:
|
||||||
|
rc, out, err = module.run_command([bin_path, 'validate'], check_rc=True, cwd=project_path)
|
||||||
|
|
||||||
|
|
||||||
def _state_args(state_file):
|
def _state_args(state_file):
|
||||||
@@ -267,7 +274,7 @@ def build_plan(command, project_path, variables_args, state_file, targets, state
|
|||||||
|
|
||||||
plan_command.extend(_state_args(state_file))
|
plan_command.extend(_state_args(state_file))
|
||||||
|
|
||||||
rc, out, err = module.run_command(plan_command + variables_args, cwd=project_path, use_unsafe_shell=True)
|
rc, out, err = module.run_command(plan_command + variables_args, cwd=project_path)
|
||||||
|
|
||||||
if rc == 0:
|
if rc == 0:
|
||||||
# no changes
|
# no changes
|
||||||
@@ -326,6 +333,15 @@ def main():
|
|||||||
else:
|
else:
|
||||||
command = [module.get_bin_path('terraform', required=True)]
|
command = [module.get_bin_path('terraform', required=True)]
|
||||||
|
|
||||||
|
checked_version = get_version(command[0])
|
||||||
|
|
||||||
|
if LooseVersion(checked_version) < LooseVersion('0.15.0'):
|
||||||
|
DESTROY_ARGS = ('destroy', '-no-color', '-force')
|
||||||
|
APPLY_ARGS = ('apply', '-no-color', '-input=false', '-auto-approve=true')
|
||||||
|
else:
|
||||||
|
DESTROY_ARGS = ('destroy', '-no-color', '-auto-approve')
|
||||||
|
APPLY_ARGS = ('apply', '-no-color', '-input=false', '-auto-approve')
|
||||||
|
|
||||||
if force_init:
|
if force_init:
|
||||||
init_plugins(command[0], project_path, backend_config, backend_config_files, init_reconfigure)
|
init_plugins(command[0], project_path, backend_config, backend_config_files, init_reconfigure)
|
||||||
|
|
||||||
@@ -351,7 +367,7 @@ def main():
|
|||||||
for f in variables_files:
|
for f in variables_files:
|
||||||
variables_args.extend(['-var-file', f])
|
variables_args.extend(['-var-file', f])
|
||||||
|
|
||||||
preflight_validation(command[0], project_path, variables_args)
|
preflight_validation(command[0], project_path, checked_version, variables_args)
|
||||||
|
|
||||||
if module.params.get('lock') is not None:
|
if module.params.get('lock') is not None:
|
||||||
if module.params.get('lock'):
|
if module.params.get('lock'):
|
||||||
|
|||||||
@@ -160,7 +160,9 @@ def get_srs(session):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule({})
|
module = AnsibleModule(
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
|
|
||||||
if not HAVE_XENAPI:
|
if not HAVE_XENAPI:
|
||||||
module.fail_json(changed=False, msg="python xen api required for this module")
|
module.fail_json(changed=False, msg="python xen api required for this module")
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ def waitForTaskDone(client, name, taskId, timeout):
|
|||||||
currentTimeout -= 5
|
currentTimeout -= 5
|
||||||
if currentTimeout < 0:
|
if currentTimeout < 0:
|
||||||
return False
|
return False
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ ovirt_affinity_labels:
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -128,7 +127,7 @@ def main():
|
|||||||
host=dict(default=None),
|
host=dict(default=None),
|
||||||
vm=dict(default=None),
|
vm=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_affinity_label_facts', 'community.general.ovirt_affinity_label_facts')
|
is_old_facts = module._name in ('ovirt_affinity_label_facts', 'community.general.ovirt_affinity_label_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_affinity_label_facts' module has been renamed to 'ovirt_affinity_label_info', "
|
module.deprecate("The 'ovirt_affinity_label_facts' module has been renamed to 'ovirt_affinity_label_info', "
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ ovirt_api:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -64,7 +63,7 @@ from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ovirt_info_full_argument_spec()
|
argument_spec = ovirt_info_full_argument_spec()
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_api_facts', 'community.general.ovirt_api_facts')
|
is_old_facts = module._name in ('ovirt_api_facts', 'community.general.ovirt_api_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_api_facts' module has been renamed to 'ovirt_api_info', "
|
module.deprecate("The 'ovirt_api_facts' module has been renamed to 'ovirt_api_info', "
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ ovirt_clusters:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -87,7 +86,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_cluster_facts', 'community.general.ovirt_cluster_facts')
|
is_old_facts = module._name in ('ovirt_cluster_facts', 'community.general.ovirt_cluster_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_cluster_facts' module has been renamed to 'ovirt_cluster_info', "
|
module.deprecate("The 'ovirt_cluster_facts' module has been renamed to 'ovirt_cluster_info', "
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ ovirt_datacenters:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -70,7 +69,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_datacenter_facts', 'community.general.ovirt_datacenter_facts')
|
is_old_facts = module._name in ('ovirt_datacenter_facts', 'community.general.ovirt_datacenter_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_datacenter_facts' module has been renamed to 'ovirt_datacenter_info', "
|
module.deprecate("The 'ovirt_datacenter_facts' module has been renamed to 'ovirt_datacenter_info', "
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ ovirt_disks:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -86,7 +85,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_disk_facts', 'community.general.ovirt_disk_facts')
|
is_old_facts = module._name in ('ovirt_disk_facts', 'community.general.ovirt_disk_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_disk_facts' module has been renamed to 'ovirt_disk_info', "
|
module.deprecate("The 'ovirt_disk_facts' module has been renamed to 'ovirt_disk_info', "
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ ovirt_events:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -123,7 +122,7 @@ def main():
|
|||||||
query=dict(default='', required=False),
|
query=dict(default='', required=False),
|
||||||
wait=dict(default=True, type='bool', required=False)
|
wait=dict(default=True, type='bool', required=False)
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_event_facts', 'community.general.ovirt_event_facts')
|
is_old_facts = module._name in ('ovirt_event_facts', 'community.general.ovirt_event_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_event_facts' module has been renamed to 'ovirt_event_info', "
|
module.deprecate("The 'ovirt_event_facts' module has been renamed to 'ovirt_event_info', "
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ ovirt_external_providers:
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -117,7 +116,7 @@ def main():
|
|||||||
aliases=['provider'],
|
aliases=['provider'],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_external_provider_facts', 'community.general.ovirt_external_provider_facts')
|
is_old_facts = module._name in ('ovirt_external_provider_facts', 'community.general.ovirt_external_provider_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_external_provider_facts' module has been renamed to 'ovirt_external_provider_info', "
|
module.deprecate("The 'ovirt_external_provider_facts' module has been renamed to 'ovirt_external_provider_info', "
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ ovirt_groups:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -85,7 +84,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_group_facts', 'community.general.ovirt_group_facts')
|
is_old_facts = module._name in ('ovirt_group_facts', 'community.general.ovirt_group_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_group_facts' module has been renamed to 'ovirt_group_info', "
|
module.deprecate("The 'ovirt_group_facts' module has been renamed to 'ovirt_group_info', "
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ ovirt_hosts:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -105,7 +104,7 @@ def main():
|
|||||||
all_content=dict(default=False, type='bool'),
|
all_content=dict(default=False, type='bool'),
|
||||||
cluster_version=dict(default=None, type='str'),
|
cluster_version=dict(default=None, type='str'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_host_facts', 'community.general.ovirt_host_facts')
|
is_old_facts = module._name in ('ovirt_host_facts', 'community.general.ovirt_host_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', "
|
module.deprecate("The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', "
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -127,7 +126,7 @@ def main():
|
|||||||
iscsi=dict(default=None, type='dict'),
|
iscsi=dict(default=None, type='dict'),
|
||||||
fcp=dict(default=None, type='dict'),
|
fcp=dict(default=None, type='dict'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_host_storage_facts', 'community.general.ovirt_host_storage_facts')
|
is_old_facts = module._name in ('ovirt_host_storage_facts', 'community.general.ovirt_host_storage_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_host_storage_facts' module has been renamed to 'ovirt_host_storage_info', "
|
module.deprecate("The 'ovirt_host_storage_facts' module has been renamed to 'ovirt_host_storage_info', "
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ ovirt_networks:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -87,7 +86,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_network_facts', 'community.general.ovirt_network_facts')
|
is_old_facts = module._name in ('ovirt_network_facts', 'community.general.ovirt_network_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_network_facts' module has been renamed to 'ovirt_network_info', "
|
module.deprecate("The 'ovirt_network_facts' module has been renamed to 'ovirt_network_info', "
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ ovirt_nics:
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -92,7 +91,7 @@ def main():
|
|||||||
vm=dict(required=True),
|
vm=dict(required=True),
|
||||||
name=dict(default=None),
|
name=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_nic_facts', 'community.general.ovirt_nic_facts')
|
is_old_facts = module._name in ('ovirt_nic_facts', 'community.general.ovirt_nic_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_nic_facts' module has been renamed to 'ovirt_nic_info', "
|
module.deprecate("The 'ovirt_nic_facts' module has been renamed to 'ovirt_nic_info', "
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -129,7 +128,7 @@ def main():
|
|||||||
group_name=dict(default=None),
|
group_name=dict(default=None),
|
||||||
namespace=dict(default=None),
|
namespace=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_permission_facts', 'community.general.ovirt_permission_facts')
|
is_old_facts = module._name in ('ovirt_permission_facts', 'community.general.ovirt_permission_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_permission_facts' module has been renamed to 'ovirt_permission_info', "
|
module.deprecate("The 'ovirt_permission_facts' module has been renamed to 'ovirt_permission_info', "
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ ovirt_quotas:
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -92,7 +91,7 @@ def main():
|
|||||||
data_center=dict(required=True),
|
data_center=dict(required=True),
|
||||||
name=dict(default=None),
|
name=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_quota_facts', 'community.general.ovirt_quota_facts')
|
is_old_facts = module._name in ('ovirt_quota_facts', 'community.general.ovirt_quota_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_quota_facts' module has been renamed to 'ovirt_quota_info', "
|
module.deprecate("The 'ovirt_quota_facts' module has been renamed to 'ovirt_quota_info', "
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ def main():
|
|||||||
id=dict(default=None),
|
id=dict(default=None),
|
||||||
name=dict(default=None),
|
name=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_scheduling_policy_facts', 'community.general.ovirt_scheduling_policy_facts')
|
is_old_facts = module._name in ('ovirt_scheduling_policy_facts', 'community.general.ovirt_scheduling_policy_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_scheduling_policy_facts' module has been renamed to 'ovirt_scheduling_policy_info', "
|
module.deprecate("The 'ovirt_scheduling_policy_facts' module has been renamed to 'ovirt_scheduling_policy_info', "
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ ovirt_snapshots:
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -82,7 +81,7 @@ def main():
|
|||||||
description=dict(default=None),
|
description=dict(default=None),
|
||||||
snapshot_id=dict(default=None),
|
snapshot_id=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_snapshot_facts', 'community.general.ovirt_snapshot_facts')
|
is_old_facts = module._name in ('ovirt_snapshot_facts', 'community.general.ovirt_snapshot_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_snapshot_facts' module has been renamed to 'ovirt_snapshot_info', "
|
module.deprecate("The 'ovirt_snapshot_facts' module has been renamed to 'ovirt_snapshot_info', "
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ ovirt_storage_domains:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -88,7 +87,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_storage_domain_facts', 'community.general.ovirt_storage_domain_facts')
|
is_old_facts = module._name in ('ovirt_storage_domain_facts', 'community.general.ovirt_storage_domain_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_storage_domain_facts' module has been renamed to 'ovirt_storage_domain_info', "
|
module.deprecate("The 'ovirt_storage_domain_facts' module has been renamed to 'ovirt_storage_domain_info', "
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ ovirt_storage_templates:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -96,7 +95,7 @@ def main():
|
|||||||
max=dict(default=None, type='int'),
|
max=dict(default=None, type='int'),
|
||||||
unregistered=dict(default=False, type='bool'),
|
unregistered=dict(default=False, type='bool'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_storage_template_facts', 'community.general.ovirt_storage_template_facts')
|
is_old_facts = module._name in ('ovirt_storage_template_facts', 'community.general.ovirt_storage_template_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_storage_template_facts' module has been renamed to 'ovirt_storage_template_info', "
|
module.deprecate("The 'ovirt_storage_template_facts' module has been renamed to 'ovirt_storage_template_info', "
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ ovirt_storage_vms:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -96,7 +95,7 @@ def main():
|
|||||||
max=dict(default=None, type='int'),
|
max=dict(default=None, type='int'),
|
||||||
unregistered=dict(default=False, type='bool'),
|
unregistered=dict(default=False, type='bool'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_storage_vm_facts', 'community.general.ovirt_storage_vm_facts')
|
is_old_facts = module._name in ('ovirt_storage_vm_facts', 'community.general.ovirt_storage_vm_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_storage_vm_facts' module has been renamed to 'ovirt_storage_vm_info', "
|
module.deprecate("The 'ovirt_storage_vm_facts' module has been renamed to 'ovirt_storage_vm_info', "
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ ovirt_tags:
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -112,7 +111,7 @@ def main():
|
|||||||
host=dict(default=None),
|
host=dict(default=None),
|
||||||
vm=dict(default=None),
|
vm=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_tag_facts', 'community.general.ovirt_tag_facts')
|
is_old_facts = module._name in ('ovirt_tag_facts', 'community.general.ovirt_tag_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_tag_facts' module has been renamed to 'ovirt_tag_info', "
|
module.deprecate("The 'ovirt_tag_facts' module has been renamed to 'ovirt_tag_info', "
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ ovirt_templates:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -86,7 +85,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_template_facts', 'community.general.ovirt_template_facts')
|
is_old_facts = module._name in ('ovirt_template_facts', 'community.general.ovirt_template_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_template_facts' module has been renamed to 'ovirt_template_info', "
|
module.deprecate("The 'ovirt_template_facts' module has been renamed to 'ovirt_template_info', "
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ ovirt_users:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -85,7 +84,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_user_facts', 'community.general.ovirt_user_facts')
|
is_old_facts = module._name in ('ovirt_user_facts', 'community.general.ovirt_user_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_user_facts' module has been renamed to 'ovirt_user_info', "
|
module.deprecate("The 'ovirt_user_facts' module has been renamed to 'ovirt_user_info', "
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ ovirt_vms:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -120,7 +119,7 @@ def main():
|
|||||||
case_sensitive=dict(default=True, type='bool'),
|
case_sensitive=dict(default=True, type='bool'),
|
||||||
max=dict(default=None, type='int'),
|
max=dict(default=None, type='int'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_vm_facts', 'community.general.ovirt_vm_facts')
|
is_old_facts = module._name in ('ovirt_vm_facts', 'community.general.ovirt_vm_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_vm_facts' module has been renamed to 'ovirt_vm_info', "
|
module.deprecate("The 'ovirt_vm_facts' module has been renamed to 'ovirt_vm_info', "
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ ovirt_vm_pools:
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from ansible.module_utils.common.removed import removed_module
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
||||||
check_sdk,
|
check_sdk,
|
||||||
@@ -85,7 +84,7 @@ def main():
|
|||||||
argument_spec = ovirt_info_full_argument_spec(
|
argument_spec = ovirt_info_full_argument_spec(
|
||||||
pattern=dict(default='', required=False),
|
pattern=dict(default='', required=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
is_old_facts = module._name in ('ovirt_vmpool_facts', 'community.general.ovirt_vmpool_facts')
|
is_old_facts = module._name in ('ovirt_vmpool_facts', 'community.general.ovirt_vmpool_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
module.deprecate("The 'ovirt_vmpool_facts' module has been renamed to 'ovirt_vmpool_info', "
|
module.deprecate("The 'ovirt_vmpool_facts' module has been renamed to 'ovirt_vmpool_info', "
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ def main():
|
|||||||
required_together=rax_required_together(),
|
required_together=rax_required_together(),
|
||||||
mutually_exclusive=[['address', 'id', 'name']],
|
mutually_exclusive=[['address', 'id', 'name']],
|
||||||
required_one_of=[['address', 'id', 'name']],
|
required_one_of=[['address', 'id', 'name']],
|
||||||
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
if not HAS_PYRAX:
|
if not HAS_PYRAX:
|
||||||
|
|||||||
@@ -119,20 +119,13 @@ class NicTag(object):
|
|||||||
return is_mac(self.mac.lower())
|
return is_mac(self.mac.lower())
|
||||||
|
|
||||||
def nictag_exists(self):
|
def nictag_exists(self):
|
||||||
cmd = [self.nictagadm_bin]
|
cmd = [self.nictagadm_bin, 'exists', self.name]
|
||||||
|
|
||||||
cmd.append('exists')
|
|
||||||
cmd.append(self.name)
|
|
||||||
|
|
||||||
(rc, dummy, dummy) = self.module.run_command(cmd)
|
(rc, dummy, dummy) = self.module.run_command(cmd)
|
||||||
|
|
||||||
return rc == 0
|
return rc == 0
|
||||||
|
|
||||||
def add_nictag(self):
|
def add_nictag(self):
|
||||||
cmd = [self.nictagadm_bin]
|
cmd = [self.nictagadm_bin, '-v', 'add']
|
||||||
|
|
||||||
cmd.append('-v')
|
|
||||||
cmd.append('add')
|
|
||||||
|
|
||||||
if self.etherstub:
|
if self.etherstub:
|
||||||
cmd.append('-l')
|
cmd.append('-l')
|
||||||
@@ -150,10 +143,7 @@ class NicTag(object):
|
|||||||
return self.module.run_command(cmd)
|
return self.module.run_command(cmd)
|
||||||
|
|
||||||
def delete_nictag(self):
|
def delete_nictag(self):
|
||||||
cmd = [self.nictagadm_bin]
|
cmd = [self.nictagadm_bin, '-v', 'delete']
|
||||||
|
|
||||||
cmd.append('-v')
|
|
||||||
cmd.append('delete')
|
|
||||||
|
|
||||||
if self.force:
|
if self.force:
|
||||||
cmd.append('-f')
|
cmd.append('-f')
|
||||||
|
|||||||
@@ -71,10 +71,7 @@ class ImageFacts(object):
|
|||||||
self.filters = module.params['filters']
|
self.filters = module.params['filters']
|
||||||
|
|
||||||
def return_all_installed_images(self):
|
def return_all_installed_images(self):
|
||||||
cmd = [self.module.get_bin_path('imgadm')]
|
cmd = [self.module.get_bin_path('imgadm'), 'list', '-j']
|
||||||
|
|
||||||
cmd.append('list')
|
|
||||||
cmd.append('-j')
|
|
||||||
|
|
||||||
if self.filters:
|
if self.filters:
|
||||||
cmd.append(self.filters)
|
cmd.append(self.filters)
|
||||||
@@ -102,7 +99,7 @@ def main():
|
|||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
filters=dict(default=None),
|
filters=dict(default=None),
|
||||||
),
|
),
|
||||||
supports_check_mode=False,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
is_old_facts = module._name in ('smartos_image_facts', 'community.general.smartos_image_facts')
|
is_old_facts = module._name in ('smartos_image_facts', 'community.general.smartos_image_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- List of resolvers to be put into C(/etc/resolv.conf).
|
- List of resolvers to be put into C(/etc/resolv.conf).
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: str
|
||||||
routes:
|
routes:
|
||||||
required: false
|
required: false
|
||||||
description:
|
description:
|
||||||
@@ -702,7 +702,7 @@ def main():
|
|||||||
vnc_password=dict(type='str', no_log=True),
|
vnc_password=dict(type='str', no_log=True),
|
||||||
disks=dict(type='list', elements='dict'),
|
disks=dict(type='list', elements='dict'),
|
||||||
nics=dict(type='list', elements='dict'),
|
nics=dict(type='list', elements='dict'),
|
||||||
resolvers=dict(type='list', elements='dict'),
|
resolvers=dict(type='list', elements='str'),
|
||||||
filesystems=dict(type='list', elements='dict'),
|
filesystems=dict(type='list', elements='dict'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ EXAMPLES = '''
|
|||||||
datacenter: dal09
|
datacenter: dal09
|
||||||
tags:
|
tags:
|
||||||
- ansible-module-test
|
- ansible-module-test
|
||||||
- ansible-module-test-slaves
|
- ansible-module-test-replicas
|
||||||
hourly: yes
|
hourly: yes
|
||||||
private: no
|
private: no
|
||||||
dedicated: no
|
dedicated: no
|
||||||
@@ -235,7 +235,7 @@ EXAMPLES = '''
|
|||||||
datacenter: dal09
|
datacenter: dal09
|
||||||
tags:
|
tags:
|
||||||
- ansible-module-test
|
- ansible-module-test
|
||||||
- ansible-module-test-slaves
|
- ansible-module-test-replicas
|
||||||
hourly: yes
|
hourly: yes
|
||||||
private: no
|
private: no
|
||||||
dedicated: no
|
dedicated: no
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ seealso:
|
|||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: Get info for job awx
|
- name: Get info for job awx
|
||||||
community.general.nomad_job:
|
community.general.nomad_job_info:
|
||||||
host: localhost
|
host: localhost
|
||||||
name: awx
|
name: awx
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: List Nomad jobs
|
- name: List Nomad jobs
|
||||||
community.general.nomad_job:
|
community.general.nomad_job_info:
|
||||||
host: localhost
|
host: localhost
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|||||||
@@ -164,22 +164,20 @@ def install_plugin(module, plugin_bin, plugin_name, url, timeout, kibana_version
|
|||||||
cmd_args = [plugin_bin, "plugin", PACKAGE_STATE_MAP["present"], plugin_name]
|
cmd_args = [plugin_bin, "plugin", PACKAGE_STATE_MAP["present"], plugin_name]
|
||||||
|
|
||||||
if url:
|
if url:
|
||||||
cmd_args.append("--url %s" % url)
|
cmd_args.extend(["--url", url])
|
||||||
|
|
||||||
if timeout:
|
if timeout:
|
||||||
cmd_args.append("--timeout %s" % timeout)
|
cmd_args.extend(["--timeout", timeout])
|
||||||
|
|
||||||
cmd = " ".join(cmd_args)
|
|
||||||
|
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
return True, cmd, "check mode", ""
|
return True, " ".join(cmd_args), "check mode", ""
|
||||||
|
|
||||||
rc, out, err = module.run_command(cmd)
|
rc, out, err = module.run_command(cmd_args)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
reason = parse_error(out)
|
reason = parse_error(out)
|
||||||
module.fail_json(msg=reason)
|
module.fail_json(msg=reason)
|
||||||
|
|
||||||
return True, cmd, out, err
|
return True, " ".join(cmd_args), out, err
|
||||||
|
|
||||||
|
|
||||||
def remove_plugin(module, plugin_bin, plugin_name, kibana_version='4.6'):
|
def remove_plugin(module, plugin_bin, plugin_name, kibana_version='4.6'):
|
||||||
@@ -189,23 +187,21 @@ def remove_plugin(module, plugin_bin, plugin_name, kibana_version='4.6'):
|
|||||||
else:
|
else:
|
||||||
cmd_args = [plugin_bin, "plugin", PACKAGE_STATE_MAP["absent"], plugin_name]
|
cmd_args = [plugin_bin, "plugin", PACKAGE_STATE_MAP["absent"], plugin_name]
|
||||||
|
|
||||||
cmd = " ".join(cmd_args)
|
|
||||||
|
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
return True, cmd, "check mode", ""
|
return True, " ".join(cmd_args), "check mode", ""
|
||||||
|
|
||||||
rc, out, err = module.run_command(cmd)
|
rc, out, err = module.run_command(cmd_args)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
reason = parse_error(out)
|
reason = parse_error(out)
|
||||||
module.fail_json(msg=reason)
|
module.fail_json(msg=reason)
|
||||||
|
|
||||||
return True, cmd, out, err
|
return True, " ".join(cmd_args), out, err
|
||||||
|
|
||||||
|
|
||||||
def get_kibana_version(module, plugin_bin):
|
def get_kibana_version(module, plugin_bin):
|
||||||
cmd_args = [plugin_bin, '--version']
|
cmd_args = [plugin_bin, '--version']
|
||||||
cmd = " ".join(cmd_args)
|
|
||||||
rc, out, err = module.run_command(cmd)
|
rc, out, err = module.run_command(cmd_args)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(msg="Failed to get Kibana version : %s" % err)
|
module.fail_json(msg="Failed to get Kibana version : %s" % err)
|
||||||
|
|
||||||
@@ -251,7 +247,7 @@ def main():
|
|||||||
|
|
||||||
if state == "present":
|
if state == "present":
|
||||||
if force:
|
if force:
|
||||||
remove_plugin(module, plugin_bin, name)
|
remove_plugin(module, plugin_bin, name, kibana_version)
|
||||||
changed, cmd, out, err = install_plugin(module, plugin_bin, name, url, timeout, kibana_version)
|
changed, cmd, out, err = install_plugin(module, plugin_bin, name, url, timeout, kibana_version)
|
||||||
|
|
||||||
elif state == "absent":
|
elif state == "absent":
|
||||||
|
|||||||
@@ -98,9 +98,8 @@ from ansible.module_utils._text import to_native
|
|||||||
|
|
||||||
|
|
||||||
def get_xattr_keys(module, path, follow):
|
def get_xattr_keys(module, path, follow):
|
||||||
cmd = [module.get_bin_path('getfattr', True)]
|
cmd = [module.get_bin_path('getfattr', True), '--absolute-names']
|
||||||
# prevents warning and not sure why it's not default
|
|
||||||
cmd.append('--absolute-names')
|
|
||||||
if not follow:
|
if not follow:
|
||||||
cmd.append('-h')
|
cmd.append('-h')
|
||||||
cmd.append(path)
|
cmd.append(path)
|
||||||
@@ -109,10 +108,8 @@ def get_xattr_keys(module, path, follow):
|
|||||||
|
|
||||||
|
|
||||||
def get_xattr(module, path, key, follow):
|
def get_xattr(module, path, key, follow):
|
||||||
|
cmd = [module.get_bin_path('getfattr', True), '--absolute-names']
|
||||||
|
|
||||||
cmd = [module.get_bin_path('getfattr', True)]
|
|
||||||
# prevents warning and not sure why it's not default
|
|
||||||
cmd.append('--absolute-names')
|
|
||||||
if not follow:
|
if not follow:
|
||||||
cmd.append('-h')
|
cmd.append('-h')
|
||||||
if key is None:
|
if key is None:
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ EXAMPLES = r'''
|
|||||||
- name: Changing Managing hosts list
|
- name: Changing Managing hosts list
|
||||||
community.general.ipa_service:
|
community.general.ipa_service:
|
||||||
name: http/host01.example.com
|
name: http/host01.example.com
|
||||||
host:
|
hosts:
|
||||||
- host01.example.com
|
- host01.example.com
|
||||||
- host02.example.com
|
- host02.example.com
|
||||||
ipa_host: ipa.example.com
|
ipa_host: ipa.example.com
|
||||||
|
|||||||
@@ -269,16 +269,18 @@ def get_user_diff(client, ipa_user, module_user):
|
|||||||
def get_ssh_key_fingerprint(ssh_key, hash_algo='sha256'):
|
def get_ssh_key_fingerprint(ssh_key, hash_algo='sha256'):
|
||||||
"""
|
"""
|
||||||
Return the public key fingerprint of a given public SSH key
|
Return the public key fingerprint of a given public SSH key
|
||||||
in format "[fp] [user@host] (ssh-rsa)" where fp is of the format:
|
in format "[fp] [comment] (ssh-rsa)" where fp is of the format:
|
||||||
FB:0C:AC:0A:07:94:5B:CE:75:6E:63:32:13:AD:AD:D7
|
FB:0C:AC:0A:07:94:5B:CE:75:6E:63:32:13:AD:AD:D7
|
||||||
for md5 or
|
for md5 or
|
||||||
SHA256:[base64]
|
SHA256:[base64]
|
||||||
for sha256
|
for sha256
|
||||||
|
Comments are assumed to be all characters past the second
|
||||||
|
whitespace character in the sshpubkey string.
|
||||||
:param ssh_key:
|
:param ssh_key:
|
||||||
:param hash_algo:
|
:param hash_algo:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
parts = ssh_key.strip().split()
|
parts = ssh_key.strip().split(None, 2)
|
||||||
if len(parts) == 0:
|
if len(parts) == 0:
|
||||||
return None
|
return None
|
||||||
key_type = parts[0]
|
key_type = parts[0]
|
||||||
@@ -293,8 +295,8 @@ def get_ssh_key_fingerprint(ssh_key, hash_algo='sha256'):
|
|||||||
if len(parts) < 3:
|
if len(parts) < 3:
|
||||||
return "%s (%s)" % (key_fp, key_type)
|
return "%s (%s)" % (key_fp, key_type)
|
||||||
else:
|
else:
|
||||||
user_host = parts[2]
|
comment = parts[2]
|
||||||
return "%s %s (%s)" % (key_fp, user_host, key_type)
|
return "%s %s (%s)" % (key_fp, comment, key_type)
|
||||||
|
|
||||||
|
|
||||||
def ensure(module, client):
|
def ensure(module, client):
|
||||||
|
|||||||
@@ -367,10 +367,9 @@ class HAProxy(object):
|
|||||||
# We can assume there will only be 1 element in state because both svname and pxname are always set when we get here
|
# We can assume there will only be 1 element in state because both svname and pxname are always set when we get here
|
||||||
# When using track we get a status like this: MAINT (via pxname/svname) so we need to do substring matching
|
# When using track we get a status like this: MAINT (via pxname/svname) so we need to do substring matching
|
||||||
if status in state[0]['status']:
|
if status in state[0]['status']:
|
||||||
if not self._drain or (state[0]['scur'] == '0' and 'MAINT' in state):
|
if not self._drain or state[0]['scur'] == '0':
|
||||||
return True
|
return True
|
||||||
else:
|
time.sleep(self.wait_interval)
|
||||||
time.sleep(self.wait_interval)
|
|
||||||
|
|
||||||
self.module.fail_json(msg="server %s/%s not status '%s' after %d retries. Aborting." %
|
self.module.fail_json(msg="server %s/%s not status '%s' after %d retries. Aborting." %
|
||||||
(pxname, svname, status, self.wait_retries))
|
(pxname, svname, status, self.wait_retries))
|
||||||
@@ -409,15 +408,17 @@ class HAProxy(object):
|
|||||||
def drain(self, host, backend, status='DRAIN'):
|
def drain(self, host, backend, status='DRAIN'):
|
||||||
"""
|
"""
|
||||||
Drain action, sets the server to DRAIN mode.
|
Drain action, sets the server to DRAIN mode.
|
||||||
In this mode mode, the server will not accept any new connections
|
In this mode, the server will not accept any new connections
|
||||||
other than those that are accepted via persistence.
|
other than those that are accepted via persistence.
|
||||||
"""
|
"""
|
||||||
haproxy_version = self.discover_version()
|
haproxy_version = self.discover_version()
|
||||||
|
|
||||||
# check if haproxy version suppots DRAIN state (starting with 1.5)
|
# check if haproxy version supports DRAIN state (starting with 1.5)
|
||||||
if haproxy_version and (1, 5) <= haproxy_version:
|
if haproxy_version and (1, 5) <= haproxy_version:
|
||||||
cmd = "set server $pxname/$svname state drain"
|
cmd = "set server $pxname/$svname state drain"
|
||||||
self.execute_for_backends(cmd, backend, host, status)
|
self.execute_for_backends(cmd, backend, host, "DRAIN")
|
||||||
|
if status == "MAINT":
|
||||||
|
self.disabled(host, backend, self.shutdown_sessions)
|
||||||
|
|
||||||
def act(self):
|
def act(self):
|
||||||
"""
|
"""
|
||||||
@@ -426,7 +427,7 @@ class HAProxy(object):
|
|||||||
# Get the state before the run
|
# Get the state before the run
|
||||||
self.command_results['state_before'] = self.get_state_for(self.backend, self.host)
|
self.command_results['state_before'] = self.get_state_for(self.backend, self.host)
|
||||||
|
|
||||||
# toggle enable/disbale server
|
# toggle enable/disable server
|
||||||
if self.state == 'enabled':
|
if self.state == 'enabled':
|
||||||
self.enabled(self.host, self.backend, self.weight)
|
self.enabled(self.host, self.backend, self.weight)
|
||||||
elif self.state == 'disabled' and self._drain:
|
elif self.state == 'disabled' and self._drain:
|
||||||
|
|||||||
@@ -205,9 +205,11 @@ class ResourceRecord(object):
|
|||||||
def list_record(self, record):
|
def list_record(self, record):
|
||||||
# check if the record exists via list on ipwcli
|
# check if the record exists via list on ipwcli
|
||||||
search = 'list %s' % (record.replace(';', '&&').replace('set', 'where'))
|
search = 'list %s' % (record.replace(';', '&&').replace('set', 'where'))
|
||||||
cmd = [self.module.get_bin_path('ipwcli', True)]
|
cmd = [
|
||||||
cmd.append('-user=%s' % (self.user))
|
self.module.get_bin_path('ipwcli', True),
|
||||||
cmd.append('-password=%s' % (self.password))
|
'-user=%s' % self.user,
|
||||||
|
'-password=%s' % self.password,
|
||||||
|
]
|
||||||
rc, out, err = self.module.run_command(cmd, data=search)
|
rc, out, err = self.module.run_command(cmd, data=search)
|
||||||
|
|
||||||
if 'Invalid username or password' in out:
|
if 'Invalid username or password' in out:
|
||||||
@@ -222,9 +224,11 @@ class ResourceRecord(object):
|
|||||||
def deploy_record(self, record):
|
def deploy_record(self, record):
|
||||||
# check what happens if create fails on ipworks
|
# check what happens if create fails on ipworks
|
||||||
stdin = 'create %s' % (record)
|
stdin = 'create %s' % (record)
|
||||||
cmd = [self.module.get_bin_path('ipwcli', True)]
|
cmd = [
|
||||||
cmd.append('-user=%s' % (self.user))
|
self.module.get_bin_path('ipwcli', True),
|
||||||
cmd.append('-password=%s' % (self.password))
|
'-user=%s' % self.user,
|
||||||
|
'-password=%s' % self.password,
|
||||||
|
]
|
||||||
rc, out, err = self.module.run_command(cmd, data=stdin)
|
rc, out, err = self.module.run_command(cmd, data=stdin)
|
||||||
|
|
||||||
if 'Invalid username or password' in out:
|
if 'Invalid username or password' in out:
|
||||||
@@ -238,9 +242,11 @@ class ResourceRecord(object):
|
|||||||
def delete_record(self, record):
|
def delete_record(self, record):
|
||||||
# check what happens if create fails on ipworks
|
# check what happens if create fails on ipworks
|
||||||
stdin = 'delete %s' % (record.replace(';', '&&').replace('set', 'where'))
|
stdin = 'delete %s' % (record.replace(';', '&&').replace('set', 'where'))
|
||||||
cmd = [self.module.get_bin_path('ipwcli', True)]
|
cmd = [
|
||||||
cmd.append('-user=%s' % (self.user))
|
self.module.get_bin_path('ipwcli', True),
|
||||||
cmd.append('-password=%s' % (self.password))
|
'-user=%s' % self.user,
|
||||||
|
'-password=%s' % self.password,
|
||||||
|
]
|
||||||
rc, out, err = self.module.run_command(cmd, data=stdin)
|
rc, out, err = self.module.run_command(cmd, data=stdin)
|
||||||
|
|
||||||
if 'Invalid username or password' in out:
|
if 'Invalid username or password' in out:
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ def main():
|
|||||||
['username', 'level', 'integrity', 'authkey'],
|
['username', 'level', 'integrity', 'authkey'],
|
||||||
['privacy', 'privkey'],
|
['privacy', 'privkey'],
|
||||||
),
|
),
|
||||||
supports_check_mode=False,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
m_args = module.params
|
m_args = module.params
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ def packages_not_latest(module, names, site, update_catalog):
|
|||||||
cmd.append('-U')
|
cmd.append('-U')
|
||||||
cmd.append('-c')
|
cmd.append('-c')
|
||||||
if site is not None:
|
if site is not None:
|
||||||
cmd.extend('-t', site)
|
cmd.extend(['-t', site])
|
||||||
if names != ['*']:
|
if names != ['*']:
|
||||||
cmd.extend(names)
|
cmd.extend(names)
|
||||||
rc, out, err = run_command(module, cmd)
|
rc, out, err = run_command(module, cmd)
|
||||||
@@ -159,7 +159,7 @@ def package_install(module, state, pkgs, site, update_catalog, force):
|
|||||||
if update_catalog:
|
if update_catalog:
|
||||||
cmd.append('-U')
|
cmd.append('-U')
|
||||||
if site is not None:
|
if site is not None:
|
||||||
cmd.extend('-t', site)
|
cmd.extend(['-t', site])
|
||||||
if force:
|
if force:
|
||||||
cmd.append('-f')
|
cmd.append('-f')
|
||||||
cmd.extend(pkgs)
|
cmd.extend(pkgs)
|
||||||
@@ -174,7 +174,7 @@ def package_upgrade(module, pkgs, site, update_catalog, force):
|
|||||||
if update_catalog:
|
if update_catalog:
|
||||||
cmd.append('-U')
|
cmd.append('-U')
|
||||||
if site is not None:
|
if site is not None:
|
||||||
cmd.extend('-t', site)
|
cmd.extend(['-t', site])
|
||||||
if force:
|
if force:
|
||||||
cmd.append('-f')
|
cmd.append('-f')
|
||||||
cmd += pkgs
|
cmd += pkgs
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ author: "Joe Adams (@sysadmind)"
|
|||||||
short_description: Add or remove Pulp repos from a remote host.
|
short_description: Add or remove Pulp repos from a remote host.
|
||||||
description:
|
description:
|
||||||
- Add or remove Pulp repos from a remote host.
|
- Add or remove Pulp repos from a remote host.
|
||||||
|
- Note, this is for Pulp 2 only.
|
||||||
options:
|
options:
|
||||||
add_export_distributor:
|
add_export_distributor:
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -108,8 +108,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||||||
|
|
||||||
|
|
||||||
def package_installed(module, name, category):
|
def package_installed(module, name, category):
|
||||||
cmd = [module.get_bin_path('pkginfo', True)]
|
cmd = [module.get_bin_path('pkginfo', True), '-q']
|
||||||
cmd.append('-q')
|
|
||||||
if category:
|
if category:
|
||||||
cmd.append('-c')
|
cmd.append('-c')
|
||||||
cmd.append(name)
|
cmd.append(name)
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ def get_cmd(m, subcommand):
|
|||||||
"puts together the basic zypper command arguments with those passed to the module"
|
"puts together the basic zypper command arguments with those passed to the module"
|
||||||
is_install = subcommand in ['install', 'update', 'patch', 'dist-upgrade']
|
is_install = subcommand in ['install', 'update', 'patch', 'dist-upgrade']
|
||||||
is_refresh = subcommand == 'refresh'
|
is_refresh = subcommand == 'refresh'
|
||||||
cmd = ['/usr/bin/zypper', '--quiet', '--non-interactive', '--xmlout']
|
cmd = [m.get_bin_path('zypper', required=True), '--quiet', '--non-interactive', '--xmlout']
|
||||||
if m.params['extra_args_precommand']:
|
if m.params['extra_args_precommand']:
|
||||||
args_list = m.params['extra_args_precommand'].split()
|
args_list = m.params['extra_args_precommand'].split()
|
||||||
cmd.extend(args_list)
|
cmd.extend(args_list)
|
||||||
|
|||||||
@@ -141,9 +141,9 @@ from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
|||||||
REPO_OPTS = ['alias', 'name', 'priority', 'enabled', 'autorefresh', 'gpgcheck']
|
REPO_OPTS = ['alias', 'name', 'priority', 'enabled', 'autorefresh', 'gpgcheck']
|
||||||
|
|
||||||
|
|
||||||
def _get_cmd(*args):
|
def _get_cmd(module, *args):
|
||||||
"""Combines the non-interactive zypper command with arguments/subcommands"""
|
"""Combines the non-interactive zypper command with arguments/subcommands"""
|
||||||
cmd = ['/usr/bin/zypper', '--quiet', '--non-interactive']
|
cmd = [module.get_bin_path('zypper', required=True), '--quiet', '--non-interactive']
|
||||||
cmd.extend(args)
|
cmd.extend(args)
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
@@ -151,7 +151,7 @@ def _get_cmd(*args):
|
|||||||
|
|
||||||
def _parse_repos(module):
|
def _parse_repos(module):
|
||||||
"""parses the output of zypper --xmlout repos and return a parse repo dictionary"""
|
"""parses the output of zypper --xmlout repos and return a parse repo dictionary"""
|
||||||
cmd = _get_cmd('--xmlout', 'repos')
|
cmd = _get_cmd(module, '--xmlout', 'repos')
|
||||||
|
|
||||||
if not HAS_XML:
|
if not HAS_XML:
|
||||||
module.fail_json(msg=missing_required_lib("python-xml"), exception=XML_IMP_ERR)
|
module.fail_json(msg=missing_required_lib("python-xml"), exception=XML_IMP_ERR)
|
||||||
@@ -230,7 +230,7 @@ def repo_exists(module, repodata, overwrite_multiple):
|
|||||||
def addmodify_repo(module, repodata, old_repos, zypper_version, warnings):
|
def addmodify_repo(module, repodata, old_repos, zypper_version, warnings):
|
||||||
"Adds the repo, removes old repos before, that would conflict."
|
"Adds the repo, removes old repos before, that would conflict."
|
||||||
repo = repodata['url']
|
repo = repodata['url']
|
||||||
cmd = _get_cmd('addrepo', '--check')
|
cmd = _get_cmd(module, 'addrepo', '--check')
|
||||||
if repodata['name']:
|
if repodata['name']:
|
||||||
cmd.extend(['--name', repodata['name']])
|
cmd.extend(['--name', repodata['name']])
|
||||||
|
|
||||||
@@ -274,14 +274,14 @@ def addmodify_repo(module, repodata, old_repos, zypper_version, warnings):
|
|||||||
|
|
||||||
def remove_repo(module, repo):
|
def remove_repo(module, repo):
|
||||||
"Removes the repo."
|
"Removes the repo."
|
||||||
cmd = _get_cmd('removerepo', repo)
|
cmd = _get_cmd(module, 'removerepo', repo)
|
||||||
|
|
||||||
rc, stdout, stderr = module.run_command(cmd, check_rc=True)
|
rc, stdout, stderr = module.run_command(cmd, check_rc=True)
|
||||||
return rc, stdout, stderr
|
return rc, stdout, stderr
|
||||||
|
|
||||||
|
|
||||||
def get_zypper_version(module):
|
def get_zypper_version(module):
|
||||||
rc, stdout, stderr = module.run_command(['/usr/bin/zypper', '--version'])
|
rc, stdout, stderr = module.run_command([module.get_bin_path('zypper', required=True), '--version'])
|
||||||
if rc != 0 or not stdout.startswith('zypper '):
|
if rc != 0 or not stdout.startswith('zypper '):
|
||||||
return LooseVersion('1.0')
|
return LooseVersion('1.0')
|
||||||
return LooseVersion(stdout.split()[1])
|
return LooseVersion(stdout.split()[1])
|
||||||
@@ -290,9 +290,9 @@ def get_zypper_version(module):
|
|||||||
def runrefreshrepo(module, auto_import_keys=False, shortname=None):
|
def runrefreshrepo(module, auto_import_keys=False, shortname=None):
|
||||||
"Forces zypper to refresh repo metadata."
|
"Forces zypper to refresh repo metadata."
|
||||||
if auto_import_keys:
|
if auto_import_keys:
|
||||||
cmd = _get_cmd('--gpg-auto-import-keys', 'refresh', '--force')
|
cmd = _get_cmd(module, '--gpg-auto-import-keys', 'refresh', '--force')
|
||||||
else:
|
else:
|
||||||
cmd = _get_cmd('refresh', '--force')
|
cmd = _get_cmd(module, 'refresh', '--force')
|
||||||
if shortname is not None:
|
if shortname is not None:
|
||||||
cmd.extend(['-r', shortname])
|
cmd.extend(['-r', shortname])
|
||||||
|
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ def main():
|
|||||||
},
|
},
|
||||||
required_if=[['fact_subset', 'detailed_inventory', ['system_query_options']],
|
required_if=[['fact_subset', 'detailed_inventory', ['system_query_options']],
|
||||||
['fact_subset', 'subsystem_health', ['system_query_options']], ],
|
['fact_subset', 'subsystem_health', ['system_query_options']], ],
|
||||||
supports_check_mode=False)
|
supports_check_mode=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
_validate_inputs(module.params)
|
_validate_inputs(module.params)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ options:
|
|||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Data Center name.
|
- Data Center name.
|
||||||
|
type: str
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
- "Retrieve additional information. Options available: 'visualContent'."
|
- "Retrieve additional information. Options available: 'visualContent'."
|
||||||
@@ -113,7 +114,10 @@ class DatacenterInfoModule(OneViewModuleBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(DatacenterInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
super(DatacenterInfoModule, self).__init__(
|
||||||
|
additional_arg_spec=self.argument_spec,
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
self.is_old_facts = self.module._name in ('oneview_datacenter_facts', 'community.general.oneview_datacenter_facts')
|
self.is_old_facts = self.module._name in ('oneview_datacenter_facts', 'community.general.oneview_datacenter_facts')
|
||||||
if self.is_old_facts:
|
if self.is_old_facts:
|
||||||
self.module.deprecate("The 'oneview_datacenter_facts' module has been renamed to 'oneview_datacenter_info', "
|
self.module.deprecate("The 'oneview_datacenter_facts' module has been renamed to 'oneview_datacenter_info', "
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ options:
|
|||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Enclosure name.
|
- Enclosure name.
|
||||||
|
type: str
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
- "List with options to gather additional information about an Enclosure and related resources.
|
- "List with options to gather additional information about an Enclosure and related resources.
|
||||||
@@ -156,7 +157,10 @@ class EnclosureInfoModule(OneViewModuleBase):
|
|||||||
argument_spec = dict(name=dict(type='str'), options=dict(type='list'), params=dict(type='dict'))
|
argument_spec = dict(name=dict(type='str'), options=dict(type='list'), params=dict(type='dict'))
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(EnclosureInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
super(EnclosureInfoModule, self).__init__(
|
||||||
|
additional_arg_spec=self.argument_spec,
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
self.is_old_facts = self.module._name in ('oneview_enclosure_facts', 'community.general.oneview_enclosure_facts')
|
self.is_old_facts = self.module._name in ('oneview_enclosure_facts', 'community.general.oneview_enclosure_facts')
|
||||||
if self.is_old_facts:
|
if self.is_old_facts:
|
||||||
self.module.deprecate("The 'oneview_enclosure_facts' module has been renamed to 'oneview_enclosure_info', "
|
self.module.deprecate("The 'oneview_enclosure_facts' module has been renamed to 'oneview_enclosure_info', "
|
||||||
|
|||||||
@@ -24,11 +24,13 @@ options:
|
|||||||
- C(present) will ensure data properties are compliant with OneView.
|
- C(present) will ensure data properties are compliant with OneView.
|
||||||
- C(absent) will remove the resource from OneView, if it exists.
|
- C(absent) will remove the resource from OneView, if it exists.
|
||||||
- C(default_bandwidth_reset) will reset the network connection template to the default.
|
- C(default_bandwidth_reset) will reset the network connection template to the default.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: [present, absent, default_bandwidth_reset]
|
choices: [present, absent, default_bandwidth_reset]
|
||||||
data:
|
data:
|
||||||
description:
|
description:
|
||||||
- List with Ethernet Network properties.
|
- List with Ethernet Network properties.
|
||||||
|
type: dict
|
||||||
required: true
|
required: true
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ options:
|
|||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Ethernet Network name.
|
- Ethernet Network name.
|
||||||
|
type: str
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
- "List with options to gather additional information about an Ethernet Network and related resources.
|
- "List with options to gather additional information about an Ethernet Network and related resources.
|
||||||
@@ -111,7 +112,10 @@ class EthernetNetworkInfoModule(OneViewModuleBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(EthernetNetworkInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
super(EthernetNetworkInfoModule, self).__init__(
|
||||||
|
additional_arg_spec=self.argument_spec,
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
self.is_old_facts = self.module._name in ('oneview_ethernet_network_facts', 'community.general.oneview_ethernet_network_facts')
|
self.is_old_facts = self.module._name in ('oneview_ethernet_network_facts', 'community.general.oneview_ethernet_network_facts')
|
||||||
if self.is_old_facts:
|
if self.is_old_facts:
|
||||||
self.module.deprecate("The 'oneview_ethernet_network_facts' module has been renamed to 'oneview_ethernet_network_info', "
|
self.module.deprecate("The 'oneview_ethernet_network_facts' module has been renamed to 'oneview_ethernet_network_info', "
|
||||||
|
|||||||
@@ -20,11 +20,13 @@ options:
|
|||||||
- Indicates the desired state for the Fibre Channel Network resource.
|
- Indicates the desired state for the Fibre Channel Network resource.
|
||||||
C(present) will ensure data properties are compliant with OneView.
|
C(present) will ensure data properties are compliant with OneView.
|
||||||
C(absent) will remove the resource from OneView, if it exists.
|
C(absent) will remove the resource from OneView, if it exists.
|
||||||
|
type: str
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
required: true
|
required: true
|
||||||
data:
|
data:
|
||||||
description:
|
description:
|
||||||
- List with the Fibre Channel Network properties.
|
- List with the Fibre Channel Network properties.
|
||||||
|
type: dict
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ options:
|
|||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Fibre Channel Network name.
|
- Fibre Channel Network name.
|
||||||
|
type: str
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
@@ -82,7 +83,10 @@ class FcNetworkInfoModule(OneViewModuleBase):
|
|||||||
params=dict(required=False, type='dict')
|
params=dict(required=False, type='dict')
|
||||||
)
|
)
|
||||||
|
|
||||||
super(FcNetworkInfoModule, self).__init__(additional_arg_spec=argument_spec)
|
super(FcNetworkInfoModule, self).__init__(
|
||||||
|
additional_arg_spec=argument_spec,
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
self.is_old_facts = self.module._name in ('oneview_fc_network_facts', 'community.general.oneview_fc_network_facts')
|
self.is_old_facts = self.module._name in ('oneview_fc_network_facts', 'community.general.oneview_fc_network_facts')
|
||||||
if self.is_old_facts:
|
if self.is_old_facts:
|
||||||
self.module.deprecate("The 'oneview_fc_network_facts' module has been renamed to 'oneview_fc_network_info', "
|
self.module.deprecate("The 'oneview_fc_network_facts' module has been renamed to 'oneview_fc_network_info', "
|
||||||
|
|||||||
@@ -21,11 +21,13 @@ options:
|
|||||||
- Indicates the desired state for the FCoE Network resource.
|
- Indicates the desired state for the FCoE Network resource.
|
||||||
C(present) will ensure data properties are compliant with OneView.
|
C(present) will ensure data properties are compliant with OneView.
|
||||||
C(absent) will remove the resource from OneView, if it exists.
|
C(absent) will remove the resource from OneView, if it exists.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
data:
|
data:
|
||||||
description:
|
description:
|
||||||
- List with FCoE Network properties.
|
- List with FCoE Network properties.
|
||||||
|
type: dict
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ options:
|
|||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- FCoE Network name.
|
- FCoE Network name.
|
||||||
|
type: str
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
@@ -81,7 +82,10 @@ class FcoeNetworkInfoModule(OneViewModuleBase):
|
|||||||
params=dict(type='dict'),
|
params=dict(type='dict'),
|
||||||
)
|
)
|
||||||
|
|
||||||
super(FcoeNetworkInfoModule, self).__init__(additional_arg_spec=argument_spec)
|
super(FcoeNetworkInfoModule, self).__init__(
|
||||||
|
additional_arg_spec=argument_spec,
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
self.is_old_facts = self.module._name in ('oneview_fcoe_network_facts', 'community.general.oneview_fcoe_network_facts')
|
self.is_old_facts = self.module._name in ('oneview_fcoe_network_facts', 'community.general.oneview_fcoe_network_facts')
|
||||||
if self.is_old_facts:
|
if self.is_old_facts:
|
||||||
self.module.deprecate("The 'oneview_fcoe_network_facts' module has been renamed to 'oneview_fcoe_network_info', "
|
self.module.deprecate("The 'oneview_fcoe_network_facts' module has been renamed to 'oneview_fcoe_network_info', "
|
||||||
|
|||||||
@@ -24,11 +24,13 @@ options:
|
|||||||
- Indicates the desired state for the Logical Interconnect Group resource.
|
- Indicates the desired state for the Logical Interconnect Group resource.
|
||||||
C(absent) will remove the resource from OneView, if it exists.
|
C(absent) will remove the resource from OneView, if it exists.
|
||||||
C(present) will ensure data properties are compliant with OneView.
|
C(present) will ensure data properties are compliant with OneView.
|
||||||
|
type: str
|
||||||
choices: [absent, present]
|
choices: [absent, present]
|
||||||
default: present
|
default: present
|
||||||
data:
|
data:
|
||||||
description:
|
description:
|
||||||
- List with the Logical Interconnect Group properties.
|
- List with the Logical Interconnect Group properties.
|
||||||
|
type: dict
|
||||||
required: true
|
required: true
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ options:
|
|||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Logical Interconnect Group name.
|
- Logical Interconnect Group name.
|
||||||
|
type: str
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
- community.general.oneview.factsparams
|
- community.general.oneview.factsparams
|
||||||
@@ -95,7 +96,10 @@ class LogicalInterconnectGroupInfoModule(OneViewModuleBase):
|
|||||||
params=dict(type='dict'),
|
params=dict(type='dict'),
|
||||||
)
|
)
|
||||||
|
|
||||||
super(LogicalInterconnectGroupInfoModule, self).__init__(additional_arg_spec=argument_spec)
|
super(LogicalInterconnectGroupInfoModule, self).__init__(
|
||||||
|
additional_arg_spec=argument_spec,
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
self.is_old_facts = self.module._name in ('oneview_logical_interconnect_group_facts', 'community.general.oneview_logical_interconnect_group_facts')
|
self.is_old_facts = self.module._name in ('oneview_logical_interconnect_group_facts', 'community.general.oneview_logical_interconnect_group_facts')
|
||||||
if self.is_old_facts:
|
if self.is_old_facts:
|
||||||
self.module.deprecate("The 'oneview_logical_interconnect_group_facts' module has been renamed to 'oneview_logical_interconnect_group_info', "
|
self.module.deprecate("The 'oneview_logical_interconnect_group_facts' module has been renamed to 'oneview_logical_interconnect_group_info', "
|
||||||
|
|||||||
@@ -23,11 +23,13 @@ options:
|
|||||||
- Indicates the desired state for the Network Set resource.
|
- Indicates the desired state for the Network Set resource.
|
||||||
- C(present) will ensure data properties are compliant with OneView.
|
- C(present) will ensure data properties are compliant with OneView.
|
||||||
- C(absent) will remove the resource from OneView, if it exists.
|
- C(absent) will remove the resource from OneView, if it exists.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
data:
|
data:
|
||||||
description:
|
description:
|
||||||
- List with the Network Set properties.
|
- List with the Network Set properties.
|
||||||
|
type: dict
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ options:
|
|||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Network Set name.
|
- Network Set name.
|
||||||
|
type: str
|
||||||
|
|
||||||
options:
|
options:
|
||||||
description:
|
description:
|
||||||
@@ -132,7 +133,10 @@ class NetworkSetInfoModule(OneViewModuleBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(NetworkSetInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
super(NetworkSetInfoModule, self).__init__(
|
||||||
|
additional_arg_spec=self.argument_spec,
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
self.is_old_facts = self.module._name in ('oneview_network_set_facts', 'community.general.oneview_network_set_facts')
|
self.is_old_facts = self.module._name in ('oneview_network_set_facts', 'community.general.oneview_network_set_facts')
|
||||||
if self.is_old_facts:
|
if self.is_old_facts:
|
||||||
self.module.deprecate("The 'oneview_network_set_facts' module has been renamed to 'oneview_network_set_info', "
|
self.module.deprecate("The 'oneview_network_set_facts' module has been renamed to 'oneview_network_set_info', "
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ options:
|
|||||||
- C(present) ensures data properties are compliant with OneView.
|
- C(present) ensures data properties are compliant with OneView.
|
||||||
- C(absent) removes the resource from OneView, if it exists.
|
- C(absent) removes the resource from OneView, if it exists.
|
||||||
- C(connection_information_set) updates the connection information for the SAN Manager. This operation is non-idempotent.
|
- C(connection_information_set) updates the connection information for the SAN Manager. This operation is non-idempotent.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: [present, absent, connection_information_set]
|
choices: [present, absent, connection_information_set]
|
||||||
data:
|
data:
|
||||||
description:
|
description:
|
||||||
- List with SAN Manager properties.
|
- List with SAN Manager properties.
|
||||||
required: true
|
type: dict
|
||||||
|
required: true
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ options:
|
|||||||
provider_display_name:
|
provider_display_name:
|
||||||
description:
|
description:
|
||||||
- Provider Display Name.
|
- Provider Display Name.
|
||||||
|
type: str
|
||||||
params:
|
params:
|
||||||
description:
|
description:
|
||||||
- List of params to delimit, filter and sort the list of resources.
|
- List of params to delimit, filter and sort the list of resources.
|
||||||
@@ -31,6 +32,7 @@ options:
|
|||||||
- C(count): The number of resources to return.
|
- C(count): The number of resources to return.
|
||||||
- C(query): A general query string to narrow the list of resources returned.
|
- C(query): A general query string to narrow the list of resources returned.
|
||||||
- C(sort): The sort order of the returned data set."
|
- C(sort): The sort order of the returned data set."
|
||||||
|
type: dict
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.oneview
|
- community.general.oneview
|
||||||
|
|
||||||
@@ -88,7 +90,10 @@ class SanManagerInfoModule(OneViewModuleBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(SanManagerInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
super(SanManagerInfoModule, self).__init__(
|
||||||
|
additional_arg_spec=self.argument_spec,
|
||||||
|
supports_check_mode=True,
|
||||||
|
)
|
||||||
self.resource_client = self.oneview_client.san_managers
|
self.resource_client = self.oneview_client.san_managers
|
||||||
self.is_old_facts = self.module._name in ('oneview_san_manager_facts', 'community.general.oneview_san_manager_facts')
|
self.is_old_facts = self.module._name in ('oneview_san_manager_facts', 'community.general.oneview_san_manager_facts')
|
||||||
if self.is_old_facts:
|
if self.is_old_facts:
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ def main():
|
|||||||
password=dict(required=True, no_log=True),
|
password=dict(required=True, no_log=True),
|
||||||
timeout=dict(type='int', default=10)
|
timeout=dict(type='int', default=10)
|
||||||
),
|
),
|
||||||
supports_check_mode=False
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
is_old_facts = module._name in ('idrac_redfish_facts', 'community.general.idrac_redfish_facts')
|
is_old_facts = module._name in ('idrac_redfish_facts', 'community.general.idrac_redfish_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ def main():
|
|||||||
password=dict(required=True, no_log=True),
|
password=dict(required=True, no_log=True),
|
||||||
timeout=dict(type='int', default=10)
|
timeout=dict(type='int', default=10)
|
||||||
),
|
),
|
||||||
supports_check_mode=False
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
is_old_facts = module._name in ('redfish_facts', 'community.general.redfish_facts')
|
is_old_facts = module._name in ('redfish_facts', 'community.general.redfish_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
|
|||||||
@@ -149,8 +149,6 @@ def get_existing_pipeline_variable(module, bitbucket):
|
|||||||
var['name'] = var.pop('key')
|
var['name'] = var.pop('key')
|
||||||
return var
|
return var
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def create_pipeline_variable(module, bitbucket):
|
def create_pipeline_variable(module, bitbucket):
|
||||||
info, content = bitbucket.request(
|
info, content = bitbucket.request(
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ def main():
|
|||||||
name=dict(type='str', required=True, aliases=['volume']),
|
name=dict(type='str', required=True, aliases=['volume']),
|
||||||
status_filter=dict(type='str', default='self-heal', choices=['self-heal', 'rebalance']),
|
status_filter=dict(type='str', default='self-heal', choices=['self-heal', 'rebalance']),
|
||||||
),
|
),
|
||||||
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
is_old_facts = module._name in ('gluster_heal_facts', 'community.general.gluster_heal_facts')
|
is_old_facts = module._name in ('gluster_heal_facts', 'community.general.gluster_heal_facts')
|
||||||
if is_old_facts:
|
if is_old_facts:
|
||||||
|
|||||||
@@ -797,7 +797,7 @@ def main():
|
|||||||
gather_subset=dict(default='minimum', type='list',)
|
gather_subset=dict(default='minimum', type='list',)
|
||||||
))
|
))
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec, supports_check_mode=False)
|
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||||
|
|
||||||
array = get_system(module)
|
array = get_system(module)
|
||||||
|
|
||||||
|
|||||||
@@ -175,10 +175,7 @@ class ZFSFacts(object):
|
|||||||
self.facts = []
|
self.facts = []
|
||||||
|
|
||||||
def dataset_exists(self):
|
def dataset_exists(self):
|
||||||
cmd = [self.module.get_bin_path('zfs')]
|
cmd = [self.module.get_bin_path('zfs'), 'list', self.name]
|
||||||
|
|
||||||
cmd.append('list')
|
|
||||||
cmd.append(self.name)
|
|
||||||
|
|
||||||
(rc, out, err) = self.module.run_command(cmd)
|
(rc, out, err) = self.module.run_command(cmd)
|
||||||
|
|
||||||
@@ -188,10 +185,7 @@ class ZFSFacts(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def get_facts(self):
|
def get_facts(self):
|
||||||
cmd = [self.module.get_bin_path('zfs')]
|
cmd = [self.module.get_bin_path('zfs'), 'get', '-H']
|
||||||
|
|
||||||
cmd.append('get')
|
|
||||||
cmd.append('-H')
|
|
||||||
if self.parsable:
|
if self.parsable:
|
||||||
cmd.append('-p')
|
cmd.append('-p')
|
||||||
if self.recurse:
|
if self.recurse:
|
||||||
@@ -202,10 +196,7 @@ class ZFSFacts(object):
|
|||||||
if self.type:
|
if self.type:
|
||||||
cmd.append('-t')
|
cmd.append('-t')
|
||||||
cmd.append(self.type)
|
cmd.append(self.type)
|
||||||
cmd.append('-o')
|
cmd.extend(['-o', 'name,property,value', self.properties, self.name])
|
||||||
cmd.append('name,property,value')
|
|
||||||
cmd.append(self.properties)
|
|
||||||
cmd.append(self.name)
|
|
||||||
|
|
||||||
(rc, out, err) = self.module.run_command(cmd)
|
(rc, out, err) = self.module.run_command(cmd)
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user