mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 10:26:52 +00:00
Compare commits
353 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3c711491a | ||
|
|
d6a57882d2 | ||
|
|
edbef2266d | ||
|
|
2b88ee01d3 | ||
|
|
afd24ccd35 | ||
|
|
26ada26df1 | ||
|
|
59999a89f1 | ||
|
|
e1f4be1e01 | ||
|
|
e7e2f095ee | ||
|
|
45200fc233 | ||
|
|
154d1b7024 | ||
|
|
541fcec900 | ||
|
|
dc6ccbea63 | ||
|
|
6cb044ac13 | ||
|
|
af78b2068a | ||
|
|
73569b1c36 | ||
|
|
5914c1df8e | ||
|
|
f847531a35 | ||
|
|
df01cde23d | ||
|
|
cdd9ced441 | ||
|
|
dfb61b283d | ||
|
|
fe7b151a26 | ||
|
|
9b983fba86 | ||
|
|
2d27dbd9ea | ||
|
|
55cbccf0fc | ||
|
|
675860c392 | ||
|
|
5e8914e00c | ||
|
|
c0230342b4 | ||
|
|
ebf15447f0 | ||
|
|
86d10f53fd | ||
|
|
d679f51018 | ||
|
|
e9e494e1ff | ||
|
|
bf90b4e88a | ||
|
|
874d7f7050 | ||
|
|
3a19fbc89c | ||
|
|
2d8e1339d1 | ||
|
|
4892f954fa | ||
|
|
6fd58ba388 | ||
|
|
49967547df | ||
|
|
492170b414 | ||
|
|
25b9391fb4 | ||
|
|
1e30afa92f | ||
|
|
7d4e69cdf7 | ||
|
|
ff23e41c21 | ||
|
|
3ce7d2fc7e | ||
|
|
20a9d120aa | ||
|
|
f4a40592a1 | ||
|
|
3d5145e924 | ||
|
|
1ae5a2cd05 | ||
|
|
75aa353281 | ||
|
|
5fe10915a8 | ||
|
|
eca6494503 | ||
|
|
b12d422fcc | ||
|
|
33809395ab | ||
|
|
60fe6ebc3c | ||
|
|
957f3e6eca | ||
|
|
dbd918865f | ||
|
|
46a83df85e | ||
|
|
57f262504d | ||
|
|
29671cb54c | ||
|
|
fd91e94279 | ||
|
|
b001e36fb3 | ||
|
|
5f63476404 | ||
|
|
eff452e4a5 | ||
|
|
d393b16064 | ||
|
|
40b5967fc3 | ||
|
|
ccabc342b9 | ||
|
|
570f6a8791 | ||
|
|
b10cf1e357 | ||
|
|
acfe464a31 | ||
|
|
f32a8dc740 | ||
|
|
ea8f109056 | ||
|
|
7e7b84348b | ||
|
|
baf552337d | ||
|
|
3ff9161ab0 | ||
|
|
aa8728b22c | ||
|
|
590ff351b4 | ||
|
|
a5824a2a9d | ||
|
|
71975be3c1 | ||
|
|
564f87c775 | ||
|
|
6750a866c6 | ||
|
|
c6316c1153 | ||
|
|
2c825f04e7 | ||
|
|
8a33e070be | ||
|
|
d2a5fdfc71 | ||
|
|
b6b2419206 | ||
|
|
4c399f1c01 | ||
|
|
923d335646 | ||
|
|
be96c33257 | ||
|
|
e68b1017e3 | ||
|
|
44e4b1d202 | ||
|
|
24378fd944 | ||
|
|
c3e1715233 | ||
|
|
ec86ebed98 | ||
|
|
5aa2779a48 | ||
|
|
f6d15ec818 | ||
|
|
f0320b5ac9 | ||
|
|
79578e5db3 | ||
|
|
43beaf4b00 | ||
|
|
6b0cc3c1de | ||
|
|
81a95a347d | ||
|
|
8026337c44 | ||
|
|
8fb1aaaf53 | ||
|
|
fda610cc23 | ||
|
|
8ecb322816 | ||
|
|
1260a63241 | ||
|
|
f6aad230c2 | ||
|
|
f3a4e5ea27 | ||
|
|
e26eaa0565 | ||
|
|
3432be3a2f | ||
|
|
4f78e7979e | ||
|
|
8a0b7dcdc9 | ||
|
|
9cd3f37686 | ||
|
|
5e1508e0df | ||
|
|
be4d294b61 | ||
|
|
1d36db1806 | ||
|
|
16a18d1456 | ||
|
|
493fa405e2 | ||
|
|
25464602d9 | ||
|
|
8a670a3929 | ||
|
|
47b8df8019 | ||
|
|
9c411586ea | ||
|
|
e0465d1f48 | ||
|
|
ad6c28069a | ||
|
|
31a1c8e185 | ||
|
|
20bd0d130c | ||
|
|
e5ecaffa1a | ||
|
|
8fd89721cd | ||
|
|
b1231c1315 | ||
|
|
48b20894b3 | ||
|
|
1676b09573 | ||
|
|
94efecaf67 | ||
|
|
e9bc32528e | ||
|
|
8e84b3ef8e | ||
|
|
944bc78360 | ||
|
|
a2a81f11c3 | ||
|
|
1a72aea4c5 | ||
|
|
36eff2fd99 | ||
|
|
47514e1401 | ||
|
|
186b4200f6 | ||
|
|
6057c3c7c4 | ||
|
|
b12113c182 | ||
|
|
4860c20108 | ||
|
|
8efbd8172c | ||
|
|
8c1b7e3ddb | ||
|
|
ec228bf32f | ||
|
|
1d39bbefd9 | ||
|
|
59fb0cf506 | ||
|
|
6c4080e78d | ||
|
|
1a81760d47 | ||
|
|
c3db6343e5 | ||
|
|
e87c2c9eb4 | ||
|
|
90a1743acf | ||
|
|
eb6ef5ae2e | ||
|
|
89dd500159 | ||
|
|
9bab144d06 | ||
|
|
31eddc0ffe | ||
|
|
bc64c4035e | ||
|
|
3ed65a0a37 | ||
|
|
93008fd41c | ||
|
|
1462ed0b4a | ||
|
|
139fcdba88 | ||
|
|
e9b8692025 | ||
|
|
3d8049190c | ||
|
|
54025a2efc | ||
|
|
94015c2096 | ||
|
|
b1a711633b | ||
|
|
79d15d526a | ||
|
|
3aeaab2708 | ||
|
|
470f4e8c02 | ||
|
|
f7f79defab | ||
|
|
d4d1c847cf | ||
|
|
044c706d64 | ||
|
|
e22667b72f | ||
|
|
4fc0c9a6d8 | ||
|
|
93650233e4 | ||
|
|
a41d1851a5 | ||
|
|
bd4da7f2c0 | ||
|
|
bf853f6f35 | ||
|
|
5dc34829c4 | ||
|
|
061b861211 | ||
|
|
e4ce977079 | ||
|
|
4776ee20e3 | ||
|
|
fdfcd15960 | ||
|
|
b934e06569 | ||
|
|
5589bcb659 | ||
|
|
41af1c3693 | ||
|
|
3802d54922 | ||
|
|
ff4aff0bef | ||
|
|
86b19a2bf4 | ||
|
|
1fc53eea22 | ||
|
|
3ecbadf694 | ||
|
|
2181c2b090 | ||
|
|
0c295d4f61 | ||
|
|
db451bf68a | ||
|
|
91095240f4 | ||
|
|
e92908b66e | ||
|
|
ef09ea519c | ||
|
|
611e024550 | ||
|
|
94b4034fd2 | ||
|
|
1bfdee0830 | ||
|
|
9350954aa3 | ||
|
|
2f05cd3330 | ||
|
|
27906ca76b | ||
|
|
278b0607f5 | ||
|
|
00d1160b56 | ||
|
|
4266163c13 | ||
|
|
ec7f885e2f | ||
|
|
4f71c9384e | ||
|
|
53e5f51e57 | ||
|
|
83ff925417 | ||
|
|
8ff611089b | ||
|
|
4def87bc53 | ||
|
|
3d70bfa1e4 | ||
|
|
554ec94110 | ||
|
|
ab4f96105c | ||
|
|
d8cf32e6c4 | ||
|
|
ead9524dc3 | ||
|
|
5d5d403415 | ||
|
|
d483fd9482 | ||
|
|
8da9cf3276 | ||
|
|
3c5c3a0113 | ||
|
|
7def57a71f | ||
|
|
e5930aabcb | ||
|
|
48bfba435f | ||
|
|
9740b76f3c | ||
|
|
24cf561135 | ||
|
|
61324ed9eb | ||
|
|
99336ba5fe | ||
|
|
9d99ccef2d | ||
|
|
a146eb3118 | ||
|
|
c7f7bd6050 | ||
|
|
54099d77ff | ||
|
|
ee07d8320a | ||
|
|
0729f0c262 | ||
|
|
57cd48f3cf | ||
|
|
afd2151672 | ||
|
|
ea9b272043 | ||
|
|
60addb332d | ||
|
|
1ade62c5bc | ||
|
|
7c8cc96d8b | ||
|
|
ca177a0ceb | ||
|
|
c0e769e5f5 | ||
|
|
585dbc3171 | ||
|
|
b400491ef3 | ||
|
|
490baed566 | ||
|
|
811c4a304a | ||
|
|
c0fde76b79 | ||
|
|
16c7615b82 | ||
|
|
474364c862 | ||
|
|
1da5f7dc54 | ||
|
|
559c914e36 | ||
|
|
91cca4ae49 | ||
|
|
82a9db9738 | ||
|
|
3fd84d71b8 | ||
|
|
a17124f3c4 | ||
|
|
efc2cbf840 | ||
|
|
aa136aca4c | ||
|
|
a1ca89b058 | ||
|
|
dd70419d18 | ||
|
|
ef5ac023cf | ||
|
|
8bc5494ad5 | ||
|
|
d95a821d5b | ||
|
|
b7697fe3de | ||
|
|
16e05ab5f3 | ||
|
|
5cf7ce705a | ||
|
|
c8b8668212 | ||
|
|
2d450a5a36 | ||
|
|
e08412c345 | ||
|
|
c355f93d62 | ||
|
|
80206b5a53 | ||
|
|
e978fd4d61 | ||
|
|
6fc8492ecf | ||
|
|
95beb452a8 | ||
|
|
c10e9e2650 | ||
|
|
ac35bf4acb | ||
|
|
50b9855ace | ||
|
|
2ab26db197 | ||
|
|
5fcf5d0c8b | ||
|
|
0f0ad6b6d1 | ||
|
|
95f3109ddc | ||
|
|
6037c5d1e6 | ||
|
|
a70d9773dd | ||
|
|
bc50b48205 | ||
|
|
02e6a8608f | ||
|
|
82f4b51873 | ||
|
|
589e8fd5e1 | ||
|
|
58f74b96ef | ||
|
|
1489c080a7 | ||
|
|
6f845f61f0 | ||
|
|
c17f5ff3e8 | ||
|
|
ff21afb227 | ||
|
|
c1d6e5c3c2 | ||
|
|
377b5d4ccd | ||
|
|
f3f7b2776f | ||
|
|
df8bfad9b9 | ||
|
|
8a231e4b36 | ||
|
|
671f850069 | ||
|
|
2fa36592e4 | ||
|
|
51d704bfe3 | ||
|
|
2b0e335752 | ||
|
|
cc28cde3a2 | ||
|
|
2d616bf4d1 | ||
|
|
25d9ab8dcd | ||
|
|
9abda18071 | ||
|
|
406fa12142 | ||
|
|
caaebb38e7 | ||
|
|
2bc74f4f04 | ||
|
|
e1e89f7735 | ||
|
|
efedd0d6e2 | ||
|
|
8079aea1ee | ||
|
|
ee7fdf5f8c | ||
|
|
ced1baad63 | ||
|
|
a0d4ee4fc1 | ||
|
|
d930c8d877 | ||
|
|
352e91a389 | ||
|
|
4b7554445b | ||
|
|
3a456a645d | ||
|
|
6f4580ebd9 | ||
|
|
8d83557e52 | ||
|
|
5ebd980e26 | ||
|
|
17447d2a84 | ||
|
|
ffee01cd9c | ||
|
|
38b4e316ae | ||
|
|
b52a6f3611 | ||
|
|
2435fb3f30 | ||
|
|
d6d9f84b0a | ||
|
|
4b04e3cc32 | ||
|
|
c681249364 | ||
|
|
57a4195b0d | ||
|
|
41a23f093d | ||
|
|
0bd085714f | ||
|
|
a4be229f67 | ||
|
|
9c4487ebc5 | ||
|
|
09ea441316 | ||
|
|
fef6abc8c8 | ||
|
|
618e567377 | ||
|
|
246abffce5 | ||
|
|
076ebb4b2d | ||
|
|
4948b521a3 | ||
|
|
e9ec26ff1b | ||
|
|
72d4476813 | ||
|
|
e96bfd07b4 | ||
|
|
c6d0419460 | ||
|
|
081b4068a0 | ||
|
|
8fba9ca751 | ||
|
|
fad4c2d956 | ||
|
|
6065dd0f18 | ||
|
|
a411ff5ea8 | ||
|
|
42b245eabf | ||
|
|
9a676bb88f | ||
|
|
cd26aec2f3 | ||
|
|
e9327a0464 |
@@ -29,14 +29,14 @@ schedules:
|
|||||||
always: true
|
always: true
|
||||||
branches:
|
branches:
|
||||||
include:
|
include:
|
||||||
- stable-8
|
|
||||||
- stable-7
|
- stable-7
|
||||||
|
- stable-6
|
||||||
- cron: 0 11 * * 0
|
- cron: 0 11 * * 0
|
||||||
displayName: Weekly (old stable branches)
|
displayName: Weekly (old stable branches)
|
||||||
always: true
|
always: true
|
||||||
branches:
|
branches:
|
||||||
include:
|
include:
|
||||||
- stable-6
|
- stable-5
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- name: checkoutPath
|
- name: checkoutPath
|
||||||
@@ -53,7 +53,7 @@ variables:
|
|||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: default
|
- container: default
|
||||||
image: quay.io/ansible/azure-pipelines-test-container:4.0.1
|
image: quay.io/ansible/azure-pipelines-test-container:3.0.0
|
||||||
|
|
||||||
pool: Standard
|
pool: Standard
|
||||||
|
|
||||||
@@ -73,19 +73,6 @@ stages:
|
|||||||
- test: 3
|
- test: 3
|
||||||
- test: 4
|
- test: 4
|
||||||
- test: extra
|
- test: extra
|
||||||
- stage: Sanity_2_16
|
|
||||||
displayName: Sanity 2.16
|
|
||||||
dependsOn: []
|
|
||||||
jobs:
|
|
||||||
- template: templates/matrix.yml
|
|
||||||
parameters:
|
|
||||||
nameFormat: Test {0}
|
|
||||||
testFormat: 2.16/sanity/{0}
|
|
||||||
targets:
|
|
||||||
- test: 1
|
|
||||||
- test: 2
|
|
||||||
- test: 3
|
|
||||||
- test: 4
|
|
||||||
- stage: Sanity_2_15
|
- stage: Sanity_2_15
|
||||||
displayName: Sanity 2.15
|
displayName: Sanity 2.15
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
@@ -112,6 +99,19 @@ stages:
|
|||||||
- test: 2
|
- test: 2
|
||||||
- test: 3
|
- test: 3
|
||||||
- test: 4
|
- test: 4
|
||||||
|
- stage: Sanity_2_13
|
||||||
|
displayName: Sanity 2.13
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- template: templates/matrix.yml
|
||||||
|
parameters:
|
||||||
|
nameFormat: Test {0}
|
||||||
|
testFormat: 2.13/sanity/{0}
|
||||||
|
targets:
|
||||||
|
- test: 1
|
||||||
|
- test: 2
|
||||||
|
- test: 3
|
||||||
|
- test: 4
|
||||||
### Units
|
### Units
|
||||||
- stage: Units_devel
|
- stage: Units_devel
|
||||||
displayName: Units devel
|
displayName: Units devel
|
||||||
@@ -122,24 +122,13 @@ stages:
|
|||||||
nameFormat: Python {0}
|
nameFormat: Python {0}
|
||||||
testFormat: devel/units/{0}/1
|
testFormat: devel/units/{0}/1
|
||||||
targets:
|
targets:
|
||||||
|
- test: 2.7
|
||||||
|
- test: 3.6
|
||||||
- test: 3.7
|
- test: 3.7
|
||||||
- test: 3.8
|
- test: 3.8
|
||||||
- test: 3.9
|
- test: 3.9
|
||||||
- test: '3.10'
|
- test: '3.10'
|
||||||
- test: '3.11'
|
- test: '3.11'
|
||||||
- test: '3.12'
|
|
||||||
- stage: Units_2_16
|
|
||||||
displayName: Units 2.16
|
|
||||||
dependsOn: []
|
|
||||||
jobs:
|
|
||||||
- template: templates/matrix.yml
|
|
||||||
parameters:
|
|
||||||
nameFormat: Python {0}
|
|
||||||
testFormat: 2.16/units/{0}/1
|
|
||||||
targets:
|
|
||||||
- test: 2.7
|
|
||||||
- test: 3.6
|
|
||||||
- test: "3.11"
|
|
||||||
- stage: Units_2_15
|
- stage: Units_2_15
|
||||||
displayName: Units 2.15
|
displayName: Units 2.15
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
@@ -161,6 +150,17 @@ stages:
|
|||||||
testFormat: 2.14/units/{0}/1
|
testFormat: 2.14/units/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- test: 3.9
|
- test: 3.9
|
||||||
|
- stage: Units_2_13
|
||||||
|
displayName: Units 2.13
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- template: templates/matrix.yml
|
||||||
|
parameters:
|
||||||
|
nameFormat: Python {0}
|
||||||
|
testFormat: 2.13/units/{0}/1
|
||||||
|
targets:
|
||||||
|
- test: 2.7
|
||||||
|
- test: 3.8
|
||||||
|
|
||||||
## Remote
|
## Remote
|
||||||
- stage: Remote_devel_extra_vms
|
- stage: Remote_devel_extra_vms
|
||||||
@@ -171,10 +171,10 @@ stages:
|
|||||||
parameters:
|
parameters:
|
||||||
testFormat: devel/{0}
|
testFormat: devel/{0}
|
||||||
targets:
|
targets:
|
||||||
- name: Alpine 3.18
|
- name: Alpine 3.17
|
||||||
test: alpine/3.18
|
test: alpine/3.17
|
||||||
# - name: Fedora 39
|
# - name: Fedora 37
|
||||||
# test: fedora/39
|
# test: fedora/37
|
||||||
- name: Ubuntu 22.04
|
- name: Ubuntu 22.04
|
||||||
test: ubuntu/22.04
|
test: ubuntu/22.04
|
||||||
groups:
|
groups:
|
||||||
@@ -189,30 +189,12 @@ stages:
|
|||||||
targets:
|
targets:
|
||||||
- name: macOS 13.2
|
- name: macOS 13.2
|
||||||
test: macos/13.2
|
test: macos/13.2
|
||||||
- name: RHEL 9.3
|
- name: RHEL 9.1
|
||||||
test: rhel/9.3
|
test: rhel/9.1
|
||||||
- name: FreeBSD 13.2
|
- name: FreeBSD 13.2
|
||||||
test: freebsd/13.2
|
test: freebsd/13.2
|
||||||
groups:
|
- name: FreeBSD 12.4
|
||||||
- 1
|
test: freebsd/12.4
|
||||||
- 2
|
|
||||||
- 3
|
|
||||||
- stage: Remote_2_16
|
|
||||||
displayName: Remote 2.16
|
|
||||||
dependsOn: []
|
|
||||||
jobs:
|
|
||||||
- template: templates/matrix.yml
|
|
||||||
parameters:
|
|
||||||
testFormat: 2.16/{0}
|
|
||||||
targets:
|
|
||||||
#- name: macOS 13.2
|
|
||||||
# test: macos/13.2
|
|
||||||
- name: RHEL 9.2
|
|
||||||
test: rhel/9.2
|
|
||||||
- name: RHEL 8.8
|
|
||||||
test: rhel/8.8
|
|
||||||
#- name: FreeBSD 13.2
|
|
||||||
# test: freebsd/13.2
|
|
||||||
groups:
|
groups:
|
||||||
- 1
|
- 1
|
||||||
- 2
|
- 2
|
||||||
@@ -225,16 +207,10 @@ stages:
|
|||||||
parameters:
|
parameters:
|
||||||
testFormat: 2.15/{0}
|
testFormat: 2.15/{0}
|
||||||
targets:
|
targets:
|
||||||
- name: RHEL 9.1
|
|
||||||
test: rhel/9.1
|
|
||||||
- name: RHEL 8.7
|
|
||||||
test: rhel/8.7
|
|
||||||
- name: RHEL 7.9
|
- name: RHEL 7.9
|
||||||
test: rhel/7.9
|
test: rhel/7.9
|
||||||
- name: FreeBSD 13.1
|
- name: FreeBSD 13.1
|
||||||
test: freebsd/13.1
|
test: freebsd/13.1
|
||||||
- name: FreeBSD 12.4
|
|
||||||
test: freebsd/12.4
|
|
||||||
groups:
|
groups:
|
||||||
- 1
|
- 1
|
||||||
- 2
|
- 2
|
||||||
@@ -249,10 +225,26 @@ stages:
|
|||||||
targets:
|
targets:
|
||||||
- name: RHEL 9.0
|
- name: RHEL 9.0
|
||||||
test: rhel/9.0
|
test: rhel/9.0
|
||||||
#- name: macOS 12.0
|
- name: FreeBSD 12.3
|
||||||
# test: macos/12.0
|
test: freebsd/12.3
|
||||||
#- name: FreeBSD 12.4
|
groups:
|
||||||
# test: freebsd/12.4
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- stage: Remote_2_13
|
||||||
|
displayName: Remote 2.13
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- template: templates/matrix.yml
|
||||||
|
parameters:
|
||||||
|
testFormat: 2.13/{0}
|
||||||
|
targets:
|
||||||
|
- name: macOS 12.0
|
||||||
|
test: macos/12.0
|
||||||
|
- name: RHEL 8.5
|
||||||
|
test: rhel/8.5
|
||||||
|
- name: FreeBSD 13.0
|
||||||
|
test: freebsd/13.0
|
||||||
groups:
|
groups:
|
||||||
- 1
|
- 1
|
||||||
- 2
|
- 2
|
||||||
@@ -267,8 +259,10 @@ stages:
|
|||||||
parameters:
|
parameters:
|
||||||
testFormat: devel/linux/{0}
|
testFormat: devel/linux/{0}
|
||||||
targets:
|
targets:
|
||||||
- name: Fedora 39
|
- name: Fedora 37
|
||||||
test: fedora39
|
test: fedora37
|
||||||
|
- name: openSUSE 15
|
||||||
|
test: opensuse15
|
||||||
- name: Ubuntu 20.04
|
- name: Ubuntu 20.04
|
||||||
test: ubuntu2004
|
test: ubuntu2004
|
||||||
- name: Ubuntu 22.04
|
- name: Ubuntu 22.04
|
||||||
@@ -279,22 +273,6 @@ stages:
|
|||||||
- 1
|
- 1
|
||||||
- 2
|
- 2
|
||||||
- 3
|
- 3
|
||||||
- stage: Docker_2_16
|
|
||||||
displayName: Docker 2.16
|
|
||||||
dependsOn: []
|
|
||||||
jobs:
|
|
||||||
- template: templates/matrix.yml
|
|
||||||
parameters:
|
|
||||||
testFormat: 2.16/linux/{0}
|
|
||||||
targets:
|
|
||||||
- name: Fedora 38
|
|
||||||
test: fedora38
|
|
||||||
- name: openSUSE 15
|
|
||||||
test: opensuse15
|
|
||||||
groups:
|
|
||||||
- 1
|
|
||||||
- 2
|
|
||||||
- 3
|
|
||||||
- stage: Docker_2_15
|
- stage: Docker_2_15
|
||||||
displayName: Docker 2.15
|
displayName: Docker 2.15
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
@@ -303,8 +281,6 @@ stages:
|
|||||||
parameters:
|
parameters:
|
||||||
testFormat: 2.15/linux/{0}
|
testFormat: 2.15/linux/{0}
|
||||||
targets:
|
targets:
|
||||||
- name: Fedora 37
|
|
||||||
test: fedora37
|
|
||||||
- name: CentOS 7
|
- name: CentOS 7
|
||||||
test: centos7
|
test: centos7
|
||||||
groups:
|
groups:
|
||||||
@@ -319,6 +295,24 @@ stages:
|
|||||||
parameters:
|
parameters:
|
||||||
testFormat: 2.14/linux/{0}
|
testFormat: 2.14/linux/{0}
|
||||||
targets:
|
targets:
|
||||||
|
- name: Fedora 36
|
||||||
|
test: fedora36
|
||||||
|
groups:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- stage: Docker_2_13
|
||||||
|
displayName: Docker 2.13
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- template: templates/matrix.yml
|
||||||
|
parameters:
|
||||||
|
testFormat: 2.13/linux/{0}
|
||||||
|
targets:
|
||||||
|
- name: Fedora 35
|
||||||
|
test: fedora35
|
||||||
|
- name: openSUSE 15 py2
|
||||||
|
test: opensuse15py2
|
||||||
- name: Alpine 3
|
- name: Alpine 3
|
||||||
test: alpine3
|
test: alpine3
|
||||||
groups:
|
groups:
|
||||||
@@ -337,10 +331,10 @@ stages:
|
|||||||
targets:
|
targets:
|
||||||
- name: Debian Bullseye
|
- name: Debian Bullseye
|
||||||
test: debian-bullseye/3.9
|
test: debian-bullseye/3.9
|
||||||
- name: Debian Bookworm
|
|
||||||
test: debian-bookworm/3.11
|
|
||||||
- name: ArchLinux
|
- name: ArchLinux
|
||||||
test: archlinux/3.11
|
test: archlinux/3.11
|
||||||
|
- name: CentOS Stream 8
|
||||||
|
test: centos-stream8/3.9
|
||||||
groups:
|
groups:
|
||||||
- 1
|
- 1
|
||||||
- 2
|
- 2
|
||||||
@@ -356,19 +350,7 @@ stages:
|
|||||||
nameFormat: Python {0}
|
nameFormat: Python {0}
|
||||||
testFormat: devel/generic/{0}/1
|
testFormat: devel/generic/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- test: '3.7'
|
- test: 2.7
|
||||||
- test: '3.12'
|
|
||||||
- stage: Generic_2_16
|
|
||||||
displayName: Generic 2.16
|
|
||||||
dependsOn: []
|
|
||||||
jobs:
|
|
||||||
- template: templates/matrix.yml
|
|
||||||
parameters:
|
|
||||||
nameFormat: Python {0}
|
|
||||||
testFormat: 2.16/generic/{0}/1
|
|
||||||
targets:
|
|
||||||
- test: '2.7'
|
|
||||||
- test: '3.6'
|
|
||||||
- test: '3.11'
|
- test: '3.11'
|
||||||
- stage: Generic_2_15
|
- stage: Generic_2_15
|
||||||
displayName: Generic 2.15
|
displayName: Generic 2.15
|
||||||
@@ -379,7 +361,7 @@ stages:
|
|||||||
nameFormat: Python {0}
|
nameFormat: Python {0}
|
||||||
testFormat: 2.15/generic/{0}/1
|
testFormat: 2.15/generic/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- test: '3.9'
|
- test: 3.9
|
||||||
- stage: Generic_2_14
|
- stage: Generic_2_14
|
||||||
displayName: Generic 2.14
|
displayName: Generic 2.14
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
@@ -390,32 +372,42 @@ stages:
|
|||||||
testFormat: 2.14/generic/{0}/1
|
testFormat: 2.14/generic/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- test: '3.10'
|
- test: '3.10'
|
||||||
|
- stage: Generic_2_13
|
||||||
|
displayName: Generic 2.13
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- template: templates/matrix.yml
|
||||||
|
parameters:
|
||||||
|
nameFormat: Python {0}
|
||||||
|
testFormat: 2.13/generic/{0}/1
|
||||||
|
targets:
|
||||||
|
- test: 3.9
|
||||||
|
|
||||||
- stage: Summary
|
- stage: Summary
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- Sanity_devel
|
- Sanity_devel
|
||||||
- Sanity_2_16
|
- Sanity_2_13
|
||||||
- Sanity_2_15
|
|
||||||
- Sanity_2_14
|
- Sanity_2_14
|
||||||
|
- Sanity_2_15
|
||||||
- Units_devel
|
- Units_devel
|
||||||
- Units_2_16
|
- Units_2_13
|
||||||
- Units_2_15
|
|
||||||
- Units_2_14
|
- Units_2_14
|
||||||
|
- Units_2_15
|
||||||
- Remote_devel_extra_vms
|
- Remote_devel_extra_vms
|
||||||
- Remote_devel
|
- Remote_devel
|
||||||
- Remote_2_16
|
- Remote_2_13
|
||||||
- Remote_2_15
|
|
||||||
- Remote_2_14
|
- Remote_2_14
|
||||||
|
- Remote_2_15
|
||||||
- Docker_devel
|
- Docker_devel
|
||||||
- Docker_2_16
|
- Docker_2_13
|
||||||
- Docker_2_15
|
|
||||||
- Docker_2_14
|
- Docker_2_14
|
||||||
|
- Docker_2_15
|
||||||
- Docker_community_devel
|
- Docker_community_devel
|
||||||
# Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled.
|
# Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled.
|
||||||
# - Generic_devel
|
# - Generic_devel
|
||||||
# - Generic_2_16
|
# - Generic_2_13
|
||||||
# - Generic_2_15
|
|
||||||
# - Generic_2_14
|
# - Generic_2_14
|
||||||
|
# - Generic_2_15
|
||||||
jobs:
|
jobs:
|
||||||
- template: templates/coverage.yml
|
- template: templates/coverage.yml
|
||||||
|
|||||||
71
.github/BOTMETA.yml
vendored
71
.github/BOTMETA.yml
vendored
@@ -204,8 +204,6 @@ files:
|
|||||||
maintainers: ddelnano shinuza
|
maintainers: ddelnano shinuza
|
||||||
$lookups/:
|
$lookups/:
|
||||||
labels: lookups
|
labels: lookups
|
||||||
$lookups/bitwarden_secrets_manager.py:
|
|
||||||
maintainers: jantari
|
|
||||||
$lookups/bitwarden.py:
|
$lookups/bitwarden.py:
|
||||||
maintainers: lungj
|
maintainers: lungj
|
||||||
$lookups/cartesian.py: {}
|
$lookups/cartesian.py: {}
|
||||||
@@ -249,11 +247,9 @@ files:
|
|||||||
labels: onepassword
|
labels: onepassword
|
||||||
maintainers: samdoran
|
maintainers: samdoran
|
||||||
$lookups/onepassword.py:
|
$lookups/onepassword.py:
|
||||||
ignore: scottsb
|
maintainers: azenk scottsb
|
||||||
maintainers: azenk
|
|
||||||
$lookups/onepassword_raw.py:
|
$lookups/onepassword_raw.py:
|
||||||
ignore: scottsb
|
maintainers: azenk scottsb
|
||||||
maintainers: azenk
|
|
||||||
$lookups/passwordstore.py: {}
|
$lookups/passwordstore.py: {}
|
||||||
$lookups/random_pet.py:
|
$lookups/random_pet.py:
|
||||||
maintainers: Akasurde
|
maintainers: Akasurde
|
||||||
@@ -278,8 +274,6 @@ files:
|
|||||||
$module_utils/gconftool2.py:
|
$module_utils/gconftool2.py:
|
||||||
labels: gconftool2
|
labels: gconftool2
|
||||||
maintainers: russoz
|
maintainers: russoz
|
||||||
$module_utils/gio_mime.py:
|
|
||||||
maintainers: russoz
|
|
||||||
$module_utils/gitlab.py:
|
$module_utils/gitlab.py:
|
||||||
keywords: gitlab source_control
|
keywords: gitlab source_control
|
||||||
labels: gitlab
|
labels: gitlab
|
||||||
@@ -332,9 +326,6 @@ files:
|
|||||||
$module_utils/scaleway.py:
|
$module_utils/scaleway.py:
|
||||||
labels: cloud scaleway
|
labels: cloud scaleway
|
||||||
maintainers: $team_scaleway
|
maintainers: $team_scaleway
|
||||||
$module_utils/snap.py:
|
|
||||||
labels: snap
|
|
||||||
maintainers: russoz
|
|
||||||
$module_utils/ssh.py:
|
$module_utils/ssh.py:
|
||||||
maintainers: russoz
|
maintainers: russoz
|
||||||
$module_utils/storage/hpe3par/hpe3par.py:
|
$module_utils/storage/hpe3par/hpe3par.py:
|
||||||
@@ -342,9 +333,6 @@ files:
|
|||||||
$module_utils/utm_utils.py:
|
$module_utils/utm_utils.py:
|
||||||
labels: utm_utils
|
labels: utm_utils
|
||||||
maintainers: $team_e_spirit
|
maintainers: $team_e_spirit
|
||||||
$module_utils/vardict.py:
|
|
||||||
labels: vardict
|
|
||||||
maintainers: russoz
|
|
||||||
$module_utils/wdc_redfish_utils.py:
|
$module_utils/wdc_redfish_utils.py:
|
||||||
labels: wdc_redfish_utils
|
labels: wdc_redfish_utils
|
||||||
maintainers: $team_wdc
|
maintainers: $team_wdc
|
||||||
@@ -440,7 +428,7 @@ files:
|
|||||||
ignore: resmo
|
ignore: resmo
|
||||||
maintainers: dmtrs
|
maintainers: dmtrs
|
||||||
$modules/consul:
|
$modules/consul:
|
||||||
ignore: colin-nolan Hakon
|
ignore: colin-nolan
|
||||||
maintainers: $team_consul
|
maintainers: $team_consul
|
||||||
$modules/copr.py:
|
$modules/copr.py:
|
||||||
maintainers: schlupov
|
maintainers: schlupov
|
||||||
@@ -519,8 +507,6 @@ files:
|
|||||||
$modules/gem.py:
|
$modules/gem.py:
|
||||||
labels: gem
|
labels: gem
|
||||||
maintainers: $team_ansible_core johanwiren
|
maintainers: $team_ansible_core johanwiren
|
||||||
$modules/gio_mime.py:
|
|
||||||
maintainers: russoz
|
|
||||||
$modules/git_config.py:
|
$modules/git_config.py:
|
||||||
maintainers: djmattyg007 mgedmin
|
maintainers: djmattyg007 mgedmin
|
||||||
$modules/github_:
|
$modules/github_:
|
||||||
@@ -541,15 +527,10 @@ files:
|
|||||||
keywords: gitlab source_control
|
keywords: gitlab source_control
|
||||||
maintainers: $team_gitlab
|
maintainers: $team_gitlab
|
||||||
notify: jlozadad
|
notify: jlozadad
|
||||||
ignore: dj-wasabi
|
|
||||||
$modules/gitlab_branch.py:
|
$modules/gitlab_branch.py:
|
||||||
maintainers: paytroff
|
maintainers: paytroff
|
||||||
$modules/gitlab_merge_request.py:
|
|
||||||
maintainers: zvaraondrej
|
|
||||||
$modules/gitlab_project_variable.py:
|
$modules/gitlab_project_variable.py:
|
||||||
maintainers: markuman
|
maintainers: markuman
|
||||||
$modules/gitlab_instance_variable.py:
|
|
||||||
maintainers: benibr
|
|
||||||
$modules/gitlab_runner.py:
|
$modules/gitlab_runner.py:
|
||||||
maintainers: SamyCoenen
|
maintainers: SamyCoenen
|
||||||
$modules/gitlab_user.py:
|
$modules/gitlab_user.py:
|
||||||
@@ -558,6 +539,8 @@ files:
|
|||||||
maintainers: zimbatm
|
maintainers: zimbatm
|
||||||
$modules/gunicorn.py:
|
$modules/gunicorn.py:
|
||||||
maintainers: agmezr
|
maintainers: agmezr
|
||||||
|
$modules/hana_query.py:
|
||||||
|
maintainers: rainerleber
|
||||||
$modules/haproxy.py:
|
$modules/haproxy.py:
|
||||||
maintainers: ravibhure Normo
|
maintainers: ravibhure Normo
|
||||||
$modules/heroku_collaborator.py:
|
$modules/heroku_collaborator.py:
|
||||||
@@ -642,8 +625,6 @@ files:
|
|||||||
maintainers: bregman-arie
|
maintainers: bregman-arie
|
||||||
$modules/ipa_:
|
$modules/ipa_:
|
||||||
maintainers: $team_ipa
|
maintainers: $team_ipa
|
||||||
$modules/ipbase_info.py:
|
|
||||||
maintainers: dominikkukacka
|
|
||||||
$modules/ipa_pwpolicy.py:
|
$modules/ipa_pwpolicy.py:
|
||||||
maintainers: adralioh
|
maintainers: adralioh
|
||||||
$modules/ipa_service.py:
|
$modules/ipa_service.py:
|
||||||
@@ -678,9 +659,7 @@ files:
|
|||||||
labels: jboss
|
labels: jboss
|
||||||
maintainers: $team_jboss jhoekx
|
maintainers: $team_jboss jhoekx
|
||||||
$modules/jenkins_build.py:
|
$modules/jenkins_build.py:
|
||||||
maintainers: brettmilford unnecessary-username juanmcasanova
|
maintainers: brettmilford unnecessary-username
|
||||||
$modules/jenkins_build_info.py:
|
|
||||||
maintainers: juanmcasanova
|
|
||||||
$modules/jenkins_job.py:
|
$modules/jenkins_job.py:
|
||||||
maintainers: sermilrod
|
maintainers: sermilrod
|
||||||
$modules/jenkins_job_info.py:
|
$modules/jenkins_job_info.py:
|
||||||
@@ -690,9 +669,9 @@ files:
|
|||||||
$modules/jenkins_script.py:
|
$modules/jenkins_script.py:
|
||||||
maintainers: hogarthj
|
maintainers: hogarthj
|
||||||
$modules/jira.py:
|
$modules/jira.py:
|
||||||
ignore: DWSR tarka
|
ignore: DWSR
|
||||||
labels: jira
|
labels: jira
|
||||||
maintainers: Slezhuk pertoft
|
maintainers: Slezhuk tarka pertoft
|
||||||
$modules/kdeconfig.py:
|
$modules/kdeconfig.py:
|
||||||
maintainers: smeso
|
maintainers: smeso
|
||||||
$modules/kernel_blacklist.py:
|
$modules/kernel_blacklist.py:
|
||||||
@@ -701,16 +680,8 @@ files:
|
|||||||
maintainers: $team_keycloak
|
maintainers: $team_keycloak
|
||||||
$modules/keycloak_authentication.py:
|
$modules/keycloak_authentication.py:
|
||||||
maintainers: elfelip Gaetan2907
|
maintainers: elfelip Gaetan2907
|
||||||
$modules/keycloak_authentication_required_actions.py:
|
|
||||||
maintainers: Skrekulko
|
|
||||||
$modules/keycloak_authz_authorization_scope.py:
|
$modules/keycloak_authz_authorization_scope.py:
|
||||||
maintainers: mattock
|
maintainers: mattock
|
||||||
$modules/keycloak_authz_permission.py:
|
|
||||||
maintainers: mattock
|
|
||||||
$modules/keycloak_authz_custom_policy.py:
|
|
||||||
maintainers: mattock
|
|
||||||
$modules/keycloak_authz_permission_info.py:
|
|
||||||
maintainers: mattock
|
|
||||||
$modules/keycloak_client_rolemapping.py:
|
$modules/keycloak_client_rolemapping.py:
|
||||||
maintainers: Gaetan2907
|
maintainers: Gaetan2907
|
||||||
$modules/keycloak_clientscope.py:
|
$modules/keycloak_clientscope.py:
|
||||||
@@ -729,12 +700,8 @@ files:
|
|||||||
maintainers: kris2kris
|
maintainers: kris2kris
|
||||||
$modules/keycloak_realm_info.py:
|
$modules/keycloak_realm_info.py:
|
||||||
maintainers: fynncfchen
|
maintainers: fynncfchen
|
||||||
$modules/keycloak_realm_key.py:
|
|
||||||
maintainers: mattock
|
|
||||||
$modules/keycloak_role.py:
|
$modules/keycloak_role.py:
|
||||||
maintainers: laurpaum
|
maintainers: laurpaum
|
||||||
$modules/keycloak_user.py:
|
|
||||||
maintainers: elfelip
|
|
||||||
$modules/keycloak_user_federation.py:
|
$modules/keycloak_user_federation.py:
|
||||||
maintainers: laurpaum
|
maintainers: laurpaum
|
||||||
$modules/keycloak_user_rolemapping.py:
|
$modules/keycloak_user_rolemapping.py:
|
||||||
@@ -781,8 +748,6 @@ files:
|
|||||||
maintainers: nerzhul
|
maintainers: nerzhul
|
||||||
$modules/lvg.py:
|
$modules/lvg.py:
|
||||||
maintainers: abulimov
|
maintainers: abulimov
|
||||||
$modules/lvg_rename.py:
|
|
||||||
maintainers: lszomor
|
|
||||||
$modules/lvol.py:
|
$modules/lvol.py:
|
||||||
maintainers: abulimov jhoekx zigaSRC unkaputtbar112
|
maintainers: abulimov jhoekx zigaSRC unkaputtbar112
|
||||||
$modules/lxc_container.py:
|
$modules/lxc_container.py:
|
||||||
@@ -952,7 +917,7 @@ files:
|
|||||||
labels: pagerduty
|
labels: pagerduty
|
||||||
maintainers: suprememoocow thaumos
|
maintainers: suprememoocow thaumos
|
||||||
$modules/pagerduty_alert.py:
|
$modules/pagerduty_alert.py:
|
||||||
maintainers: ApsOps xshen1
|
maintainers: ApsOps
|
||||||
$modules/pagerduty_change.py:
|
$modules/pagerduty_change.py:
|
||||||
maintainers: adamvaughan
|
maintainers: adamvaughan
|
||||||
$modules/pagerduty_user.py:
|
$modules/pagerduty_user.py:
|
||||||
@@ -995,9 +960,6 @@ files:
|
|||||||
maintainers: $team_solaris dermute
|
maintainers: $team_solaris dermute
|
||||||
$modules/pmem.py:
|
$modules/pmem.py:
|
||||||
maintainers: mizumm
|
maintainers: mizumm
|
||||||
$modules/pnpm.py:
|
|
||||||
ignore: chrishoffman
|
|
||||||
maintainers: aretrosen
|
|
||||||
$modules/portage.py:
|
$modules/portage.py:
|
||||||
ignore: sayap
|
ignore: sayap
|
||||||
labels: portage
|
labels: portage
|
||||||
@@ -1014,8 +976,7 @@ files:
|
|||||||
$modules/proxmox:
|
$modules/proxmox:
|
||||||
keywords: kvm libvirt proxmox qemu
|
keywords: kvm libvirt proxmox qemu
|
||||||
labels: proxmox virt
|
labels: proxmox virt
|
||||||
maintainers: $team_virt UnderGreen
|
maintainers: $team_virt
|
||||||
ignore: tleguern
|
|
||||||
$modules/proxmox.py:
|
$modules/proxmox.py:
|
||||||
ignore: skvidal
|
ignore: skvidal
|
||||||
maintainers: UnderGreen
|
maintainers: UnderGreen
|
||||||
@@ -1139,6 +1100,10 @@ files:
|
|||||||
maintainers: nerzhul
|
maintainers: nerzhul
|
||||||
$modules/runit.py:
|
$modules/runit.py:
|
||||||
maintainers: jsumners
|
maintainers: jsumners
|
||||||
|
$modules/sap_task_list_execute:
|
||||||
|
maintainers: rainerleber
|
||||||
|
$modules/sapcar_extract.py:
|
||||||
|
maintainers: RainerLeber
|
||||||
$modules/say.py:
|
$modules/say.py:
|
||||||
maintainers: $team_ansible_core
|
maintainers: $team_ansible_core
|
||||||
ignore: mpdehaan
|
ignore: mpdehaan
|
||||||
@@ -1213,8 +1178,6 @@ files:
|
|||||||
ignore: ryansb
|
ignore: ryansb
|
||||||
$modules/shutdown.py:
|
$modules/shutdown.py:
|
||||||
maintainers: nitzmahone samdoran aminvakil
|
maintainers: nitzmahone samdoran aminvakil
|
||||||
$modules/simpleinit_msb.py:
|
|
||||||
maintainers: vaygr
|
|
||||||
$modules/sl_vm.py:
|
$modules/sl_vm.py:
|
||||||
maintainers: mcltn
|
maintainers: mcltn
|
||||||
$modules/slack.py:
|
$modules/slack.py:
|
||||||
@@ -1227,7 +1190,7 @@ files:
|
|||||||
maintainers: $team_solaris
|
maintainers: $team_solaris
|
||||||
$modules/snap.py:
|
$modules/snap.py:
|
||||||
labels: snap
|
labels: snap
|
||||||
maintainers: angristan vcarceler russoz
|
maintainers: angristan vcarceler
|
||||||
$modules/snap_alias.py:
|
$modules/snap_alias.py:
|
||||||
labels: snap
|
labels: snap
|
||||||
maintainers: russoz
|
maintainers: russoz
|
||||||
@@ -1430,7 +1393,7 @@ macros:
|
|||||||
team_cyberark_conjur: jvanderhoof ryanprior
|
team_cyberark_conjur: jvanderhoof ryanprior
|
||||||
team_e_spirit: MatrixCrawler getjack
|
team_e_spirit: MatrixCrawler getjack
|
||||||
team_flatpak: JayKayy oolongbrothers
|
team_flatpak: JayKayy oolongbrothers
|
||||||
team_gitlab: Lunik Shaps marwatk waheedi zanssa scodeman metanovii sh0shin nejch lgatellier suukit
|
team_gitlab: Lunik Shaps dj-wasabi marwatk waheedi zanssa scodeman metanovii sh0shin nejch lgatellier suukit
|
||||||
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 justchris1
|
team_ipa: Akasurde Nosmoht fxfitz justchris1
|
||||||
@@ -1449,5 +1412,5 @@ macros:
|
|||||||
team_scaleway: remyleone abarbare
|
team_scaleway: remyleone abarbare
|
||||||
team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l
|
team_solaris: bcoca fishman jasperla jpdasma mator scathatheworm troy2914 xen0l
|
||||||
team_suse: commel evrardjp lrupp toabctl AnderEnder alxgu andytom sealor
|
team_suse: commel evrardjp lrupp toabctl AnderEnder alxgu andytom sealor
|
||||||
team_virt: joshainglis karmab Thulium-Drake Ajpantuso
|
team_virt: joshainglis karmab tleguern Thulium-Drake Ajpantuso
|
||||||
team_wdc: mikemoerk
|
team_wdc: mikemoerk
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -47,7 +47,7 @@ body:
|
|||||||
label: Component Name
|
label: Component Name
|
||||||
description: >-
|
description: >-
|
||||||
Write the short name of the module, plugin, task or feature below,
|
Write the short name of the module, plugin, task or feature below,
|
||||||
*use your best guess if unsure*. Do not include `community.general.`!
|
*use your best guess if unsure*.
|
||||||
placeholder: dnf, apt, yum, pip, user etc.
|
placeholder: dnf, apt, yum, pip, user etc.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: Component Name
|
label: Component Name
|
||||||
description: >-
|
description: >-
|
||||||
Write the short name of the file, module, plugin, task or feature below,
|
Write the short name of the rst file, module, plugin, task or
|
||||||
*use your best guess if unsure*. Do not include `community.general.`!
|
feature below, *use your best guess if unsure*.
|
||||||
placeholder: mysql_user
|
placeholder: mysql_user
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
4
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
4
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -42,8 +42,8 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: Component Name
|
label: Component Name
|
||||||
description: >-
|
description: >-
|
||||||
Write the short name of the module or plugin, or which other part(s) of the collection this feature affects.
|
Write the short name of the module, plugin, task or feature below,
|
||||||
*use your best guess if unsure*. Do not include `community.general.`!
|
*use your best guess if unsure*.
|
||||||
placeholder: dnf, apt, yum, pip, user etc.
|
placeholder: dnf, apt, yum, pip, user etc.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
32
.github/pull_request_template.md
vendored
32
.github/pull_request_template.md
vendored
@@ -1,32 +0,0 @@
|
|||||||
##### SUMMARY
|
|
||||||
<!--- Describe the change below, including rationale and design decisions -->
|
|
||||||
|
|
||||||
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
|
|
||||||
|
|
||||||
<!--- Please do not forget to include a changelog fragment:
|
|
||||||
https://docs.ansible.com/ansible/devel/community/collection_development_process.html#creating-changelog-fragments
|
|
||||||
No need to include one for docs-only or test-only PR, and for new plugin/module PRs.
|
|
||||||
Read about more details in CONTRIBUTING.md.
|
|
||||||
-->
|
|
||||||
|
|
||||||
##### ISSUE TYPE
|
|
||||||
<!--- Pick one or more below and delete the rest.
|
|
||||||
'Test Pull Request' is for PRs that add/extend tests without code changes. -->
|
|
||||||
- Bugfix Pull Request
|
|
||||||
- Docs Pull Request
|
|
||||||
- Feature Pull Request
|
|
||||||
- New Module/Plugin Pull Request
|
|
||||||
- Refactoring Pull Request
|
|
||||||
- Test Pull Request
|
|
||||||
|
|
||||||
##### COMPONENT NAME
|
|
||||||
<!--- Write the SHORT NAME of the module, plugin, task or feature below. -->
|
|
||||||
|
|
||||||
##### ADDITIONAL INFORMATION
|
|
||||||
<!--- Include additional information to help people understand the change here -->
|
|
||||||
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
|
|
||||||
|
|
||||||
<!--- Paste verbatim command output below, e.g. before and after your change -->
|
|
||||||
```paste below
|
|
||||||
|
|
||||||
```
|
|
||||||
3
.github/pull_request_template.md.license
vendored
3
.github/pull_request_template.md.license
vendored
@@ -1,3 +0,0 @@
|
|||||||
Copyright (c) Ansible Project
|
|
||||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
47
.github/workflows/ansible-test.yml
vendored
47
.github/workflows/ansible-test.yml
vendored
@@ -31,7 +31,6 @@ jobs:
|
|||||||
ansible:
|
ansible:
|
||||||
- '2.11'
|
- '2.11'
|
||||||
- '2.12'
|
- '2.12'
|
||||||
- '2.13'
|
|
||||||
# Ansible-test on various stable branches does not yet work well with cgroups v2.
|
# Ansible-test on various stable branches does not yet work well with cgroups v2.
|
||||||
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
|
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
|
||||||
# image for these stable branches. The list of branches where this is necessary will
|
# image for these stable branches. The list of branches where this is necessary will
|
||||||
@@ -81,10 +80,6 @@ jobs:
|
|||||||
python: '2.6'
|
python: '2.6'
|
||||||
- ansible: '2.12'
|
- ansible: '2.12'
|
||||||
python: '3.8'
|
python: '3.8'
|
||||||
- ansible: '2.13'
|
|
||||||
python: '2.7'
|
|
||||||
- ansible: '2.13'
|
|
||||||
python: '3.8'
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: >-
|
- name: >-
|
||||||
@@ -216,48 +211,6 @@ jobs:
|
|||||||
# docker: default
|
# docker: default
|
||||||
# python: '3.8'
|
# python: '3.8'
|
||||||
# target: azp/generic/1/
|
# target: azp/generic/1/
|
||||||
# 2.13
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: fedora35
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/1/
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: fedora35
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/2/
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: fedora35
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/3/
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: opensuse15py2
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/1/
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: opensuse15py2
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/2/
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: opensuse15py2
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/3/
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: alpine3
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/1/
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: alpine3
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/2/
|
|
||||||
- ansible: '2.13'
|
|
||||||
docker: alpine3
|
|
||||||
python: ''
|
|
||||||
target: azp/posix/3/
|
|
||||||
# Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled.
|
|
||||||
# - ansible: '2.13'
|
|
||||||
# docker: default
|
|
||||||
# python: '3.9'
|
|
||||||
# target: azp/generic/1/
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: >-
|
- name: >-
|
||||||
|
|||||||
33
.github/workflows/codeql-analysis.yml
vendored
33
.github/workflows/codeql-analysis.yml
vendored
@@ -8,7 +8,6 @@ name: "Code scanning - action"
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '26 19 * * 1'
|
- cron: '26 19 * * 1'
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -24,13 +23,39 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
# We must fetch at least the immediate parents so that if this is
|
||||||
|
# a pull request then we can checkout the head.
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
# If this run was triggered by a pull request event, then checkout
|
||||||
|
# the head of the pull request instead of the merge commit.
|
||||||
|
- run: git checkout HEAD^2
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
languages: python
|
# with:
|
||||||
|
# languages: go, javascript, csharp, python, cpp, java
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
|
# and modify them (or add more) to build your code if your project
|
||||||
|
# uses a compiled language
|
||||||
|
|
||||||
|
#- run: |
|
||||||
|
# make bootstrap
|
||||||
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|||||||
2
.github/workflows/reuse.yml
vendored
2
.github/workflows/reuse.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || '' }}
|
ref: ${{ github.event.pull_request.head.sha || '' }}
|
||||||
|
|
||||||
|
|||||||
23
.pre-commit-config.yaml
Normal file
23
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
# Copyright (c) Ansible Project
|
||||||
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.0.1
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: mixed-line-ending
|
||||||
|
args: [--fix=lf]
|
||||||
|
- id: fix-encoding-pragma
|
||||||
|
- id: check-ast
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-symlinks
|
||||||
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
||||||
|
rev: v1.9.0
|
||||||
|
hooks:
|
||||||
|
- id: rst-backticks
|
||||||
|
types: [file]
|
||||||
|
files: changelogs/fragments/.*\.(yml|yaml)$
|
||||||
1265
CHANGELOG.rst
1265
CHANGELOG.rst
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@ Also, consider taking up a valuable, reviewed, but abandoned pull request which
|
|||||||
* Try committing your changes with an informative but short commit message.
|
* 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 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 repository checkout.
|
* 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 repository checkout.
|
||||||
* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#creating-changelog-fragments). (You must not include a fragment for new modules or new 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 :) )
|
* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#creating-changelog-fragments). (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 :) )
|
||||||
* Avoid reformatting unrelated parts of the codebase in your PR. These types of changes will likely be requested for reversion, create additional work for reviewers, and may cause approval to be delayed.
|
* Avoid reformatting unrelated parts of the codebase in your PR. These types of changes will likely be requested for reversion, create additional work for reviewers, and may cause approval to be delayed.
|
||||||
|
|
||||||
You can also read [our Quick-start development guide](https://github.com/ansible/community-docs/blob/main/create_pr_quick_start_guide.rst).
|
You can also read [our Quick-start development guide](https://github.com/ansible/community-docs/blob/main/create_pr_quick_start_guide.rst).
|
||||||
@@ -121,3 +121,19 @@ Creating new modules and plugins requires a bit more work than other Pull Reques
|
|||||||
listed as `maintainers` will be pinged for new issues and PRs that modify the module/plugin or its tests.
|
listed as `maintainers` will be pinged for new issues and PRs that modify the module/plugin or its tests.
|
||||||
|
|
||||||
When you add a new plugin/module, we expect that you perform maintainer duty for at least some time after contributing it.
|
When you add a new plugin/module, we expect that you perform maintainer duty for at least some time after contributing it.
|
||||||
|
|
||||||
|
## pre-commit
|
||||||
|
|
||||||
|
To help ensure high-quality contributions this repository includes a [pre-commit](https://pre-commit.com) configuration which
|
||||||
|
corrects and tests against common issues that would otherwise cause CI to fail. To begin using these pre-commit hooks see
|
||||||
|
the [Installation](#installation) section below.
|
||||||
|
|
||||||
|
This is optional and not required to contribute to this repository.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
Follow the [instructions](https://pre-commit.com/#install) provided with pre-commit and run `pre-commit install` under the repository base. If for any reason you would like to disable the pre-commit hooks run `pre-commit uninstall`.
|
||||||
|
|
||||||
|
This is optional to run it locally.
|
||||||
|
|
||||||
|
You can trigger it locally with `pre-commit run --all-files` or even to run only for a given file `pre-commit run --files YOUR_FILE`.
|
||||||
|
|||||||
24
README.md
24
README.md
@@ -6,7 +6,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
|
|
||||||
# Community General Collection
|
# Community General Collection
|
||||||
|
|
||||||
[](https://dev.azure.com/ansible/community.general/_build?definitionId=31)
|
[](https://dev.azure.com/ansible/community.general/_build?definitionId=31)
|
||||||
[](https://github.com/ansible-collections/community.general/actions)
|
[](https://github.com/ansible-collections/community.general/actions)
|
||||||
[](https://codecov.io/gh/ansible-collections/community.general)
|
[](https://codecov.io/gh/ansible-collections/community.general)
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ If you encounter abusive behavior violating the [Ansible Code of Conduct](https:
|
|||||||
|
|
||||||
## Tested with Ansible
|
## Tested with Ansible
|
||||||
|
|
||||||
Tested with the current ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, ansible-core 2.14, ansible-core 2.15, ansible-core 2.16 releases and the current development version of ansible-core. Ansible-core versions before 2.11.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases.
|
Tested with the current ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, ansible-core 2.14 releases and the current development version of ansible-core. Ansible-core versions before 2.11.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases.
|
||||||
|
|
||||||
Parts of this collection will not work with ansible-core 2.11 on Python 3.12+.
|
Parts of this collection will not work with ansible-core 2.11 on Python 3.12+.
|
||||||
|
|
||||||
@@ -34,13 +34,13 @@ Some modules and plugins require external libraries. Please check the requiremen
|
|||||||
|
|
||||||
## Included content
|
## Included content
|
||||||
|
|
||||||
Please check the included content on the [Ansible Galaxy page for this collection](https://galaxy.ansible.com/ui/repo/published/community/general/) or the [documentation on the Ansible docs site](https://docs.ansible.com/ansible/latest/collections/community/general/).
|
Please check the included content on the [Ansible Galaxy page for this collection](https://galaxy.ansible.com/community/general) or the [documentation on the Ansible docs site](https://docs.ansible.com/ansible/latest/collections/community/general/).
|
||||||
|
|
||||||
## Using this collection
|
## Using this collection
|
||||||
|
|
||||||
This collection is shipped with the Ansible package. So if you have it installed, no more action is required.
|
This collection is shipped with the Ansible package. So if you have it installed, no more action is required.
|
||||||
|
|
||||||
If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole Ansible package, you need to install the collection from [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/community/general/) manually with the `ansible-galaxy` command-line tool:
|
If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole Ansible package, you need to install the collection from [Ansible Galaxy](https://galaxy.ansible.com/community/general) manually with the `ansible-galaxy` command-line tool:
|
||||||
|
|
||||||
ansible-galaxy collection install community.general
|
ansible-galaxy collection install community.general
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ Note that if you install the collection manually, it will not be upgraded automa
|
|||||||
ansible-galaxy collection install community.general --upgrade
|
ansible-galaxy collection install community.general --upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where `X.Y.Z` can be any [available version](https://galaxy.ansible.com/ui/repo/published/community/general/):
|
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where `X.Y.Z` can be any [available version](https://galaxy.ansible.com/community/general):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ansible-galaxy collection install community.general:==X.Y.Z
|
ansible-galaxy collection install community.general:==X.Y.Z
|
||||||
@@ -73,13 +73,13 @@ We are actively accepting new contributors.
|
|||||||
|
|
||||||
All types of contributions are very welcome.
|
All types of contributions are very welcome.
|
||||||
|
|
||||||
You don't know how to start? Refer to our [contribution guide](https://github.com/ansible-collections/community.general/blob/stable-7/CONTRIBUTING.md)!
|
You don't know how to start? Refer to our [contribution guide](https://github.com/ansible-collections/community.general/blob/stable-6/CONTRIBUTING.md)!
|
||||||
|
|
||||||
The current maintainers are listed in the [commit-rights.md](https://github.com/ansible-collections/community.general/blob/stable-7/commit-rights.md#people) file. If you have questions or need help, feel free to mention them in the proposals.
|
The current maintainers are listed in the [commit-rights.md](https://github.com/ansible-collections/community.general/blob/stable-6/commit-rights.md#people) file. If you have questions or need help, feel free to mention them in the proposals.
|
||||||
|
|
||||||
You can find more information in the [developer guide for collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html).
|
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/stable-7/CONTRIBUTING.md).
|
Also for some notes specific to this collection see [our CONTRIBUTING documentation](https://github.com/ansible-collections/community.general/blob/stable-6/CONTRIBUTING.md).
|
||||||
|
|
||||||
### Running tests
|
### Running tests
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collectio
|
|||||||
|
|
||||||
To learn how to maintain / become a maintainer of this collection, refer to:
|
To learn how to maintain / become a maintainer of this collection, refer to:
|
||||||
|
|
||||||
* [Committer guidelines](https://github.com/ansible-collections/community.general/blob/stable-7/commit-rights.md).
|
* [Committer guidelines](https://github.com/ansible-collections/community.general/blob/stable-6/commit-rights.md).
|
||||||
* [Maintainer guidelines](https://github.com/ansible/community-docs/blob/main/maintaining.rst).
|
* [Maintainer guidelines](https://github.com/ansible/community-docs/blob/main/maintaining.rst).
|
||||||
|
|
||||||
It is necessary for maintainers of this collection to be subscribed to:
|
It is necessary for maintainers of this collection to be subscribed to:
|
||||||
@@ -117,7 +117,7 @@ See the [Releasing guidelines](https://github.com/ansible/community-docs/blob/ma
|
|||||||
|
|
||||||
## Release notes
|
## Release notes
|
||||||
|
|
||||||
See the [changelog](https://github.com/ansible-collections/community.general/blob/stable-7/CHANGELOG.rst).
|
See the [changelog](https://github.com/ansible-collections/community.general/blob/stable-6/CHANGELOG.rst).
|
||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
@@ -136,8 +136,8 @@ See [this issue](https://github.com/ansible-collections/community.general/issues
|
|||||||
|
|
||||||
This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later.
|
This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later.
|
||||||
|
|
||||||
See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.general/blob/stable-7/COPYING) for the full text.
|
See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.general/blob/stable-6/COPYING) for the full text.
|
||||||
|
|
||||||
Parts of the collection are licensed under the [BSD 2-Clause license](https://github.com/ansible-collections/community.general/blob/stable-7/LICENSES/BSD-2-Clause.txt), the [MIT license](https://github.com/ansible-collections/community.general/blob/stable-7/LICENSES/MIT.txt), and the [PSF 2.0 license](https://github.com/ansible-collections/community.general/blob/stable-7/LICENSES/PSF-2.0.txt).
|
Parts of the collection are licensed under the [BSD 2-Clause license](https://github.com/ansible-collections/community.general/blob/stable-6/LICENSES/BSD-2-Clause.txt), the [MIT license](https://github.com/ansible-collections/community.general/blob/stable-6/LICENSES/MIT.txt), and the [PSF 2.0 license](https://github.com/ansible-collections/community.general/blob/stable-6/LICENSES/PSF-2.0.txt).
|
||||||
|
|
||||||
All files have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `.reuse/dep5`. This conforms to the [REUSE specification](https://reuse.software/spec/).
|
All files have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `.reuse/dep5`. This conforms to the [REUSE specification](https://reuse.software/spec/).
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
|||||||
Counting elements in a sequence
|
Counting elements in a sequence
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The :ansplugin:`community.general.counter filter plugin <community.general.counter#filter>` allows you to count (hashable) elements in a sequence. Elements are returned as dictionary keys and their counts are stored as dictionary values.
|
The ``community.general.counter`` filter plugin allows you to count (hashable) elements in a sequence. Elements are returned as dictionary keys and their counts are stored as dictionary values.
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Dictionaries
|
Dictionaries
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
You can use the :ansplugin:`community.general.dict_kv filter <community.general.dict_kv#filter>` to create a single-entry dictionary with ``value | community.general.dict_kv(key)``:
|
You can use the ``dict_kv`` filter to create a single-entry dictionary with ``value | community.general.dict_kv(key)``:
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ This produces:
|
|||||||
|
|
||||||
.. versionadded:: 2.0.0
|
.. versionadded:: 2.0.0
|
||||||
|
|
||||||
If you need to convert a list of key-value pairs to a dictionary, you can use the ``dict`` function. Unfortunately, this function cannot be used with ``map``. For this, the :ansplugin:`community.general.dict filter <community.general.dict#filter>` can be used:
|
If you need to convert a list of key-value pairs to a dictionary, you can use the ``dict`` function. Unfortunately, this function cannot be used with ``map``. For this, the ``community.general.dict`` filter can be used:
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Grouping
|
Grouping
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
If you have a list of dictionaries, the Jinja2 ``groupby`` filter allows to group the list by an attribute. This results in a list of ``(grouper, list)`` namedtuples, where ``list`` contains all dictionaries where the selected attribute equals ``grouper``. If you know that for every ``grouper``, there will be a most one entry in that list, you can use the :ansplugin:`community.general.groupby_as_dict filter <community.general.groupby_as_dict#filter>` to convert the original list into a dictionary which maps ``grouper`` to the corresponding dictionary.
|
If you have a list of dictionaries, the Jinja2 ``groupby`` filter allows to group the list by an attribute. This results in a list of ``(grouper, list)`` namedtuples, where ``list`` contains all dictionaries where the selected attribute equals ``grouper``. If you know that for every ``grouper``, there will be a most one entry in that list, you can use the ``community.general.groupby_as_dict`` filter to convert the original list into a dictionary which maps ``grouper`` to the corresponding dictionary.
|
||||||
|
|
||||||
One example is ``ansible_facts.mounts``, which is a list of dictionaries where each has one ``device`` element to indicate the device which is mounted. Therefore, ``ansible_facts.mounts | community.general.groupby_as_dict('device')`` is a dictionary mapping a device to the mount information:
|
One example is ``ansible_facts.mounts``, which is a list of dictionaries where each has one ``device`` element to indicate the device which is mounted. Therefore, ``ansible_facts.mounts | community.general.groupby_as_dict('device')`` is a dictionary mapping a device to the mount information:
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Merging lists of dictionaries
|
Merging lists of dictionaries
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If you have two or more lists of dictionaries and want to combine them into a list of merged dictionaries, where the dictionaries are merged by an attribute, you can use the :ansplugin:`community.general.lists_mergeby filter <community.general.lists_mergeby#filter>`.
|
If you have two or more lists of dictionaries and want to combine them into a list of merged dictionaries, where the dictionaries are merged by an attribute, you can use the ``lists_mergeby`` filter.
|
||||||
|
|
||||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See :ref:`the documentation for the community.general.yaml callback plugin <ansible_collections.community.general.yaml_callback>`.
|
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See :ref:`the documentation for the community.general.yaml callback plugin <ansible_collections.community.general.yaml_callback>`.
|
||||||
|
|
||||||
@@ -76,15 +76,15 @@ This produces the same result as in the previous example:
|
|||||||
name: meh
|
name: meh
|
||||||
|
|
||||||
|
|
||||||
The filter also accepts two optional parameters: :ansopt:`community.general.lists_mergeby#filter:recursive` and :ansopt:`community.general.lists_mergeby#filter:list_merge`. This is available since community.general 4.4.0.
|
The filter also accepts two optional parameters: ``recursive`` and ``list_merge``. These parameters are only supported when used with ansible-base 2.10 or ansible-core, but not with Ansible 2.9. This is available since community.general 4.4.0.
|
||||||
|
|
||||||
**recursive**
|
**recursive**
|
||||||
Is a boolean, default to ``false``. Should the :ansplugin:`community.general.lists_mergeby#filter` filter recursively merge nested hashes. Note: It does not depend on the value of the ``hash_behaviour`` setting in ``ansible.cfg``.
|
Is a boolean, default to ``False``. Should the ``community.general.lists_mergeby`` recursively merge nested hashes. Note: It does not depend on the value of the ``hash_behaviour`` setting in ``ansible.cfg``.
|
||||||
|
|
||||||
**list_merge**
|
**list_merge**
|
||||||
Is a string, its possible values are :ansval:`replace` (default), :ansval:`keep`, :ansval:`append`, :ansval:`prepend`, :ansval:`append_rp` or :ansval:`prepend_rp`. It modifies the behaviour of :ansplugin:`community.general.lists_mergeby#filter` when the hashes to merge contain arrays/lists.
|
Is a string, its possible values are ``replace`` (default), ``keep``, ``append``, ``prepend``, ``append_rp`` or ``prepend_rp``. It modifies the behaviour of ``community.general.lists_mergeby`` when the hashes to merge contain arrays/lists.
|
||||||
|
|
||||||
The examples below set :ansopt:`community.general.lists_mergeby#filter:recursive=true` and display the differences among all six options of :ansopt:`community.general.lists_mergeby#filter:list_merge`. Functionality of the parameters is exactly the same as in the filter :ansplugin:`ansible.builtin.combine#filter`. See :ref:`Combining hashes/dictionaries <combine_filter>` to learn details about these options.
|
The examples below set ``recursive=true`` and display the differences among all six options of ``list_merge``. Functionality of the parameters is exactly the same as in the filter ``combine``. See :ref:`Combining hashes/dictionaries <combine_filter>` to learn details about these options.
|
||||||
|
|
||||||
Let us use the lists below in the following examples
|
Let us use the lists below in the following examples
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ Let us use the lists below in the following examples
|
|||||||
- name: myname02
|
- name: myname02
|
||||||
param01: [3, 4, 4, {key: value}]
|
param01: [3, 4, 4, {key: value}]
|
||||||
|
|
||||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=replace` (default):
|
Example ``list_merge=replace`` (default):
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ This produces:
|
|||||||
- 4
|
- 4
|
||||||
- key: value
|
- key: value
|
||||||
|
|
||||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=keep`:
|
Example ``list_merge=keep``:
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ This produces:
|
|||||||
- 2
|
- 2
|
||||||
- 3
|
- 3
|
||||||
|
|
||||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append`:
|
Example ``list_merge=append``:
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ This produces:
|
|||||||
- 4
|
- 4
|
||||||
- key: value
|
- key: value
|
||||||
|
|
||||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend`:
|
Example ``list_merge=prepend``:
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ This produces:
|
|||||||
- 2
|
- 2
|
||||||
- 3
|
- 3
|
||||||
|
|
||||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append_rp`:
|
Example ``list_merge=append_rp``:
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ This produces:
|
|||||||
- 4
|
- 4
|
||||||
- key: value
|
- key: value
|
||||||
|
|
||||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend_rp`:
|
Example ``list_merge=prepend_rp``:
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Conversions
|
|||||||
Parsing CSV files
|
Parsing CSV files
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Ansible offers the :ansplugin:`community.general.read_csv module <community.general.read_csv#module>` to read CSV files. Sometimes you need to convert strings to CSV files instead. For this, the :ansplugin:`community.general.from_csv filter <community.general.from_csv#filter>` exists.
|
Ansible offers the :ref:`community.general.read_csv module <ansible_collections.community.general.read_csv_module>` to read CSV files. Sometimes you need to convert strings to CSV files instead. For this, the ``from_csv`` filter exists.
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ This produces:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
The :ansplugin:`community.general.from_csv filter <community.general.from_csv#filter>` has several keyword arguments to control its behavior:
|
The ``from_csv`` filter has several keyword arguments to control its behavior:
|
||||||
|
|
||||||
:dialect: Dialect of the CSV file. Default is ``excel``. Other possible choices are ``excel-tab`` and ``unix``. If one of ``delimiter``, ``skipinitialspace`` or ``strict`` is specified, ``dialect`` is ignored.
|
:dialect: Dialect of the CSV file. Default is ``excel``. Other possible choices are ``excel-tab`` and ``unix``. If one of ``delimiter``, ``skipinitialspace`` or ``strict`` is specified, ``dialect`` is ignored.
|
||||||
:fieldnames: A set of column names to use. If not provided, the first line of the CSV is assumed to contain the column names.
|
:fieldnames: A set of column names to use. If not provided, the first line of the CSV is assumed to contain the column names.
|
||||||
@@ -55,7 +55,7 @@ The :ansplugin:`community.general.from_csv filter <community.general.from_csv#fi
|
|||||||
Converting to JSON
|
Converting to JSON
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
`JC <https://pypi.org/project/jc/>`_ is a CLI tool and Python library which allows to interpret output of various CLI programs as JSON. It is also available as a filter in community.general, called :ansplugin:`community.general.jc#filter`. This filter needs the `jc Python library <https://pypi.org/project/jc/>`_ installed on the controller.
|
`JC <https://pypi.org/project/jc/>`_ is a CLI tool and Python library which allows to interpret output of various CLI programs as JSON. It is also available as a filter in community.general. This filter needs the `jc Python library <https://pypi.org/project/jc/>`_ installed on the controller.
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ The following filters allow to create identifiers.
|
|||||||
Hashids
|
Hashids
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
`Hashids <https://hashids.org/>`_ allow to convert sequences of integers to short unique string identifiers. The :ansplugin:`community.general.hashids_encode#filter` and :ansplugin:`community.general.hashids_decode#filter` filters need the `hashids Python library <https://pypi.org/project/hashids/>`_ installed on the controller.
|
`Hashids <https://hashids.org/>`_ allow to convert sequences of integers to short unique string identifiers. This filter needs the `hashids Python library <https://pypi.org/project/hashids/>`_ installed on the controller.
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ The hashids filters accept keyword arguments to allow fine-tuning the hashids ge
|
|||||||
Random MACs
|
Random MACs
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
You can use the :ansplugin:`community.general.random_mac filter <community.general.random_mac#filter>` to complete a partial `MAC address <https://en.wikipedia.org/wiki/MAC_address>`_ to a random 6-byte MAC address.
|
You can use the ``random_mac`` filter to complete a partial `MAC address <https://en.wikipedia.org/wiki/MAC_address>`_ to a random 6-byte MAC address.
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
|||||||
@@ -6,4 +6,14 @@
|
|||||||
Paths
|
Paths
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The :ansplugin:`ansible.builtin.path_join filter <ansible.builtin.path_join#filter>` has been added in ansible-base 2.10. Community.general 3.0.0 and newer contains an alias ``community.general.path_join`` for this filter that could be used on Ansible 2.9 as well. Since community.general no longer supports Ansible 2.9, this is now a simple redirect to :ansplugin:`ansible.builtin.path_join filter <ansible.builtin.path_join#filter>`.
|
The ``path_join`` filter has been added in ansible-base 2.10. If you want to use this filter, but also need to support Ansible 2.9, you can use ``community.general``'s ``path_join`` shim, ``community.general.path_join``. This filter redirects to ``path_join`` for ansible-base 2.10 and ansible-core 2.11 or newer, and re-implements the filter for Ansible 2.9.
|
||||||
|
|
||||||
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
# ansible-base 2.10 or newer:
|
||||||
|
path: {{ ('/etc', path, 'subdir', file) | path_join }}
|
||||||
|
|
||||||
|
# Also works with Ansible 2.9:
|
||||||
|
path: {{ ('/etc', path, 'subdir', file) | community.general.path_join }}
|
||||||
|
|
||||||
|
.. versionadded:: 3.0.0
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
Selecting JSON data: JSON queries
|
Selecting JSON data: JSON queries
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
To select a single element or a data subset from a complex data structure in JSON format (for example, Ansible facts), use the :ansplugin:`community.general.json_query filter <community.general.json_query#filter>`. The :ansplugin:`community.general.json_query#filter` filter lets you query a complex JSON structure and iterate over it using a loop structure.
|
To select a single element or a data subset from a complex data structure in JSON format (for example, Ansible facts), use the ``json_query`` filter. The ``json_query`` filter lets you query a complex JSON structure and iterate over it using a loop structure.
|
||||||
|
|
||||||
.. note:: You must manually install the **jmespath** dependency on the Ansible controller before using this filter. This filter is built upon **jmespath**, and you can use the same syntax. For examples, see `jmespath examples <http://jmespath.org/examples.html>`_.
|
.. note:: You must manually install the **jmespath** dependency on the Ansible controller before using this filter. This filter is built upon **jmespath**, and you can use the same syntax. For examples, see `jmespath examples <http://jmespath.org/examples.html>`_.
|
||||||
|
|
||||||
@@ -146,4 +146,4 @@ To extract ports from all clusters with name containing 'server1':
|
|||||||
vars:
|
vars:
|
||||||
server_name_query: "domain.server[?contains(name,'server1')].port"
|
server_name_query: "domain.server[?contains(name,'server1')].port"
|
||||||
|
|
||||||
.. note:: while using ``starts_with`` and ``contains``, you have to use ``to_json | from_json`` filter for correct parsing of data structure.
|
.. note:: while using ``starts_with`` and ``contains``, you have to use `` to_json | from_json `` filter for correct parsing of data structure.
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
Working with times
|
Working with times
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
The :ansplugin:`community.general.to_time_unit filter <community.general.to_time_unit#filter>` allows to convert times from a human-readable string to a unit. For example, ``'4h 30min 12second' | community.general.to_time_unit('hour')`` gives the number of hours that correspond to 4 hours, 30 minutes and 12 seconds.
|
The ``to_time_unit`` filter allows to convert times from a human-readable string to a unit. For example, ``'4h 30min 12second' | community.general.to_time_unit('hour')`` gives the number of hours that correspond to 4 hours, 30 minutes and 12 seconds.
|
||||||
|
|
||||||
There are shorthands to directly convert to various units, like :ansplugin:`community.general.to_hours#filter`, :ansplugin:`community.general.to_minutes#filter`, :ansplugin:`community.general.to_seconds#filter`, and so on. The following table lists all units that can be used:
|
There are shorthands to directly convert to various units, like ``to_hours``, ``to_minutes``, ``to_seconds``, and so on. The following table lists all units that can be used:
|
||||||
|
|
||||||
.. list-table:: Units
|
.. list-table:: Units
|
||||||
:widths: 25 25 25 25
|
:widths: 25 25 25 25
|
||||||
@@ -21,37 +21,37 @@ There are shorthands to directly convert to various units, like :ansplugin:`comm
|
|||||||
* - Millisecond
|
* - Millisecond
|
||||||
- 1/1000 second
|
- 1/1000 second
|
||||||
- ``ms``, ``millisecond``, ``milliseconds``, ``msec``, ``msecs``, ``msecond``, ``mseconds``
|
- ``ms``, ``millisecond``, ``milliseconds``, ``msec``, ``msecs``, ``msecond``, ``mseconds``
|
||||||
- :ansplugin:`community.general.to_milliseconds#filter`
|
- ``to_milliseconds``
|
||||||
* - Second
|
* - Second
|
||||||
- 1 second
|
- 1 second
|
||||||
- ``s``, ``sec``, ``secs``, ``second``, ``seconds``
|
- ``s``, ``sec``, ``secs``, ``second``, ``seconds``
|
||||||
- :ansplugin:`community.general.to_seconds#filter`
|
- ``to_seconds``
|
||||||
* - Minute
|
* - Minute
|
||||||
- 60 seconds
|
- 60 seconds
|
||||||
- ``m``, ``min``, ``mins``, ``minute``, ``minutes``
|
- ``m``, ``min``, ``mins``, ``minute``, ``minutes``
|
||||||
- :ansplugin:`community.general.to_minutes#filter`
|
- ``to_minutes``
|
||||||
* - Hour
|
* - Hour
|
||||||
- 60*60 seconds
|
- 60*60 seconds
|
||||||
- ``h``, ``hour``, ``hours``
|
- ``h``, ``hour``, ``hours``
|
||||||
- :ansplugin:`community.general.to_hours#filter`
|
- ``to_hours``
|
||||||
* - Day
|
* - Day
|
||||||
- 24*60*60 seconds
|
- 24*60*60 seconds
|
||||||
- ``d``, ``day``, ``days``
|
- ``d``, ``day``, ``days``
|
||||||
- :ansplugin:`community.general.to_days#filter`
|
- ``to_days``
|
||||||
* - Week
|
* - Week
|
||||||
- 7*24*60*60 seconds
|
- 7*24*60*60 seconds
|
||||||
- ``w``, ``week``, ``weeks``
|
- ``w``, ``week``, ``weeks``
|
||||||
- :ansplugin:`community.general.to_weeks#filter`
|
- ``to_weeks``
|
||||||
* - Month
|
* - Month
|
||||||
- 30*24*60*60 seconds
|
- 30*24*60*60 seconds
|
||||||
- ``mo``, ``month``, ``months``
|
- ``mo``, ``month``, ``months``
|
||||||
- :ansplugin:`community.general.to_months#filter`
|
- ``to_months``
|
||||||
* - Year
|
* - Year
|
||||||
- 365*24*60*60 seconds
|
- 365*24*60*60 seconds
|
||||||
- ``y``, ``year``, ``years``
|
- ``y``, ``year``, ``years``
|
||||||
- :ansplugin:`community.general.to_years#filter`
|
- ``to_years``
|
||||||
|
|
||||||
Note that months and years are using a simplified representation: a month is 30 days, and a year is 365 days. If you need different definitions of months or years, you can pass them as keyword arguments. For example, if you want a year to be 365.25 days, and a month to be 30.5 days, you can write ``'11months 4' | community.general.to_years(year=365.25, month=30.5)``. These keyword arguments can be specified to :ansplugin:`community.general.to_time_unit#filter` and to all shorthand filters.
|
Note that months and years are using a simplified representation: a month is 30 days, and a year is 365 days. If you need different definitions of months or years, you can pass them as keyword arguments. For example, if you want a year to be 365.25 days, and a month to be 30.5 days, you can write ``'11months 4' | community.general.to_years(year=365.25, month=30.5)``. These keyword arguments can be specified to ``to_time_unit`` and to all shorthand filters.
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
Working with Unicode
|
Working with Unicode
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
`Unicode <https://unicode.org/main.html>`_ makes it possible to produce two strings which may be visually equivalent, but are comprised of distinctly different characters/character sequences. To address this Unicode defines `normalization forms <https://unicode.org/reports/tr15/>`_ which avoid these distinctions by choosing a unique character sequence for a given visual representation.
|
`Unicode <https://unicode.org/main.html>`_ makes it possible to produce two strings which may be visually equivalent, but are comprised of distinctly different characters/character sequences. To address this ``Unicode`` defines `normalization forms <https://unicode.org/reports/tr15/>`_ which avoid these distinctions by choosing a unique character sequence for a given visual representation.
|
||||||
|
|
||||||
You can use the :ansplugin:`community.general.unicode_normalize filter <community.general.unicode_normalize#filter>` to normalize Unicode strings within your playbooks.
|
You can use the ``community.general.unicode_normalize`` filter to normalize ``Unicode`` strings within your playbooks.
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ This produces:
|
|||||||
"msg": true
|
"msg": true
|
||||||
}
|
}
|
||||||
|
|
||||||
The :ansplugin:`community.general.unicode_normalize filter <community.general.unicode_normalize#filter>` accepts a keyword argument :ansopt:`community.general.unicode_normalize#filter:form` to select the Unicode form used to normalize the input string.
|
The ``community.general.unicode_normalize`` filter accepts a keyword argument to select the ``Unicode`` form used to normalize the input string.
|
||||||
|
|
||||||
:form: One of ``'NFC'`` (default), ``'NFD'``, ``'NFKC'``, or ``'NFKD'``. See the `Unicode reference <https://unicode.org/reports/tr15/>`_ for more information.
|
:form: One of ``'NFC'`` (default), ``'NFD'``, ``'NFKC'``, or ``'NFKD'``. See the `Unicode reference <https://unicode.org/reports/tr15/>`_ for more information.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Working with versions
|
Working with versions
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
If you need to sort a list of version numbers, the Jinja ``sort`` filter is problematic. Since it sorts lexicographically, ``2.10`` will come before ``2.9``. To treat version numbers correctly, you can use the :ansplugin:`community.general.version_sort filter <community.general.version_sort#filter>`:
|
If you need to sort a list of version numbers, the Jinja ``sort`` filter is problematic. Since it sorts lexicographically, ``2.10`` will come before ``2.9``. To treat version numbers correctly, you can use the ``version_sort`` filter:
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ The :ref:`community.general collection <plugins_in_community.general>` offers cu
|
|||||||
Feature Tests
|
Feature Tests
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
The :ansplugin:`community.general.a_module test <community.general.a_module#test>` allows to check whether a given string refers to an existing module or action plugin. This can be useful in roles, which can use this to ensure that required modules are present ahead of time.
|
The ``a_module`` test allows to check whether a given string refers to an existing module or action plugin. This can be useful in roles, which can use this to ensure that required modules are present ahead of time.
|
||||||
|
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace: community
|
namespace: community
|
||||||
name: general
|
name: general
|
||||||
version: 7.5.2
|
version: 6.6.2
|
||||||
readme: README.md
|
readme: README.md
|
||||||
authors:
|
authors:
|
||||||
- Ansible (https://github.com/ansible)
|
- Ansible (https://github.com/ansible)
|
||||||
|
|||||||
158
meta/runtime.yml
158
meta/runtime.yml
@@ -22,120 +22,6 @@ plugin_routing:
|
|||||||
nios_next_network:
|
nios_next_network:
|
||||||
redirect: infoblox.nios_modules.nios_next_network
|
redirect: infoblox.nios_modules.nios_next_network
|
||||||
modules:
|
modules:
|
||||||
rax_cbs_attachments:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_cbs:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_cdb_database:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_cdb_user:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_cdb:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_clb_nodes:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_clb_ssl:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_clb:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_dns_record:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_dns:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_facts:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_files_objects:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_files:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_identity:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_keypair:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_meta:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_mon_alarm:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_mon_check:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_mon_entity:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_mon_notification_plan:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_mon_notification:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_network:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_queue:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_scaling_group:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rax_scaling_policy:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on the deprecated package pyrax.
|
|
||||||
rhn_channel:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 10.0.0
|
|
||||||
warning_text: RHN is EOL, please contact the community.general maintainers
|
|
||||||
if still using this; see the module documentation for more details.
|
|
||||||
rhn_register:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 10.0.0
|
|
||||||
warning_text: RHN is EOL, please contact the community.general maintainers
|
|
||||||
if still using this; see the module documentation for more details.
|
|
||||||
database.aerospike.aerospike_migrations:
|
database.aerospike.aerospike_migrations:
|
||||||
redirect: community.general.aerospike_migrations
|
redirect: community.general.aerospike_migrations
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -150,12 +36,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.airbrake_deployment
|
warning_text: You are using an internal name to access the community.general.airbrake_deployment
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
stackdriver:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: >
|
|
||||||
This module relies on HTTPS APIs that do not exist anymore, and any new development in the
|
|
||||||
direction of providing an alternative should happen in the context of the google.cloud collection.
|
|
||||||
system.aix_devices:
|
system.aix_devices:
|
||||||
redirect: community.general.aix_devices
|
redirect: community.general.aix_devices
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -804,10 +684,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.flatpak_remote
|
warning_text: You are using an internal name to access the community.general.flatpak_remote
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
flowdock:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on HTTPS APIs that do not exist anymore and there is no clear path to update.
|
|
||||||
notification.flowdock:
|
notification.flowdock:
|
||||||
redirect: community.general.flowdock
|
redirect: community.general.flowdock
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -1096,8 +972,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.heroku_collaborator
|
warning_text: You are using an internal name to access the community.general.heroku_collaborator
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
hana_query:
|
|
||||||
redirect: community.sap_libs.sap_hdbsql
|
|
||||||
hetzner_failover_ip:
|
hetzner_failover_ip:
|
||||||
redirect: community.hrobot.failover_ip
|
redirect: community.hrobot.failover_ip
|
||||||
hetzner_failover_ip_info:
|
hetzner_failover_ip_info:
|
||||||
@@ -3515,10 +3389,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.redfish_info
|
warning_text: You are using an internal name to access the community.general.redfish_info
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
sapcar_extract:
|
|
||||||
redirect: community.sap_libs.sapcar_extract
|
|
||||||
sap_task_list_execute:
|
|
||||||
redirect: community.sap_libs.sap_task_list_execute
|
|
||||||
packaging.os.redhat_subscription:
|
packaging.os.redhat_subscription:
|
||||||
redirect: community.general.redhat_subscription
|
redirect: community.general.redhat_subscription
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -4443,10 +4313,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.wdc_redfish_info
|
warning_text: You are using an internal name to access the community.general.wdc_redfish_info
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
webfaction_app:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on HTTPS APIs that do not exist anymore and there is no clear path to update.
|
|
||||||
cloud.webfaction.webfaction_app:
|
cloud.webfaction.webfaction_app:
|
||||||
redirect: community.general.webfaction_app
|
redirect: community.general.webfaction_app
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -4454,10 +4320,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.webfaction_app
|
warning_text: You are using an internal name to access the community.general.webfaction_app
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
webfaction_db:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on HTTPS APIs that do not exist anymore and there is no clear path to update.
|
|
||||||
cloud.webfaction.webfaction_db:
|
cloud.webfaction.webfaction_db:
|
||||||
redirect: community.general.webfaction_db
|
redirect: community.general.webfaction_db
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -4465,10 +4327,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.webfaction_db
|
warning_text: You are using an internal name to access the community.general.webfaction_db
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
webfaction_domain:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on HTTPS APIs that do not exist anymore and there is no clear path to update.
|
|
||||||
cloud.webfaction.webfaction_domain:
|
cloud.webfaction.webfaction_domain:
|
||||||
redirect: community.general.webfaction_domain
|
redirect: community.general.webfaction_domain
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -4476,10 +4334,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.webfaction_domain
|
warning_text: You are using an internal name to access the community.general.webfaction_domain
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
webfaction_mailbox:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on HTTPS APIs that do not exist anymore and there is no clear path to update.
|
|
||||||
cloud.webfaction.webfaction_mailbox:
|
cloud.webfaction.webfaction_mailbox:
|
||||||
redirect: community.general.webfaction_mailbox
|
redirect: community.general.webfaction_mailbox
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -4487,10 +4341,6 @@ plugin_routing:
|
|||||||
warning_text: You are using an internal name to access the community.general.webfaction_mailbox
|
warning_text: You are using an internal name to access the community.general.webfaction_mailbox
|
||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
webfaction_site:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module relies on HTTPS APIs that do not exist anymore and there is no clear path to update.
|
|
||||||
cloud.webfaction.webfaction_site:
|
cloud.webfaction.webfaction_site:
|
||||||
redirect: community.general.webfaction_site
|
redirect: community.general.webfaction_site
|
||||||
deprecation:
|
deprecation:
|
||||||
@@ -4643,10 +4493,6 @@ plugin_routing:
|
|||||||
modules. This has never been supported or documented, and will stop working
|
modules. This has never been supported or documented, and will stop working
|
||||||
in community.general 9.0.0.
|
in community.general 9.0.0.
|
||||||
doc_fragments:
|
doc_fragments:
|
||||||
rackspace:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This doc fragment is used by rax modules, that rely on the deprecated package pyrax.
|
|
||||||
_gcp:
|
_gcp:
|
||||||
redirect: community.google._gcp
|
redirect: community.google._gcp
|
||||||
docker:
|
docker:
|
||||||
@@ -4662,10 +4508,6 @@ plugin_routing:
|
|||||||
postgresql:
|
postgresql:
|
||||||
redirect: community.postgresql.postgresql
|
redirect: community.postgresql.postgresql
|
||||||
module_utils:
|
module_utils:
|
||||||
rax:
|
|
||||||
deprecation:
|
|
||||||
removal_version: 9.0.0
|
|
||||||
warning_text: This module util relies on the deprecated package pyrax.
|
|
||||||
docker.common:
|
docker.common:
|
||||||
redirect: community.docker.common
|
redirect: community.docker.common
|
||||||
docker.swarm:
|
docker.swarm:
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class ActionModule(ActionBase):
|
|||||||
|
|
||||||
def _async_result(self, async_status_args, task_vars, timeout):
|
def _async_result(self, async_status_args, task_vars, timeout):
|
||||||
'''
|
'''
|
||||||
Retrieve results of the asynchronous task, and display them in place of
|
Retrieve results of the asynchonous task, and display them in place of
|
||||||
the async wrapper results (those with the ansible_job_id key).
|
the async wrapper results (those with the ansible_job_id key).
|
||||||
'''
|
'''
|
||||||
async_status = self._task.copy()
|
async_status = self._task.copy()
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure
|
from ansible.errors import AnsibleError, AnsibleConnectionFailure
|
||||||
@@ -45,7 +44,7 @@ class ActionModule(ActionBase):
|
|||||||
SHUTDOWN_COMMAND_ARGS = {
|
SHUTDOWN_COMMAND_ARGS = {
|
||||||
'alpine': '',
|
'alpine': '',
|
||||||
'void': '-h +{delay_min} "{message}"',
|
'void': '-h +{delay_min} "{message}"',
|
||||||
'freebsd': '-p +{delay_sec}s "{message}"',
|
'freebsd': '-h +{delay_sec}s "{message}"',
|
||||||
'linux': DEFAULT_SHUTDOWN_COMMAND_ARGS,
|
'linux': DEFAULT_SHUTDOWN_COMMAND_ARGS,
|
||||||
'macosx': '-h +{delay_min} "{message}"',
|
'macosx': '-h +{delay_min} "{message}"',
|
||||||
'openbsd': '-h +{delay_min} "{message}"',
|
'openbsd': '-h +{delay_min} "{message}"',
|
||||||
@@ -81,6 +80,13 @@ class ActionModule(ActionBase):
|
|||||||
getattr(self, default_value))))
|
getattr(self, default_value))))
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
def get_shutdown_command_args(self, distribution):
|
||||||
|
args = self._get_value_from_facts('SHUTDOWN_COMMAND_ARGS', distribution, 'DEFAULT_SHUTDOWN_COMMAND_ARGS')
|
||||||
|
# Convert seconds to minutes. If less that 60, set it to 0.
|
||||||
|
delay_sec = self.delay
|
||||||
|
shutdown_message = self._task.args.get('msg', self.DEFAULT_SHUTDOWN_MESSAGE)
|
||||||
|
return args.format(delay_sec=delay_sec, delay_min=delay_sec // 60, message=shutdown_message)
|
||||||
|
|
||||||
def get_distribution(self, task_vars):
|
def get_distribution(self, task_vars):
|
||||||
# FIXME: only execute the module if we don't already have the facts we need
|
# FIXME: only execute the module if we don't already have the facts we need
|
||||||
distribution = {}
|
distribution = {}
|
||||||
@@ -95,8 +101,7 @@ class ActionModule(ActionBase):
|
|||||||
to_native(module_output['module_stdout']).strip(),
|
to_native(module_output['module_stdout']).strip(),
|
||||||
to_native(module_output['module_stderr']).strip()))
|
to_native(module_output['module_stderr']).strip()))
|
||||||
distribution['name'] = module_output['ansible_facts']['ansible_distribution'].lower()
|
distribution['name'] = module_output['ansible_facts']['ansible_distribution'].lower()
|
||||||
distribution['version'] = to_text(
|
distribution['version'] = to_text(module_output['ansible_facts']['ansible_distribution_version'].split('.')[0])
|
||||||
module_output['ansible_facts']['ansible_distribution_version'].split('.')[0])
|
|
||||||
distribution['family'] = to_text(module_output['ansible_facts']['ansible_os_family'].lower())
|
distribution['family'] = to_text(module_output['ansible_facts']['ansible_os_family'].lower())
|
||||||
display.debug("{action}: distribution: {dist}".format(action=self._task.action, dist=distribution))
|
display.debug("{action}: distribution: {dist}".format(action=self._task.action, dist=distribution))
|
||||||
return distribution
|
return distribution
|
||||||
@@ -104,23 +109,6 @@ class ActionModule(ActionBase):
|
|||||||
raise AnsibleError('Failed to get distribution information. Missing "{0}" in output.'.format(ke.args[0]))
|
raise AnsibleError('Failed to get distribution information. Missing "{0}" in output.'.format(ke.args[0]))
|
||||||
|
|
||||||
def get_shutdown_command(self, task_vars, distribution):
|
def get_shutdown_command(self, task_vars, distribution):
|
||||||
def find_command(command, find_search_paths):
|
|
||||||
display.debug('{action}: running find module looking in {paths} to get path for "{command}"'.format(
|
|
||||||
action=self._task.action,
|
|
||||||
command=command,
|
|
||||||
paths=find_search_paths))
|
|
||||||
find_result = self._execute_module(
|
|
||||||
task_vars=task_vars,
|
|
||||||
# prevent collection search by calling with ansible.legacy (still allows library/ override of find)
|
|
||||||
module_name='ansible.legacy.find',
|
|
||||||
module_args={
|
|
||||||
'paths': find_search_paths,
|
|
||||||
'patterns': [command],
|
|
||||||
'file_type': 'any'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
return [x['path'] for x in find_result['files']]
|
|
||||||
|
|
||||||
shutdown_bin = self._get_value_from_facts('SHUTDOWN_COMMANDS', distribution, 'DEFAULT_SHUTDOWN_COMMAND')
|
shutdown_bin = self._get_value_from_facts('SHUTDOWN_COMMANDS', distribution, 'DEFAULT_SHUTDOWN_COMMAND')
|
||||||
default_search_paths = ['/sbin', '/usr/sbin', '/usr/local/sbin']
|
default_search_paths = ['/sbin', '/usr/sbin', '/usr/local/sbin']
|
||||||
search_paths = self._task.args.get('search_paths', default_search_paths)
|
search_paths = self._task.args.get('search_paths', default_search_paths)
|
||||||
@@ -139,53 +127,45 @@ class ActionModule(ActionBase):
|
|||||||
except TypeError:
|
except TypeError:
|
||||||
raise AnsibleError(err_msg.format(search_paths))
|
raise AnsibleError(err_msg.format(search_paths))
|
||||||
|
|
||||||
full_path = find_command(shutdown_bin, search_paths) # find the path to the shutdown command
|
display.debug('{action}: running find module looking in {paths} to get path for "{command}"'.format(
|
||||||
if not full_path: # if we could not find the shutdown command
|
action=self._task.action,
|
||||||
display.vvv('Unable to find command "{0}" in search paths: {1}, will attempt a shutdown using systemd '
|
command=shutdown_bin,
|
||||||
'directly.'.format(shutdown_bin, search_paths)) # tell the user we will try with systemd
|
paths=search_paths))
|
||||||
systemctl_search_paths = ['/bin', '/usr/bin']
|
find_result = self._execute_module(
|
||||||
full_path = find_command('systemctl', systemctl_search_paths) # find the path to the systemctl command
|
task_vars=task_vars,
|
||||||
if not full_path: # if we couldn't find systemctl
|
# prevent collection search by calling with ansible.legacy (still allows library/ override of find)
|
||||||
raise AnsibleError(
|
module_name='ansible.legacy.find',
|
||||||
'Could not find command "{0}" in search paths: {1} or systemctl command in search paths: {2}, unable to shutdown.'.
|
module_args={
|
||||||
format(shutdown_bin, search_paths, systemctl_search_paths)) # we give up here
|
'paths': search_paths,
|
||||||
else:
|
'patterns': [shutdown_bin],
|
||||||
return "{0} poweroff".format(full_path[0]) # done, since we cannot use args with systemd shutdown
|
'file_type': 'any'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# systemd case taken care of, here we add args to the command
|
full_path = [x['path'] for x in find_result['files']]
|
||||||
args = self._get_value_from_facts('SHUTDOWN_COMMAND_ARGS', distribution, 'DEFAULT_SHUTDOWN_COMMAND_ARGS')
|
if not full_path:
|
||||||
# Convert seconds to minutes. If less that 60, set it to 0.
|
raise AnsibleError('Unable to find command "{0}" in search paths: {1}'.format(shutdown_bin, search_paths))
|
||||||
delay_sec = self.delay
|
self._shutdown_command = full_path[0]
|
||||||
shutdown_message = self._task.args.get('msg', self.DEFAULT_SHUTDOWN_MESSAGE)
|
return self._shutdown_command
|
||||||
return '{0} {1}'. \
|
|
||||||
format(
|
|
||||||
full_path[0],
|
|
||||||
args.format(
|
|
||||||
delay_sec=delay_sec,
|
|
||||||
delay_min=delay_sec // 60,
|
|
||||||
message=shutdown_message
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
def perform_shutdown(self, task_vars, distribution):
|
def perform_shutdown(self, task_vars, distribution):
|
||||||
result = {}
|
result = {}
|
||||||
shutdown_result = {}
|
shutdown_result = {}
|
||||||
shutdown_command_exec = self.get_shutdown_command(task_vars, distribution)
|
shutdown_command = self.get_shutdown_command(task_vars, distribution)
|
||||||
|
shutdown_command_args = self.get_shutdown_command_args(distribution)
|
||||||
|
shutdown_command_exec = '{0} {1}'.format(shutdown_command, shutdown_command_args)
|
||||||
|
|
||||||
self.cleanup(force=True)
|
self.cleanup(force=True)
|
||||||
try:
|
try:
|
||||||
display.vvv("{action}: shutting down server...".format(action=self._task.action))
|
display.vvv("{action}: shutting down server...".format(action=self._task.action))
|
||||||
display.debug("{action}: shutting down server with command '{command}'".
|
display.debug("{action}: shutting down server with command '{command}'".format(action=self._task.action, command=shutdown_command_exec))
|
||||||
format(action=self._task.action, command=shutdown_command_exec))
|
|
||||||
if self._play_context.check_mode:
|
if self._play_context.check_mode:
|
||||||
shutdown_result['rc'] = 0
|
shutdown_result['rc'] = 0
|
||||||
else:
|
else:
|
||||||
shutdown_result = self._low_level_execute_command(shutdown_command_exec, sudoable=self.DEFAULT_SUDOABLE)
|
shutdown_result = self._low_level_execute_command(shutdown_command_exec, sudoable=self.DEFAULT_SUDOABLE)
|
||||||
except AnsibleConnectionFailure as e:
|
except AnsibleConnectionFailure as e:
|
||||||
# If the connection is closed too quickly due to the system being shutdown, carry on
|
# If the connection is closed too quickly due to the system being shutdown, carry on
|
||||||
display.debug(
|
display.debug('{action}: AnsibleConnectionFailure caught and handled: {error}'.format(action=self._task.action, error=to_text(e)))
|
||||||
'{action}: AnsibleConnectionFailure caught and handled: {error}'.format(action=self._task.action,
|
|
||||||
error=to_text(e)))
|
|
||||||
shutdown_result['rc'] = 0
|
shutdown_result['rc'] = 0
|
||||||
|
|
||||||
if shutdown_result['rc'] != 0:
|
if shutdown_result['rc'] != 0:
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ DOCUMENTATION = '''
|
|||||||
- section: machinectl_become_plugin
|
- section: machinectl_become_plugin
|
||||||
key: password
|
key: password
|
||||||
notes:
|
notes:
|
||||||
- When not using this plugin with user V(root), it only works correctly with a polkit rule which will alter
|
- When not using this plugin with user C(root), it only works correctly with a polkit rule which will alter
|
||||||
the behaviour of machinectl. This rule must alter the prompt behaviour to ask directly for the user credentials,
|
the behaviour of machinectl. This rule must alter the prompt behaviour to ask directly for the user credentials,
|
||||||
if the user is allowed to perform the action (take a look at the examples section).
|
if the user is allowed to perform the action (take a look at the examples section).
|
||||||
If such a rule is not present the plugin only work if it is used in context with the root user,
|
If such a rule is not present the plugin only work if it is used in context with the root user,
|
||||||
@@ -102,7 +102,6 @@ class BecomeModule(BecomeBase):
|
|||||||
prompt = 'Password: '
|
prompt = 'Password: '
|
||||||
fail = ('==== AUTHENTICATION FAILED ====',)
|
fail = ('==== AUTHENTICATION FAILED ====',)
|
||||||
success = ('==== AUTHENTICATION COMPLETE ====',)
|
success = ('==== AUTHENTICATION COMPLETE ====',)
|
||||||
require_tty = True # see https://github.com/ansible-collections/community.general/issues/6932
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def remove_ansi_codes(line):
|
def remove_ansi_codes(line):
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ DOCUMENTATION = '''
|
|||||||
env:
|
env:
|
||||||
- name: ANSIBLE_PFEXEC_WRAP_EXECUTION
|
- name: ANSIBLE_PFEXEC_WRAP_EXECUTION
|
||||||
notes:
|
notes:
|
||||||
- This plugin ignores O(become_user) as pfexec uses it's own C(exec_attr) to figure this out.
|
- This plugin ignores I(become_user) as pfexec uses it's own C(exec_attr) to figure this out.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.plugins.become import BecomeBase
|
from ansible.plugins.become import BecomeBase
|
||||||
|
|||||||
8
plugins/cache/redis.py
vendored
8
plugins/cache/redis.py
vendored
@@ -18,9 +18,9 @@ DOCUMENTATION = '''
|
|||||||
_uri:
|
_uri:
|
||||||
description:
|
description:
|
||||||
- A colon separated string of connection information for Redis.
|
- A colon separated string of connection information for Redis.
|
||||||
- The format is V(host:port:db:password), for example V(localhost:6379:0:changeme).
|
- The format is C(host:port:db:password), for example C(localhost:6379:0:changeme).
|
||||||
- To use encryption in transit, prefix the connection with V(tls://), as in V(tls://localhost:6379:0:changeme).
|
- To use encryption in transit, prefix the connection with C(tls://), as in C(tls://localhost:6379:0:changeme).
|
||||||
- To use redis sentinel, use separator V(;), for example V(localhost:26379;localhost:26379;0:changeme). Requires redis>=2.9.0.
|
- To use redis sentinel, use separator C(;), for example C(localhost:26379;localhost:26379;0:changeme). Requires redis>=2.9.0.
|
||||||
required: true
|
required: true
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
|
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
|
||||||
@@ -150,7 +150,7 @@ class CacheModule(BaseCacheModule):
|
|||||||
# format: "localhost:26379;localhost2:26379;0:changeme"
|
# format: "localhost:26379;localhost2:26379;0:changeme"
|
||||||
connections = uri.split(';')
|
connections = uri.split(';')
|
||||||
connection_args = connections.pop(-1)
|
connection_args = connections.pop(-1)
|
||||||
if len(connection_args) > 0: # handle if no db nr is given
|
if len(connection_args) > 0: # hanle if no db nr is given
|
||||||
connection_args = connection_args.split(':')
|
connection_args = connection_args.split(':')
|
||||||
kw['db'] = connection_args.pop(0)
|
kw['db'] = connection_args.pop(0)
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ DOCUMENTATION = '''
|
|||||||
options:
|
options:
|
||||||
max_mem_file:
|
max_mem_file:
|
||||||
required: true
|
required: true
|
||||||
description: Path to cgroups C(memory.max_usage_in_bytes) file. Example V(/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes).
|
description: Path to cgroups C(memory.max_usage_in_bytes) file. Example C(/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes).
|
||||||
env:
|
env:
|
||||||
- name: CGROUP_MAX_MEM_FILE
|
- name: CGROUP_MAX_MEM_FILE
|
||||||
ini:
|
ini:
|
||||||
@@ -32,7 +32,7 @@ DOCUMENTATION = '''
|
|||||||
key: max_mem_file
|
key: max_mem_file
|
||||||
cur_mem_file:
|
cur_mem_file:
|
||||||
required: true
|
required: true
|
||||||
description: Path to C(memory.usage_in_bytes) file. Example V(/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes).
|
description: Path to C(memory.usage_in_bytes) file. Example C(/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes).
|
||||||
env:
|
env:
|
||||||
- name: CGROUP_CUR_MEM_FILE
|
- name: CGROUP_CUR_MEM_FILE
|
||||||
ini:
|
ini:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ DOCUMENTATION = r'''
|
|||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- default_callback
|
- default_callback
|
||||||
notes:
|
notes:
|
||||||
- Uses the P(ansible.builtin.default#callback) callback plugin output when a custom callback V(message(msg\)) is not provided.
|
- Uses the C(default) callback plugin output when a custom callback message(C(msg)) is not provided.
|
||||||
- Makes the callback event data available via the C(ansible_callback_diy) dictionary, which can be used in the templating context for the options.
|
- Makes the callback event data available via the C(ansible_callback_diy) dictionary, which can be used in the templating context for the options.
|
||||||
The dictionary is only available in the templating context for the options. It is not a variable that is available via the other
|
The dictionary is only available in the templating context for the options. It is not a variable that is available via the other
|
||||||
various execution contexts, such as playbook, play, task etc.
|
various execution contexts, such as playbook, play, task etc.
|
||||||
@@ -40,8 +40,8 @@ DOCUMENTATION = r'''
|
|||||||
if value C(is not None and not omit and length is greater than 0),
|
if value C(is not None and not omit and length is greater than 0),
|
||||||
then the option is being used with output.
|
then the option is being used with output.
|
||||||
**Effect**: render value as template and output"
|
**Effect**: render value as template and output"
|
||||||
- "Valid color values: V(black), V(bright gray), V(blue), V(white), V(green), V(bright blue), V(cyan), V(bright green), V(red), V(bright cyan),
|
- "Valid color values: C(black), C(bright gray), C(blue), C(white), C(green), C(bright blue), C(cyan), C(bright green), C(red), C(bright cyan),
|
||||||
V(purple), V(bright red), V(yellow), V(bright purple), V(dark gray), V(bright yellow), V(magenta), V(bright magenta), V(normal)"
|
C(purple), C(bright red), C(yellow), C(bright purple), C(dark gray), C(bright yellow), C(magenta), C(bright magenta), C(normal)"
|
||||||
seealso:
|
seealso:
|
||||||
- name: default – default Ansible screen output
|
- name: default – default Ansible screen output
|
||||||
description: The official documentation on the B(default) callback plugin.
|
description: The official documentation on the B(default) callback plugin.
|
||||||
@@ -62,7 +62,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
on_any_msg_color:
|
on_any_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(on_any_msg).
|
- Output color to be used for I(on_any_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -86,7 +86,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_on_failed_msg_color:
|
runner_on_failed_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_on_failed_msg).
|
- Output color to be used for I(runner_on_failed_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -110,7 +110,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_on_ok_msg_color:
|
runner_on_ok_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_on_ok_msg).
|
- Output color to be used for I(runner_on_ok_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -134,7 +134,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_on_skipped_msg_color:
|
runner_on_skipped_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_on_skipped_msg).
|
- Output color to be used for I(runner_on_skipped_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -158,7 +158,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_on_unreachable_msg_color:
|
runner_on_unreachable_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_on_unreachable_msg).
|
- Output color to be used for I(runner_on_unreachable_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -182,7 +182,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_start_msg_color:
|
playbook_on_start_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_start_msg).
|
- Output color to be used for I(playbook_on_start_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -206,7 +206,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_notify_msg_color:
|
playbook_on_notify_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_notify_msg).
|
- Output color to be used for I(playbook_on_notify_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -230,7 +230,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_no_hosts_matched_msg_color:
|
playbook_on_no_hosts_matched_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_no_hosts_matched_msg).
|
- Output color to be used for I(playbook_on_no_hosts_matched_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -254,7 +254,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_no_hosts_remaining_msg_color:
|
playbook_on_no_hosts_remaining_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_no_hosts_remaining_msg).
|
- Output color to be used for I(playbook_on_no_hosts_remaining_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -278,7 +278,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_task_start_msg_color:
|
playbook_on_task_start_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_task_start_msg).
|
- Output color to be used for I(playbook_on_task_start_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -302,7 +302,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_handler_task_start_msg_color:
|
playbook_on_handler_task_start_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_handler_task_start_msg).
|
- Output color to be used for I(playbook_on_handler_task_start_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -326,7 +326,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_vars_prompt_msg_color:
|
playbook_on_vars_prompt_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_vars_prompt_msg).
|
- Output color to be used for I(playbook_on_vars_prompt_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -350,7 +350,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_play_start_msg_color:
|
playbook_on_play_start_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_play_start_msg).
|
- Output color to be used for I(playbook_on_play_start_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -374,7 +374,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_stats_msg_color:
|
playbook_on_stats_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_stats_msg).
|
- Output color to be used for I(playbook_on_stats_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -398,7 +398,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
on_file_diff_msg_color:
|
on_file_diff_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(on_file_diff_msg).
|
- Output color to be used for I(on_file_diff_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -422,7 +422,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_include_msg_color:
|
playbook_on_include_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_include_msg).
|
- Output color to be used for I(playbook_on_include_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -446,7 +446,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_item_on_ok_msg_color:
|
runner_item_on_ok_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_item_on_ok_msg).
|
- Output color to be used for I(runner_item_on_ok_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -470,7 +470,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_item_on_failed_msg_color:
|
runner_item_on_failed_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_item_on_failed_msg).
|
- Output color to be used for I(runner_item_on_failed_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -494,7 +494,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_item_on_skipped_msg_color:
|
runner_item_on_skipped_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_item_on_skipped_msg).
|
- Output color to be used for I(runner_item_on_skipped_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -518,7 +518,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_retry_msg_color:
|
runner_retry_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_retry_msg).
|
- Output color to be used for I(runner_retry_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -542,7 +542,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_on_start_msg_color:
|
runner_on_start_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_on_start_msg).
|
- Output color to be used for I(runner_on_start_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -566,7 +566,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
runner_on_no_hosts_msg_color:
|
runner_on_no_hosts_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(runner_on_no_hosts_msg).
|
- Output color to be used for I(runner_on_no_hosts_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
@@ -590,7 +590,7 @@ DOCUMENTATION = r'''
|
|||||||
|
|
||||||
playbook_on_setup_msg_color:
|
playbook_on_setup_msg_color:
|
||||||
description:
|
description:
|
||||||
- Output color to be used for O(playbook_on_setup_msg).
|
- Output color to be used for I(playbook_on_setup_msg).
|
||||||
- Template should render a L(valid color value,#notes).
|
- Template should render a L(valid color value,#notes).
|
||||||
ini:
|
ini:
|
||||||
- section: callback_diy
|
- section: callback_diy
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ import time
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from contextlib import closing
|
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
|
|
||||||
from ansible.errors import AnsibleError, AnsibleRuntimeError
|
from ansible.errors import AnsibleError, AnsibleRuntimeError
|
||||||
@@ -202,25 +201,24 @@ class ElasticSource(object):
|
|||||||
|
|
||||||
apm_cli = self.init_apm_client(apm_server_url, apm_service_name, apm_verify_server_cert, apm_secret_token, apm_api_key)
|
apm_cli = self.init_apm_client(apm_server_url, apm_service_name, apm_verify_server_cert, apm_secret_token, apm_api_key)
|
||||||
if apm_cli:
|
if apm_cli:
|
||||||
with closing(apm_cli):
|
instrument() # Only call this once, as early as possible.
|
||||||
instrument() # Only call this once, as early as possible.
|
if traceparent:
|
||||||
if traceparent:
|
parent = trace_parent_from_string(traceparent)
|
||||||
parent = trace_parent_from_string(traceparent)
|
apm_cli.begin_transaction("Session", trace_parent=parent, start=parent_start_time)
|
||||||
apm_cli.begin_transaction("Session", trace_parent=parent, start=parent_start_time)
|
else:
|
||||||
else:
|
apm_cli.begin_transaction("Session", start=parent_start_time)
|
||||||
apm_cli.begin_transaction("Session", start=parent_start_time)
|
# Populate trace metadata attributes
|
||||||
# Populate trace metadata attributes
|
if self.ansible_version is not None:
|
||||||
if self.ansible_version is not None:
|
label(ansible_version=self.ansible_version)
|
||||||
label(ansible_version=self.ansible_version)
|
label(ansible_session=self.session, ansible_host_name=self.host, ansible_host_user=self.user)
|
||||||
label(ansible_session=self.session, ansible_host_name=self.host, ansible_host_user=self.user)
|
if self.ip_address is not None:
|
||||||
if self.ip_address is not None:
|
label(ansible_host_ip=self.ip_address)
|
||||||
label(ansible_host_ip=self.ip_address)
|
|
||||||
|
|
||||||
for task_data in tasks:
|
for task_data in tasks:
|
||||||
for host_uuid, host_data in task_data.host_data.items():
|
for host_uuid, host_data in task_data.host_data.items():
|
||||||
self.create_span_data(apm_cli, task_data, host_data)
|
self.create_span_data(apm_cli, task_data, host_data)
|
||||||
|
|
||||||
apm_cli.end_transaction(name=__name__, result=status, duration=end_time - parent_start_time)
|
apm_cli.end_transaction(name=__name__, result=status, duration=end_time - parent_start_time)
|
||||||
|
|
||||||
def create_span_data(self, apm_cli, task_data, host_data):
|
def create_span_data(self, apm_cli, task_data, host_data):
|
||||||
""" create the span with the given TaskData and HostData """
|
""" create the span with the given TaskData and HostData """
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ DOCUMENTATION = '''
|
|||||||
requirements:
|
requirements:
|
||||||
- whitelisting in configuration
|
- whitelisting in configuration
|
||||||
- certifi (Python library)
|
- certifi (Python library)
|
||||||
- flatdict (Python library), if you want to use the O(flatten) option
|
- flatdict (Python library), if you want to use the 'flatten' option
|
||||||
options:
|
options:
|
||||||
api:
|
api:
|
||||||
description: URI to the Logentries API.
|
description: URI to the Logentries API.
|
||||||
@@ -90,9 +90,9 @@ examples: >
|
|||||||
api = data.logentries.com
|
api = data.logentries.com
|
||||||
port = 10000
|
port = 10000
|
||||||
tls_port = 20000
|
tls_port = 20000
|
||||||
use_tls = true
|
use_tls = no
|
||||||
token = dd21fc88-f00a-43ff-b977-e3a4233c53af
|
token = dd21fc88-f00a-43ff-b977-e3a4233c53af
|
||||||
flatten = false
|
flatten = False
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@@ -196,11 +196,15 @@ else:
|
|||||||
class TLSSocketAppender(PlainTextSocketAppender):
|
class TLSSocketAppender(PlainTextSocketAppender):
|
||||||
def open_connection(self):
|
def open_connection(self):
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
context = ssl.create_default_context(
|
sock = ssl.wrap_socket(
|
||||||
purpose=ssl.Purpose.SERVER_AUTH,
|
|
||||||
cafile=certifi.where(), )
|
|
||||||
sock = context.wrap_socket(
|
|
||||||
sock=sock,
|
sock=sock,
|
||||||
|
keyfile=None,
|
||||||
|
certfile=None,
|
||||||
|
server_side=False,
|
||||||
|
cert_reqs=ssl.CERT_REQUIRED,
|
||||||
|
ssl_version=getattr(
|
||||||
|
ssl, 'PROTOCOL_TLSv1_2', ssl.PROTOCOL_TLSv1),
|
||||||
|
ca_certs=certifi.where(),
|
||||||
do_handshake_on_connect=True,
|
do_handshake_on_connect=True,
|
||||||
suppress_ragged_eofs=True, )
|
suppress_ragged_eofs=True, )
|
||||||
sock.connect((self.LE_API, self.LE_TLS_PORT))
|
sock.connect((self.LE_API, self.LE_TLS_PORT))
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
|||||||
short_description: Post task results to a Nagios server through nrdp
|
short_description: Post task results to a Nagios server through nrdp
|
||||||
description:
|
description:
|
||||||
- This callback send playbook result to Nagios.
|
- This callback send playbook result to Nagios.
|
||||||
- Nagios shall use NRDP to receive passive events.
|
- Nagios shall use NRDP to recive passive events.
|
||||||
- The passive check is sent to a dedicated host/service for Ansible.
|
- The passive check is sent to a dedicated host/service for Ansible.
|
||||||
options:
|
options:
|
||||||
url:
|
url:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ DOCUMENTATION = '''
|
|||||||
- set as main display callback
|
- set as main display callback
|
||||||
short_description: Don't display stuff to screen
|
short_description: Don't display stuff to screen
|
||||||
description:
|
description:
|
||||||
- This callback prevents outputting events to screen.
|
- This callback prevents outputing events to screen.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.plugins.callback import CallbackBase
|
from ansible.plugins.callback import CallbackBase
|
||||||
@@ -24,7 +24,7 @@ from ansible.plugins.callback import CallbackBase
|
|||||||
class CallbackModule(CallbackBase):
|
class CallbackModule(CallbackBase):
|
||||||
|
|
||||||
'''
|
'''
|
||||||
This callback won't print messages to stdout when new callback events are received.
|
This callback wont print messages to stdout when new callback events are received.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
CALLBACK_VERSION = 2.0
|
CALLBACK_VERSION = 2.0
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ DOCUMENTATION = '''
|
|||||||
enable_from_environment:
|
enable_from_environment:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Whether to enable this callback only if the given environment variable exists and it is set to V(true).
|
- Whether to enable this callback only if the given environment variable exists and it is set to C(true).
|
||||||
- This is handy when you use Configuration as Code and want to send distributed traces
|
- This is handy when you use Configuration as Code and want to send distributed traces
|
||||||
if running in the CI rather when running Ansible locally.
|
if running in the CI rather when running Ansible locally.
|
||||||
- For such, it evaluates the given O(enable_from_environment) value as environment variable
|
- For such, it evaluates the given I(enable_from_environment) value as environment variable
|
||||||
and if set to true this plugin will be enabled.
|
and if set to true this plugin will be enabled.
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_OPENTELEMETRY_ENABLE_FROM_ENVIRONMENT
|
- name: ANSIBLE_OPENTELEMETRY_ENABLE_FROM_ENVIRONMENT
|
||||||
@@ -73,17 +73,6 @@ DOCUMENTATION = '''
|
|||||||
- section: callback_opentelemetry
|
- section: callback_opentelemetry
|
||||||
key: disable_logs
|
key: disable_logs
|
||||||
version_added: 5.8.0
|
version_added: 5.8.0
|
||||||
disable_attributes_in_logs:
|
|
||||||
default: false
|
|
||||||
type: bool
|
|
||||||
description:
|
|
||||||
- Disable populating span attributes to the logs.
|
|
||||||
env:
|
|
||||||
- name: ANSIBLE_OPENTELEMETRY_DISABLE_ATTRIBUTES_IN_LOGS
|
|
||||||
ini:
|
|
||||||
- section: callback_opentelemetry
|
|
||||||
key: disable_attributes_in_logs
|
|
||||||
version_added: 7.1.0
|
|
||||||
requirements:
|
requirements:
|
||||||
- opentelemetry-api (Python library)
|
- opentelemetry-api (Python library)
|
||||||
- opentelemetry-exporter-otlp (Python library)
|
- opentelemetry-exporter-otlp (Python library)
|
||||||
@@ -255,7 +244,7 @@ class OpenTelemetrySource(object):
|
|||||||
task.dump = dump
|
task.dump = dump
|
||||||
task.add_host(HostData(host_uuid, host_name, status, result))
|
task.add_host(HostData(host_uuid, host_name, status, result))
|
||||||
|
|
||||||
def generate_distributed_traces(self, otel_service_name, ansible_playbook, tasks_data, status, traceparent, disable_logs, disable_attributes_in_logs):
|
def generate_distributed_traces(self, otel_service_name, ansible_playbook, tasks_data, status, traceparent, disable_logs):
|
||||||
""" generate distributed traces from the collected TaskData and HostData """
|
""" generate distributed traces from the collected TaskData and HostData """
|
||||||
|
|
||||||
tasks = []
|
tasks = []
|
||||||
@@ -291,9 +280,9 @@ class OpenTelemetrySource(object):
|
|||||||
for task in tasks:
|
for task in tasks:
|
||||||
for host_uuid, host_data in task.host_data.items():
|
for host_uuid, host_data in task.host_data.items():
|
||||||
with tracer.start_as_current_span(task.name, start_time=task.start, end_on_exit=False) as span:
|
with tracer.start_as_current_span(task.name, start_time=task.start, end_on_exit=False) as span:
|
||||||
self.update_span_data(task, host_data, span, disable_logs, disable_attributes_in_logs)
|
self.update_span_data(task, host_data, span, disable_logs)
|
||||||
|
|
||||||
def update_span_data(self, task_data, host_data, span, disable_logs, disable_attributes_in_logs):
|
def update_span_data(self, task_data, host_data, span, disable_logs):
|
||||||
""" update the span with the given TaskData and HostData """
|
""" update the span with the given TaskData and HostData """
|
||||||
|
|
||||||
name = '[%s] %s: %s' % (host_data.name, task_data.play, task_data.name)
|
name = '[%s] %s: %s' % (host_data.name, task_data.play, task_data.name)
|
||||||
@@ -326,47 +315,39 @@ class OpenTelemetrySource(object):
|
|||||||
status = Status(status_code=StatusCode.UNSET)
|
status = Status(status_code=StatusCode.UNSET)
|
||||||
|
|
||||||
span.set_status(status)
|
span.set_status(status)
|
||||||
|
|
||||||
# Create the span and log attributes
|
|
||||||
attributes = {
|
|
||||||
"ansible.task.module": task_data.action,
|
|
||||||
"ansible.task.message": message,
|
|
||||||
"ansible.task.name": name,
|
|
||||||
"ansible.task.result": rc,
|
|
||||||
"ansible.task.host.name": host_data.name,
|
|
||||||
"ansible.task.host.status": host_data.status
|
|
||||||
}
|
|
||||||
if isinstance(task_data.args, dict) and "gather_facts" not in task_data.action:
|
if isinstance(task_data.args, dict) and "gather_facts" not in task_data.action:
|
||||||
names = tuple(self.transform_ansible_unicode_to_str(k) for k in task_data.args.keys())
|
names = tuple(self.transform_ansible_unicode_to_str(k) for k in task_data.args.keys())
|
||||||
values = tuple(self.transform_ansible_unicode_to_str(k) for k in task_data.args.values())
|
values = tuple(self.transform_ansible_unicode_to_str(k) for k in task_data.args.values())
|
||||||
attributes[("ansible.task.args.name")] = names
|
self.set_span_attribute(span, ("ansible.task.args.name"), names)
|
||||||
attributes[("ansible.task.args.value")] = values
|
self.set_span_attribute(span, ("ansible.task.args.value"), values)
|
||||||
|
self.set_span_attribute(span, "ansible.task.module", task_data.action)
|
||||||
self.set_span_attributes(span, attributes)
|
self.set_span_attribute(span, "ansible.task.message", message)
|
||||||
|
self.set_span_attribute(span, "ansible.task.name", name)
|
||||||
|
self.set_span_attribute(span, "ansible.task.result", rc)
|
||||||
|
self.set_span_attribute(span, "ansible.task.host.name", host_data.name)
|
||||||
|
self.set_span_attribute(span, "ansible.task.host.status", host_data.status)
|
||||||
# This will allow to enrich the service map
|
# This will allow to enrich the service map
|
||||||
self.add_attributes_for_service_map_if_possible(span, task_data)
|
self.add_attributes_for_service_map_if_possible(span, task_data)
|
||||||
# Send logs
|
# Send logs
|
||||||
if not disable_logs:
|
if not disable_logs:
|
||||||
# This will avoid populating span attributes to the logs
|
span.add_event(task_data.dump)
|
||||||
span.add_event(task_data.dump, attributes={} if disable_attributes_in_logs else attributes)
|
span.end(end_time=host_data.finish)
|
||||||
span.end(end_time=host_data.finish)
|
|
||||||
|
|
||||||
def set_span_attributes(self, span, attributes):
|
def set_span_attribute(self, span, attributeName, attributeValue):
|
||||||
""" update the span attributes with the given attributes if not None """
|
""" update the span attribute with the given attribute and value if not None """
|
||||||
|
|
||||||
if span is None and self._display is not None:
|
if span is None and self._display is not None:
|
||||||
self._display.warning('span object is None. Please double check if that is expected.')
|
self._display.warning('span object is None. Please double check if that is expected.')
|
||||||
else:
|
else:
|
||||||
if attributes is not None:
|
if attributeValue is not None:
|
||||||
span.set_attributes(attributes)
|
span.set_attribute(attributeName, attributeValue)
|
||||||
|
|
||||||
def add_attributes_for_service_map_if_possible(self, span, task_data):
|
def add_attributes_for_service_map_if_possible(self, span, task_data):
|
||||||
"""Update the span attributes with the service that the task interacted with, if possible."""
|
"""Update the span attributes with the service that the task interacted with, if possible."""
|
||||||
|
|
||||||
redacted_url = self.parse_and_redact_url_if_possible(task_data.args)
|
redacted_url = self.parse_and_redact_url_if_possible(task_data.args)
|
||||||
if redacted_url:
|
if redacted_url:
|
||||||
span.set_attribute("http.url", redacted_url.geturl())
|
self.set_span_attribute(span, "http.url", redacted_url.geturl())
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parse_and_redact_url_if_possible(args):
|
def parse_and_redact_url_if_possible(args):
|
||||||
@@ -453,7 +434,6 @@ class CallbackModule(CallbackBase):
|
|||||||
def __init__(self, display=None):
|
def __init__(self, display=None):
|
||||||
super(CallbackModule, self).__init__(display=display)
|
super(CallbackModule, self).__init__(display=display)
|
||||||
self.hide_task_arguments = None
|
self.hide_task_arguments = None
|
||||||
self.disable_attributes_in_logs = None
|
|
||||||
self.disable_logs = None
|
self.disable_logs = None
|
||||||
self.otel_service_name = None
|
self.otel_service_name = None
|
||||||
self.ansible_playbook = None
|
self.ansible_playbook = None
|
||||||
@@ -485,8 +465,6 @@ class CallbackModule(CallbackBase):
|
|||||||
|
|
||||||
self.hide_task_arguments = self.get_option('hide_task_arguments')
|
self.hide_task_arguments = self.get_option('hide_task_arguments')
|
||||||
|
|
||||||
self.disable_attributes_in_logs = self.get_option('disable_attributes_in_logs')
|
|
||||||
|
|
||||||
self.disable_logs = self.get_option('disable_logs')
|
self.disable_logs = self.get_option('disable_logs')
|
||||||
|
|
||||||
self.otel_service_name = self.get_option('otel_service_name')
|
self.otel_service_name = self.get_option('otel_service_name')
|
||||||
@@ -584,8 +562,7 @@ class CallbackModule(CallbackBase):
|
|||||||
self.tasks_data,
|
self.tasks_data,
|
||||||
status,
|
status,
|
||||||
self.traceparent,
|
self.traceparent,
|
||||||
self.disable_logs,
|
self.disable_logs
|
||||||
self.disable_attributes_in_logs
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def v2_runner_on_async_failed(self, result, **kwargs):
|
def v2_runner_on_async_failed(self, result, **kwargs):
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ class CallbackModule(CallbackBase):
|
|||||||
line_length = 120
|
line_length = 120
|
||||||
if self.last_skipped:
|
if self.last_skipped:
|
||||||
print()
|
print()
|
||||||
line = "# {0} ".format(task_name)
|
msg = colorize("# {0} {1}".format(task_name,
|
||||||
msg = colorize("{0}{1}".format(line, '*' * (line_length - len(line))), 'bold')
|
'*' * (line_length - len(task_name))), 'bold')
|
||||||
print(msg)
|
print(msg)
|
||||||
|
|
||||||
def _indent_text(self, text, indent_level):
|
def _indent_text(self, text, indent_level):
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ DOCUMENTATION = '''
|
|||||||
key: authtoken
|
key: authtoken
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description: Whether to validate certificates for connections to HEC. It is not recommended to set to
|
description: Whether to validate certificates for connections to HEC. It is not recommended to set to
|
||||||
V(false) except when you are sure that nobody can intercept the connection
|
C(false) except when you are sure that nobody can intercept the connection
|
||||||
between this plugin and HEC, as setting it to V(false) allows man-in-the-middle attacks!
|
between this plugin and HEC, as setting it to C(false) allows man-in-the-middle attacks!
|
||||||
env:
|
env:
|
||||||
- name: SPLUNK_VALIDATE_CERTS
|
- name: SPLUNK_VALIDATE_CERTS
|
||||||
ini:
|
ini:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = '''
|
||||||
name: sumologic
|
name: sumologic
|
||||||
type: notification
|
type: notification
|
||||||
short_description: Sends task result events to Sumologic
|
short_description: Sends task result events to Sumologic
|
||||||
@@ -15,8 +15,8 @@ description:
|
|||||||
- This callback plugin will send task results as JSON formatted events to a Sumologic HTTP collector source.
|
- This callback plugin will send task results as JSON formatted events to a Sumologic HTTP collector source.
|
||||||
requirements:
|
requirements:
|
||||||
- Whitelisting this callback plugin
|
- Whitelisting this callback plugin
|
||||||
- 'Create a HTTP collector source in Sumologic and specify a custom timestamp format of V(yyyy-MM-dd HH:mm:ss ZZZZ) and a custom timestamp locator
|
- 'Create a HTTP collector source in Sumologic and specify a custom timestamp format of C(yyyy-MM-dd HH:mm:ss ZZZZ) and a custom timestamp locator
|
||||||
of V("timestamp": "(.*\)")'
|
of C("timestamp": "(.*)")'
|
||||||
options:
|
options:
|
||||||
url:
|
url:
|
||||||
description: URL to the Sumologic HTTP collector source.
|
description: URL to the Sumologic HTTP collector source.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2023, Al Bowles <@akatch>
|
# Copyright (c) 2017, Allyson Bowles <@akatch>
|
||||||
# Copyright (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
|
# Copyright (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
|
||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
|||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
name: unixy
|
name: unixy
|
||||||
type: stdout
|
type: stdout
|
||||||
author: Al Bowles (@akatch)
|
author: Allyson Bowles (@akatch)
|
||||||
short_description: condensed Ansible output
|
short_description: condensed Ansible output
|
||||||
description:
|
description:
|
||||||
- Consolidated Ansible output in the style of LINUX/UNIX startup logs.
|
- Consolidated Ansible output in the style of LINUX/UNIX startup logs.
|
||||||
@@ -40,6 +40,7 @@ class CallbackModule(CallbackModule_default):
|
|||||||
- Only display task names if the task runs on at least one host
|
- Only display task names if the task runs on at least one host
|
||||||
- Add option to display all hostnames on a single line in the appropriate result color (failures may have a separate line)
|
- Add option to display all hostnames on a single line in the appropriate result color (failures may have a separate line)
|
||||||
- Consolidate stats display
|
- Consolidate stats display
|
||||||
|
- Display whether run is in --check mode
|
||||||
- Don't show play name if no hosts found
|
- Don't show play name if no hosts found
|
||||||
'''
|
'''
|
||||||
|
|
||||||
@@ -91,31 +92,19 @@ class CallbackModule(CallbackModule_default):
|
|||||||
def v2_playbook_on_task_start(self, task, is_conditional):
|
def v2_playbook_on_task_start(self, task, is_conditional):
|
||||||
self._get_task_display_name(task)
|
self._get_task_display_name(task)
|
||||||
if self.task_display_name is not None:
|
if self.task_display_name is not None:
|
||||||
if task.check_mode and self.get_option('check_mode_markers'):
|
self._display.display("%s..." % self.task_display_name)
|
||||||
self._display.display("%s (check mode)..." % self.task_display_name)
|
|
||||||
else:
|
|
||||||
self._display.display("%s..." % self.task_display_name)
|
|
||||||
|
|
||||||
def v2_playbook_on_handler_task_start(self, task):
|
def v2_playbook_on_handler_task_start(self, task):
|
||||||
self._get_task_display_name(task)
|
self._get_task_display_name(task)
|
||||||
if self.task_display_name is not None:
|
if self.task_display_name is not None:
|
||||||
if task.check_mode and self.get_option('check_mode_markers'):
|
self._display.display("%s (via handler)... " % self.task_display_name)
|
||||||
self._display.display("%s (via handler in check mode)... " % self.task_display_name)
|
|
||||||
else:
|
|
||||||
self._display.display("%s (via handler)... " % self.task_display_name)
|
|
||||||
|
|
||||||
def v2_playbook_on_play_start(self, play):
|
def v2_playbook_on_play_start(self, play):
|
||||||
name = play.get_name().strip()
|
name = play.get_name().strip()
|
||||||
if play.check_mode and self.get_option('check_mode_markers'):
|
if name and play.hosts:
|
||||||
if name and play.hosts:
|
msg = u"\n- %s on hosts: %s -" % (name, ",".join(play.hosts))
|
||||||
msg = u"\n- %s (in check mode) on hosts: %s -" % (name, ",".join(play.hosts))
|
|
||||||
else:
|
|
||||||
msg = u"- check mode -"
|
|
||||||
else:
|
else:
|
||||||
if name and play.hosts:
|
msg = u"---"
|
||||||
msg = u"\n- %s on hosts: %s -" % (name, ",".join(play.hosts))
|
|
||||||
else:
|
|
||||||
msg = u"---"
|
|
||||||
|
|
||||||
self._display.display(msg)
|
self._display.display(msg)
|
||||||
|
|
||||||
@@ -238,10 +227,8 @@ class CallbackModule(CallbackModule_default):
|
|||||||
self._display.display(" Ran out of hosts!", color=C.COLOR_ERROR)
|
self._display.display(" Ran out of hosts!", color=C.COLOR_ERROR)
|
||||||
|
|
||||||
def v2_playbook_on_start(self, playbook):
|
def v2_playbook_on_start(self, playbook):
|
||||||
if context.CLIARGS['check'] and self.get_option('check_mode_markers'):
|
# TODO display whether this run is happening in check mode
|
||||||
self._display.display("Executing playbook %s in check mode" % basename(playbook._file_name))
|
self._display.display("Executing playbook %s" % basename(playbook._file_name))
|
||||||
else:
|
|
||||||
self._display.display("Executing playbook %s" % basename(playbook._file_name))
|
|
||||||
|
|
||||||
# show CLI arguments
|
# show CLI arguments
|
||||||
if self._display.verbosity > 3:
|
if self._display.verbosity > 3:
|
||||||
|
|||||||
@@ -46,42 +46,8 @@ DOCUMENTATION = '''
|
|||||||
vars:
|
vars:
|
||||||
- name: ansible_chroot_exe
|
- name: ansible_chroot_exe
|
||||||
default: chroot
|
default: chroot
|
||||||
disable_root_check:
|
|
||||||
description:
|
|
||||||
- Do not check that the user is not root.
|
|
||||||
ini:
|
|
||||||
- section: chroot_connection
|
|
||||||
key: disable_root_check
|
|
||||||
env:
|
|
||||||
- name: ANSIBLE_CHROOT_DISABLE_ROOT_CHECK
|
|
||||||
vars:
|
|
||||||
- name: ansible_chroot_disable_root_check
|
|
||||||
default: false
|
|
||||||
type: bool
|
|
||||||
version_added: 7.3.0
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r"""
|
|
||||||
# Plugin requires root privileges for chroot, -E preserves your env (and location of ~/.ansible):
|
|
||||||
# sudo -E ansible-playbook ...
|
|
||||||
#
|
|
||||||
# Static inventory file
|
|
||||||
# [chroots]
|
|
||||||
# /path/to/debootstrap
|
|
||||||
# /path/to/feboostrap
|
|
||||||
# /path/to/lxc-image
|
|
||||||
# /path/to/chroot
|
|
||||||
|
|
||||||
# playbook
|
|
||||||
---
|
|
||||||
- hosts: chroots
|
|
||||||
connection: community.general.chroot
|
|
||||||
tasks:
|
|
||||||
- debug:
|
|
||||||
msg: "This is coming from chroot environment"
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -115,7 +81,11 @@ class Connection(ConnectionBase):
|
|||||||
|
|
||||||
self.chroot = self._play_context.remote_addr
|
self.chroot = self._play_context.remote_addr
|
||||||
|
|
||||||
# do some trivial checks for ensuring 'host' is actually a chroot'able dir
|
if os.geteuid() != 0:
|
||||||
|
raise AnsibleError("chroot connection requires running as root")
|
||||||
|
|
||||||
|
# we're running as root on the local system so do some
|
||||||
|
# trivial checks for ensuring 'host' is actually a chroot'able dir
|
||||||
if not os.path.isdir(self.chroot):
|
if not os.path.isdir(self.chroot):
|
||||||
raise AnsibleError("%s is not a directory" % self.chroot)
|
raise AnsibleError("%s is not a directory" % self.chroot)
|
||||||
|
|
||||||
@@ -129,11 +99,6 @@ class Connection(ConnectionBase):
|
|||||||
|
|
||||||
def _connect(self):
|
def _connect(self):
|
||||||
""" connect to the chroot """
|
""" connect to the chroot """
|
||||||
if not self.get_option('disable_root_check') and os.geteuid() != 0:
|
|
||||||
raise AnsibleError(
|
|
||||||
"chroot connection requires running as root. "
|
|
||||||
"You can override this check with the `disable_root_check` option.")
|
|
||||||
|
|
||||||
if os.path.isabs(self.get_option('chroot_exe')):
|
if os.path.isabs(self.get_option('chroot_exe')):
|
||||||
self.chroot_cmd = self.get_option('chroot_exe')
|
self.chroot_cmd = self.get_option('chroot_exe')
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class Connection(ConnectionBase):
|
|||||||
if in_data:
|
if in_data:
|
||||||
raise AnsibleError("Internal Error: this module does not support optimized module pipelining")
|
raise AnsibleError("Internal Error: this module does not support optimized module pipelining")
|
||||||
|
|
||||||
# totally ignores privilege escalation
|
# totally ignores privlege escalation
|
||||||
display.vvv("EXEC %s" % cmd, host=self.host)
|
display.vvv("EXEC %s" % cmd, host=self.host)
|
||||||
p = self.client.command.run(cmd)[self.host]
|
p = self.client.command.run(cmd)[self.host]
|
||||||
return p[0], p[1], p[2]
|
return p[0], p[1], p[2]
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ DOCUMENTATION = '''
|
|||||||
- Container identifier
|
- Container identifier
|
||||||
default: inventory_hostname
|
default: inventory_hostname
|
||||||
vars:
|
vars:
|
||||||
- name: inventory_hostname
|
|
||||||
- name: ansible_host
|
- name: ansible_host
|
||||||
- name: ansible_lxc_host
|
- name: ansible_lxc_host
|
||||||
executable:
|
executable:
|
||||||
@@ -60,7 +59,7 @@ class Connection(ConnectionBase):
|
|||||||
def __init__(self, play_context, new_stdin, *args, **kwargs):
|
def __init__(self, play_context, new_stdin, *args, **kwargs):
|
||||||
super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs)
|
super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs)
|
||||||
|
|
||||||
self.container_name = None
|
self.container_name = self._play_context.remote_addr
|
||||||
self.container = None
|
self.container = None
|
||||||
|
|
||||||
def _connect(self):
|
def _connect(self):
|
||||||
@@ -68,14 +67,12 @@ class Connection(ConnectionBase):
|
|||||||
super(Connection, self)._connect()
|
super(Connection, self)._connect()
|
||||||
|
|
||||||
if not HAS_LIBLXC:
|
if not HAS_LIBLXC:
|
||||||
msg = "lxc python bindings are not installed"
|
msg = "lxc bindings for python2 are not installed"
|
||||||
raise errors.AnsibleError(msg)
|
raise errors.AnsibleError(msg)
|
||||||
|
|
||||||
if self.container:
|
if self.container:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.container_name = self.get_option('remote_addr')
|
|
||||||
|
|
||||||
self._display.vvv("THIS IS A LOCAL LXC DIR", host=self.container_name)
|
self._display.vvv("THIS IS A LOCAL LXC DIR", host=self.container_name)
|
||||||
self.container = _lxc.Container(self.container_name)
|
self.container = _lxc.Container(self.container_name)
|
||||||
if self.container.state == "STOPPED":
|
if self.container.state == "STOPPED":
|
||||||
@@ -120,7 +117,7 @@ class Connection(ConnectionBase):
|
|||||||
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
||||||
|
|
||||||
# python2-lxc needs bytes. python3-lxc needs text.
|
# python2-lxc needs bytes. python3-lxc needs text.
|
||||||
executable = to_native(self.get_option('executable'), errors='surrogate_or_strict')
|
executable = to_native(self._play_context.executable, errors='surrogate_or_strict')
|
||||||
local_cmd = [executable, '-c', to_native(cmd, errors='surrogate_or_strict')]
|
local_cmd = [executable, '-c', to_native(cmd, errors='surrogate_or_strict')]
|
||||||
|
|
||||||
read_stdout, write_stdout = None, None
|
read_stdout, write_stdout = None, None
|
||||||
|
|||||||
@@ -15,40 +15,40 @@ class ModuleDocFragment(object):
|
|||||||
options:
|
options:
|
||||||
alicloud_access_key:
|
alicloud_access_key:
|
||||||
description:
|
description:
|
||||||
- Alibaba Cloud access key. If not set then the value of environment variable E(ALICLOUD_ACCESS_KEY),
|
- Alibaba Cloud access key. If not set then the value of environment variable C(ALICLOUD_ACCESS_KEY),
|
||||||
E(ALICLOUD_ACCESS_KEY_ID) will be used instead.
|
C(ALICLOUD_ACCESS_KEY_ID) will be used instead.
|
||||||
aliases: ['access_key_id', 'access_key']
|
aliases: ['access_key_id', 'access_key']
|
||||||
type: str
|
type: str
|
||||||
alicloud_secret_key:
|
alicloud_secret_key:
|
||||||
description:
|
description:
|
||||||
- Alibaba Cloud secret key. If not set then the value of environment variable E(ALICLOUD_SECRET_KEY),
|
- Alibaba Cloud secret key. If not set then the value of environment variable C(ALICLOUD_SECRET_KEY),
|
||||||
E(ALICLOUD_SECRET_ACCESS_KEY) will be used instead.
|
C(ALICLOUD_SECRET_ACCESS_KEY) will be used instead.
|
||||||
aliases: ['secret_access_key', 'secret_key']
|
aliases: ['secret_access_key', 'secret_key']
|
||||||
type: str
|
type: str
|
||||||
alicloud_region:
|
alicloud_region:
|
||||||
description:
|
description:
|
||||||
- The Alibaba Cloud region to use. If not specified then the value of environment variable
|
- The Alibaba Cloud region to use. If not specified then the value of environment variable
|
||||||
E(ALICLOUD_REGION), E(ALICLOUD_REGION_ID) will be used instead.
|
C(ALICLOUD_REGION), C(ALICLOUD_REGION_ID) will be used instead.
|
||||||
aliases: ['region', 'region_id']
|
aliases: ['region', 'region_id']
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
alicloud_security_token:
|
alicloud_security_token:
|
||||||
description:
|
description:
|
||||||
- The Alibaba Cloud security token. If not specified then the value of environment variable
|
- The Alibaba Cloud security token. If not specified then the value of environment variable
|
||||||
E(ALICLOUD_SECURITY_TOKEN) will be used instead.
|
C(ALICLOUD_SECURITY_TOKEN) will be used instead.
|
||||||
aliases: ['security_token']
|
aliases: ['security_token']
|
||||||
type: str
|
type: str
|
||||||
alicloud_assume_role:
|
alicloud_assume_role:
|
||||||
description:
|
description:
|
||||||
- If provided with a role ARN, Ansible will attempt to assume this role using the supplied credentials.
|
- If provided with a role ARN, Ansible will attempt to assume this role using the supplied credentials.
|
||||||
- The nested assume_role block supports C(alicloud_assume_role_arn), C(alicloud_assume_role_session_name),
|
- The nested assume_role block supports I(alicloud_assume_role_arn), I(alicloud_assume_role_session_name),
|
||||||
C(alicloud_assume_role_session_expiration) and C(alicloud_assume_role_policy).
|
I(alicloud_assume_role_session_expiration) and I(alicloud_assume_role_policy)
|
||||||
type: dict
|
type: dict
|
||||||
aliases: ['assume_role']
|
aliases: ['assume_role']
|
||||||
alicloud_assume_role_arn:
|
alicloud_assume_role_arn:
|
||||||
description:
|
description:
|
||||||
- The Alibaba Cloud role_arn. The ARN of the role to assume. If ARN is set to an empty string,
|
- The Alibaba Cloud role_arn. The ARN of the role to assume. If ARN is set to an empty string,
|
||||||
it does not perform role switching. It supports environment variable E(ALICLOUD_ASSUME_ROLE_ARN).
|
it does not perform role switching. It supports environment variable ALICLOUD_ASSUME_ROLE_ARN.
|
||||||
ansible will execute with provided credentials.
|
ansible will execute with provided credentials.
|
||||||
aliases: ['assume_role_arn']
|
aliases: ['assume_role_arn']
|
||||||
type: str
|
type: str
|
||||||
@@ -56,14 +56,14 @@ options:
|
|||||||
description:
|
description:
|
||||||
- The Alibaba Cloud session_name. The session name to use when assuming the role. If omitted,
|
- The Alibaba Cloud session_name. The session name to use when assuming the role. If omitted,
|
||||||
'ansible' is passed to the AssumeRole call as session name. It supports environment variable
|
'ansible' is passed to the AssumeRole call as session name. It supports environment variable
|
||||||
E(ALICLOUD_ASSUME_ROLE_SESSION_NAME).
|
ALICLOUD_ASSUME_ROLE_SESSION_NAME
|
||||||
aliases: ['assume_role_session_name']
|
aliases: ['assume_role_session_name']
|
||||||
type: str
|
type: str
|
||||||
alicloud_assume_role_session_expiration:
|
alicloud_assume_role_session_expiration:
|
||||||
description:
|
description:
|
||||||
- The Alibaba Cloud session_expiration. The time after which the established session for assuming
|
- The Alibaba Cloud session_expiration. The time after which the established session for assuming
|
||||||
role expires. Valid value range 900-3600 seconds. Default to 3600 (in this case Alicloud use own default
|
role expires. Valid value range 900-3600 seconds. Default to 3600 (in this case Alicloud use own default
|
||||||
value). It supports environment variable E(ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION).
|
value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION
|
||||||
aliases: ['assume_role_session_expiration']
|
aliases: ['assume_role_session_expiration']
|
||||||
type: int
|
type: int
|
||||||
ecs_role_name:
|
ecs_role_name:
|
||||||
@@ -79,11 +79,11 @@ options:
|
|||||||
profile:
|
profile:
|
||||||
description:
|
description:
|
||||||
- This is the Alicloud profile name as set in the shared credentials file. It can also be sourced from the
|
- This is the Alicloud profile name as set in the shared credentials file. It can also be sourced from the
|
||||||
E(ALICLOUD_PROFILE) environment variable.
|
ALICLOUD_PROFILE environment variable.
|
||||||
type: str
|
type: str
|
||||||
shared_credentials_file:
|
shared_credentials_file:
|
||||||
description:
|
description:
|
||||||
- This is the path to the shared credentials file. It can also be sourced from the E(ALICLOUD_SHARED_CREDENTIALS_FILE)
|
- This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE
|
||||||
environment variable.
|
environment variable.
|
||||||
- If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
|
- If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
|
||||||
type: str
|
type: str
|
||||||
@@ -94,16 +94,16 @@ requirements:
|
|||||||
notes:
|
notes:
|
||||||
- If parameters are not set within the module, the following
|
- If parameters are not set within the module, the following
|
||||||
environment variables can be used in decreasing order of precedence
|
environment variables can be used in decreasing order of precedence
|
||||||
E(ALICLOUD_ACCESS_KEY) or E(ALICLOUD_ACCESS_KEY_ID),
|
C(ALICLOUD_ACCESS_KEY) or C(ALICLOUD_ACCESS_KEY_ID),
|
||||||
E(ALICLOUD_SECRET_KEY) or E(ALICLOUD_SECRET_ACCESS_KEY),
|
C(ALICLOUD_SECRET_KEY) or C(ALICLOUD_SECRET_ACCESS_KEY),
|
||||||
E(ALICLOUD_REGION) or E(ALICLOUD_REGION_ID),
|
C(ALICLOUD_REGION) or C(ALICLOUD_REGION_ID),
|
||||||
E(ALICLOUD_SECURITY_TOKEN),
|
C(ALICLOUD_SECURITY_TOKEN),
|
||||||
E(ALICLOUD_ECS_ROLE_NAME),
|
C(ALICLOUD_ECS_ROLE_NAME),
|
||||||
E(ALICLOUD_SHARED_CREDENTIALS_FILE),
|
C(ALICLOUD_SHARED_CREDENTIALS_FILE),
|
||||||
E(ALICLOUD_PROFILE),
|
C(ALICLOUD_PROFILE),
|
||||||
E(ALICLOUD_ASSUME_ROLE_ARN),
|
C(ALICLOUD_ASSUME_ROLE_ARN),
|
||||||
E(ALICLOUD_ASSUME_ROLE_SESSION_NAME),
|
C(ALICLOUD_ASSUME_ROLE_SESSION_NAME),
|
||||||
E(ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION),
|
C(ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION),
|
||||||
- E(ALICLOUD_REGION) or E(ALICLOUD_REGION_ID) can be typically be used to specify the
|
- C(ALICLOUD_REGION) or C(ALICLOUD_REGION_ID) can be typically be used to specify the
|
||||||
ALICLOUD region, when required, but this can also be configured in the footmark config file
|
ALICLOUD region, when required, but this can also be configured in the footmark config file
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -16,25 +16,25 @@ options:
|
|||||||
client_id:
|
client_id:
|
||||||
description:
|
description:
|
||||||
- The OAuth consumer key.
|
- The OAuth consumer key.
|
||||||
- If not set the environment variable E(BITBUCKET_CLIENT_ID) will be used.
|
- If not set the environment variable C(BITBUCKET_CLIENT_ID) will be used.
|
||||||
type: str
|
type: str
|
||||||
client_secret:
|
client_secret:
|
||||||
description:
|
description:
|
||||||
- The OAuth consumer secret.
|
- The OAuth consumer secret.
|
||||||
- If not set the environment variable E(BITBUCKET_CLIENT_SECRET) will be used.
|
- If not set the environment variable C(BITBUCKET_CLIENT_SECRET) will be used.
|
||||||
type: str
|
type: str
|
||||||
user:
|
user:
|
||||||
description:
|
description:
|
||||||
- The username.
|
- The username.
|
||||||
- If not set the environment variable E(BITBUCKET_USERNAME) will be used.
|
- If not set the environment variable C(BITBUCKET_USERNAME) will be used.
|
||||||
- O(ignore:username) is an alias of O(user) since community.general 6.0.0. It was an alias of O(workspace) before.
|
- I(username) is an alias of I(user) since community.genreal 6.0.0. It was an alias of I(workspace) before.
|
||||||
type: str
|
type: str
|
||||||
version_added: 4.0.0
|
version_added: 4.0.0
|
||||||
aliases: [ username ]
|
aliases: [ username ]
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- The App password.
|
- The App password.
|
||||||
- If not set the environment variable E(BITBUCKET_PASSWORD) will be used.
|
- If not set the environment variable C(BITBUCKET_PASSWORD) will be used.
|
||||||
type: str
|
type: str
|
||||||
version_added: 4.0.0
|
version_added: 4.0.0
|
||||||
notes:
|
notes:
|
||||||
|
|||||||
@@ -29,13 +29,13 @@ options:
|
|||||||
mcp_user:
|
mcp_user:
|
||||||
description:
|
description:
|
||||||
- The username used to authenticate to the CloudControl API.
|
- The username used to authenticate to the CloudControl API.
|
||||||
- If not specified, will fall back to E(MCP_USER) from environment variable or C(~/.dimensiondata).
|
- If not specified, will fall back to C(MCP_USER) from environment variable or C(~/.dimensiondata).
|
||||||
type: str
|
type: str
|
||||||
mcp_password:
|
mcp_password:
|
||||||
description:
|
description:
|
||||||
- The password used to authenticate to the CloudControl API.
|
- The password used to authenticate to the CloudControl API.
|
||||||
- If not specified, will fall back to E(MCP_PASSWORD) from environment variable or C(~/.dimensiondata).
|
- If not specified, will fall back to C(MCP_PASSWORD) from environment variable or C(~/.dimensiondata).
|
||||||
- Required if O(mcp_user) is specified.
|
- Required if I(mcp_user) is specified.
|
||||||
type: str
|
type: str
|
||||||
location:
|
location:
|
||||||
description:
|
description:
|
||||||
@@ -44,7 +44,7 @@ options:
|
|||||||
required: true
|
required: true
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If V(false), SSL certificates will not be validated.
|
- If C(false), SSL certificates will not be validated.
|
||||||
- This should only be used on private instances of the CloudControl API that use self-signed certificates.
|
- This should only be used on private instances of the CloudControl API that use self-signed certificates.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ options:
|
|||||||
wait_time:
|
wait_time:
|
||||||
description:
|
description:
|
||||||
- The maximum amount of time (in seconds) to wait for the task to complete.
|
- The maximum amount of time (in seconds) to wait for the task to complete.
|
||||||
- Only applicable if O(wait=true).
|
- Only applicable if I(wait=true).
|
||||||
type: int
|
type: int
|
||||||
default: 600
|
default: 600
|
||||||
wait_poll_interval:
|
wait_poll_interval:
|
||||||
description:
|
description:
|
||||||
- The amount of time (in seconds) to wait between checks for task completion.
|
- The amount of time (in seconds) to wait between checks for task completion.
|
||||||
- Only applicable if O(wait=true).
|
- Only applicable if I(wait=true).
|
||||||
type: int
|
type: int
|
||||||
default: 2
|
default: 2
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -51,16 +51,16 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
notes:
|
notes:
|
||||||
- For authentication, you can set identity_endpoint using the
|
- For authentication, you can set identity_endpoint using the
|
||||||
E(ANSIBLE_HWC_IDENTITY_ENDPOINT) env variable.
|
C(ANSIBLE_HWC_IDENTITY_ENDPOINT) env variable.
|
||||||
- For authentication, you can set user using the
|
- For authentication, you can set user using the
|
||||||
E(ANSIBLE_HWC_USER) env variable.
|
C(ANSIBLE_HWC_USER) env variable.
|
||||||
- For authentication, you can set password using the E(ANSIBLE_HWC_PASSWORD) env
|
- For authentication, you can set password using the C(ANSIBLE_HWC_PASSWORD) env
|
||||||
variable.
|
variable.
|
||||||
- For authentication, you can set domain using the E(ANSIBLE_HWC_DOMAIN) env
|
- For authentication, you can set domain using the C(ANSIBLE_HWC_DOMAIN) env
|
||||||
variable.
|
variable.
|
||||||
- For authentication, you can set project using the E(ANSIBLE_HWC_PROJECT) env
|
- For authentication, you can set project using the C(ANSIBLE_HWC_PROJECT) env
|
||||||
variable.
|
variable.
|
||||||
- For authentication, you can set region using the E(ANSIBLE_HWC_REGION) env variable.
|
- For authentication, you can set region using the C(ANSIBLE_HWC_REGION) env variable.
|
||||||
- Environment variables values will only be used if the playbook values are
|
- Environment variables values will only be used if the playbook values are
|
||||||
not set.
|
not set.
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ options:
|
|||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- Username that will be used to authenticate against InfluxDB server.
|
- Username that will be used to authenticate against InfluxDB server.
|
||||||
- Alias O(login_username) added in Ansible 2.5.
|
- Alias C(login_username) added in Ansible 2.5.
|
||||||
type: str
|
type: str
|
||||||
default: root
|
default: root
|
||||||
aliases: [ login_username ]
|
aliases: [ login_username ]
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Password that will be used to authenticate against InfluxDB server.
|
- Password that will be used to authenticate against InfluxDB server.
|
||||||
- Alias O(login_password) added in Ansible 2.5.
|
- Alias C(login_password) added in Ansible 2.5.
|
||||||
type: str
|
type: str
|
||||||
default: root
|
default: root
|
||||||
aliases: [ login_password ]
|
aliases: [ login_password ]
|
||||||
@@ -47,8 +47,8 @@ options:
|
|||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If set to V(false), the SSL certificates will not be validated.
|
- If set to C(false), the SSL certificates will not be validated.
|
||||||
- This should only set to V(false) used on personally controlled sites using self-signed certificates.
|
- This should only set to C(false) used on personally controlled sites using self-signed certificates.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
ssl:
|
ssl:
|
||||||
@@ -63,7 +63,7 @@ options:
|
|||||||
retries:
|
retries:
|
||||||
description:
|
description:
|
||||||
- Number of retries client will try before aborting.
|
- Number of retries client will try before aborting.
|
||||||
- V(0) indicates try until success.
|
- C(0) indicates try until success.
|
||||||
- Only available when using python-influxdb >= 4.1.0
|
- Only available when using python-influxdb >= 4.1.0
|
||||||
type: int
|
type: int
|
||||||
default: 3
|
default: 3
|
||||||
|
|||||||
@@ -16,61 +16,61 @@ options:
|
|||||||
ipa_port:
|
ipa_port:
|
||||||
description:
|
description:
|
||||||
- Port of FreeIPA / IPA server.
|
- Port of FreeIPA / IPA server.
|
||||||
- If the value is not specified in the task, the value of environment variable E(IPA_PORT) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(IPA_PORT) will be used instead.
|
||||||
- If both the environment variable E(IPA_PORT) and the value are not specified in the task, then default value is set.
|
- If both the environment variable C(IPA_PORT) and the value are not specified in the task, then default value is set.
|
||||||
- Environment variable fallback mechanism is added in Ansible 2.5.
|
- Environment variable fallback mechanism is added in Ansible 2.5.
|
||||||
type: int
|
type: int
|
||||||
default: 443
|
default: 443
|
||||||
ipa_host:
|
ipa_host:
|
||||||
description:
|
description:
|
||||||
- IP or hostname of IPA server.
|
- IP or hostname of IPA server.
|
||||||
- If the value is not specified in the task, the value of environment variable E(IPA_HOST) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(IPA_HOST) will be used instead.
|
||||||
- If both the environment variable E(IPA_HOST) and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server.
|
- If both the environment variable C(IPA_HOST) and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server.
|
||||||
- The relevant entry needed in FreeIPA is the 'ipa-ca' entry.
|
- The relevant entry needed in FreeIPA is the 'ipa-ca' entry.
|
||||||
- If neither the DNS entry, nor the environment E(IPA_HOST), nor the value are available in the task, then the default value will be used.
|
- If neither the DNS entry, nor the environment C(IPA_HOST), nor the value are available in the task, then the default value will be used.
|
||||||
- Environment variable fallback mechanism is added in Ansible 2.5.
|
- Environment variable fallback mechanism is added in Ansible 2.5.
|
||||||
type: str
|
type: str
|
||||||
default: ipa.example.com
|
default: ipa.example.com
|
||||||
ipa_user:
|
ipa_user:
|
||||||
description:
|
description:
|
||||||
- Administrative account used on IPA server.
|
- Administrative account used on IPA server.
|
||||||
- If the value is not specified in the task, the value of environment variable E(IPA_USER) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(IPA_USER) will be used instead.
|
||||||
- If both the environment variable E(IPA_USER) and the value are not specified in the task, then default value is set.
|
- If both the environment variable C(IPA_USER) and the value are not specified in the task, then default value is set.
|
||||||
- Environment variable fallback mechanism is added in Ansible 2.5.
|
- Environment variable fallback mechanism is added in Ansible 2.5.
|
||||||
type: str
|
type: str
|
||||||
default: admin
|
default: admin
|
||||||
ipa_pass:
|
ipa_pass:
|
||||||
description:
|
description:
|
||||||
- Password of administrative user.
|
- Password of administrative user.
|
||||||
- If the value is not specified in the task, the value of environment variable E(IPA_PASS) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(IPA_PASS) will be used instead.
|
||||||
- Note that if the C(urllib_gssapi) library is available, it is possible to use GSSAPI to authenticate to FreeIPA.
|
- Note that if the 'urllib_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA.
|
||||||
- If the environment variable E(KRB5CCNAME) is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server.
|
- If the environment variable C(KRB5CCNAME) is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server.
|
||||||
- If the environment variable E(KRB5_CLIENT_KTNAME) is available, and E(KRB5CCNAME) is not; the module will use this kerberos keytab to authenticate.
|
- If the environment variable C(KRB5_CLIENT_KTNAME) is available, and C(KRB5CCNAME) is not; the module will use this kerberos keytab to authenticate.
|
||||||
- If GSSAPI is not available, the usage of O(ipa_pass) is required.
|
- If GSSAPI is not available, the usage of 'ipa_pass' is required.
|
||||||
- Environment variable fallback mechanism is added in Ansible 2.5.
|
- Environment variable fallback mechanism is added in Ansible 2.5.
|
||||||
type: str
|
type: str
|
||||||
ipa_prot:
|
ipa_prot:
|
||||||
description:
|
description:
|
||||||
- Protocol used by IPA server.
|
- Protocol used by IPA server.
|
||||||
- If the value is not specified in the task, the value of environment variable E(IPA_PROT) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(IPA_PROT) will be used instead.
|
||||||
- If both the environment variable E(IPA_PROT) and the value are not specified in the task, then default value is set.
|
- If both the environment variable C(IPA_PROT) and the value are not specified in the task, then default value is set.
|
||||||
- Environment variable fallback mechanism is added in Ansible 2.5.
|
- Environment variable fallback mechanism is added in Ansible 2.5.
|
||||||
type: str
|
type: str
|
||||||
choices: [ http, https ]
|
choices: [ http, https ]
|
||||||
default: https
|
default: https
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- This only applies if O(ipa_prot) is V(https).
|
- This only applies if C(ipa_prot) is I(https).
|
||||||
- If set to V(false), the SSL certificates will not be validated.
|
- If set to C(false), the SSL certificates will not be validated.
|
||||||
- This should only set to V(false) used on personally controlled sites using self-signed certificates.
|
- This should only set to C(false) used on personally controlled sites using self-signed certificates.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
ipa_timeout:
|
ipa_timeout:
|
||||||
description:
|
description:
|
||||||
- Specifies idle timeout (in seconds) for the connection.
|
- Specifies idle timeout (in seconds) for the connection.
|
||||||
- For bulk operations, you may want to increase this in order to avoid timeout from IPA server.
|
- For bulk operations, you may want to increase this in order to avoid timeout from IPA server.
|
||||||
- If the value is not specified in the task, the value of environment variable E(IPA_TIMEOUT) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(IPA_TIMEOUT) will be used instead.
|
||||||
- If both the environment variable E(IPA_TIMEOUT) and the value are not specified in the task, then default value is set.
|
- If both the environment variable C(IPA_TIMEOUT) and the value are not specified in the task, then default value is set.
|
||||||
type: int
|
type: int
|
||||||
default: 10
|
default: 10
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ options:
|
|||||||
|
|
||||||
auth_client_id:
|
auth_client_id:
|
||||||
description:
|
description:
|
||||||
- OpenID Connect C(client_id) to authenticate to the API with.
|
- OpenID Connect I(client_id) to authenticate to the API with.
|
||||||
type: str
|
type: str
|
||||||
default: admin-cli
|
default: admin-cli
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ options:
|
|||||||
|
|
||||||
auth_client_secret:
|
auth_client_secret:
|
||||||
description:
|
description:
|
||||||
- Client Secret to use in conjunction with O(auth_client_id) (if required).
|
- Client Secret to use in conjunction with I(auth_client_id) (if required).
|
||||||
type: str
|
type: str
|
||||||
|
|
||||||
auth_username:
|
auth_username:
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
bind_pw:
|
bind_pw:
|
||||||
description:
|
description:
|
||||||
- The password to use with O(bind_dn).
|
- The password to use with I(bind_dn).
|
||||||
type: str
|
type: str
|
||||||
default: ''
|
default: ''
|
||||||
ca_path:
|
ca_path:
|
||||||
@@ -29,18 +29,6 @@ options:
|
|||||||
- Set the path to PEM file with CA certs.
|
- Set the path to PEM file with CA certs.
|
||||||
type: path
|
type: path
|
||||||
version_added: "6.5.0"
|
version_added: "6.5.0"
|
||||||
client_cert:
|
|
||||||
type: path
|
|
||||||
description:
|
|
||||||
- PEM formatted certificate chain file to be used for SSL client authentication.
|
|
||||||
- Required if O(client_key) is defined.
|
|
||||||
version_added: "7.1.0"
|
|
||||||
client_key:
|
|
||||||
type: path
|
|
||||||
description:
|
|
||||||
- PEM formatted file that contains your private key to be used for SSL client authentication.
|
|
||||||
- Required if O(client_cert) is defined.
|
|
||||||
version_added: "7.1.0"
|
|
||||||
dn:
|
dn:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
@@ -52,12 +40,12 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Set the referrals chasing behavior.
|
- Set the referrals chasing behavior.
|
||||||
- V(anonymous) follow referrals anonymously. This is the default behavior.
|
- C(anonymous) follow referrals anonymously. This is the default behavior.
|
||||||
- V(disabled) disable referrals chasing. This sets C(OPT_REFERRALS) to off.
|
- C(disabled) disable referrals chasing. This sets C(OPT_REFERRALS) to off.
|
||||||
version_added: 2.0.0
|
version_added: 2.0.0
|
||||||
server_uri:
|
server_uri:
|
||||||
description:
|
description:
|
||||||
- The O(server_uri) parameter may be a comma- or whitespace-separated list of URIs containing only the schema, the host, and the port fields.
|
- The I(server_uri) parameter may be a comma- or whitespace-separated list of URIs containing only the schema, the host, and the port fields.
|
||||||
- The default value lets the underlying LDAP client library look for a UNIX domain socket in its default location.
|
- The default value lets the underlying LDAP client library look for a UNIX domain socket in its default location.
|
||||||
- Note that when using multiple URIs you cannot determine to which URI your client gets connected.
|
- Note that when using multiple URIs you cannot determine to which URI your client gets connected.
|
||||||
- For URIs containing additional fields, particularly when using commas, behavior is undefined.
|
- For URIs containing additional fields, particularly when using commas, behavior is undefined.
|
||||||
@@ -70,13 +58,14 @@ options:
|
|||||||
default: false
|
default: false
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If set to V(false), SSL certificates will not be validated.
|
- If set to C(false), SSL certificates will not be validated.
|
||||||
- This should only be used on sites using self-signed certificates.
|
- This should only be used on sites using self-signed certificates.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
sasl_class:
|
sasl_class:
|
||||||
description:
|
description:
|
||||||
- The class to use for SASL authentication.
|
- The class to use for SASL authentication.
|
||||||
|
- Possible choices are C(external), C(gssapi).
|
||||||
type: str
|
type: str
|
||||||
choices: ['external', 'gssapi']
|
choices: ['external', 'gssapi']
|
||||||
default: external
|
default: external
|
||||||
@@ -84,9 +73,10 @@ options:
|
|||||||
xorder_discovery:
|
xorder_discovery:
|
||||||
description:
|
description:
|
||||||
- Set the behavior on how to process Xordered DNs.
|
- Set the behavior on how to process Xordered DNs.
|
||||||
- V(enable) will perform a C(ONELEVEL) search below the superior RDN to find the matching DN.
|
- C(enable) will perform a C(ONELEVEL) search below the superior RDN to find the matching DN.
|
||||||
- V(disable) will always use the DN unmodified (as passed by the O(dn) parameter).
|
- C(disable) will always use the DN unmodified (as passed by the I(dn) parameter).
|
||||||
- V(auto) will only perform a search if the first RDN does not contain an index number (C({x})).
|
- C(auto) will only perform a search if the first RDN does not contain an index number (C({x})).
|
||||||
|
- Possible choices are C(enable), C(auto), C(disable).
|
||||||
type: str
|
type: str
|
||||||
choices: ['enable', 'auto', 'disable']
|
choices: ['enable', 'auto', 'disable']
|
||||||
default: auto
|
default: auto
|
||||||
|
|||||||
@@ -21,30 +21,30 @@ options:
|
|||||||
suboptions:
|
suboptions:
|
||||||
url:
|
url:
|
||||||
description:
|
description:
|
||||||
- ManageIQ environment URL. E(MIQ_URL) environment variable if set. Otherwise, it is required to pass it.
|
- ManageIQ environment url. C(MIQ_URL) env var if set. otherwise, it is required to pass it.
|
||||||
type: str
|
type: str
|
||||||
required: false
|
required: false
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- ManageIQ username. E(MIQ_USERNAME) environment variable if set. Otherwise, required if no token is passed in.
|
- ManageIQ username. C(MIQ_USERNAME) env var if set. otherwise, required if no token is passed in.
|
||||||
type: str
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- ManageIQ password. E(MIQ_PASSWORD) environment variable if set. Otherwise, required if no token is passed in.
|
- ManageIQ password. C(MIQ_PASSWORD) env var if set. otherwise, required if no token is passed in.
|
||||||
type: str
|
type: str
|
||||||
token:
|
token:
|
||||||
description:
|
description:
|
||||||
- ManageIQ token. E(MIQ_TOKEN) environment variable if set. Otherwise, required if no username or password is passed in.
|
- ManageIQ token. C(MIQ_TOKEN) env var if set. otherwise, required if no username or password is passed in.
|
||||||
type: str
|
type: str
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- Whether SSL certificates should be verified for HTTPS requests.
|
- Whether SSL certificates should be verified for HTTPS requests. defaults to True.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
aliases: [ verify_ssl ]
|
aliases: [ verify_ssl ]
|
||||||
ca_cert:
|
ca_cert:
|
||||||
description:
|
description:
|
||||||
- The path to a CA bundle file or directory with certificates.
|
- The path to a CA bundle file or directory with certificates. defaults to None.
|
||||||
type: str
|
type: str
|
||||||
aliases: [ ca_bundle_path ]
|
aliases: [ ca_bundle_path ]
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,6 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
token:
|
token:
|
||||||
description:
|
description:
|
||||||
- ACL token for authentication.
|
- ACL token for authentification.
|
||||||
type: str
|
type: str
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ options:
|
|||||||
default: true
|
default: true
|
||||||
notes:
|
notes:
|
||||||
- Also see the API documentation on U(https://console.online.net/en/api/)
|
- Also see the API documentation on U(https://console.online.net/en/api/)
|
||||||
- If O(api_token) is not set within the module, the following
|
- If C(api_token) is not set within the module, the following
|
||||||
environment variables can be used in decreasing order of precedence
|
environment variables can be used in decreasing order of precedence
|
||||||
E(ONLINE_TOKEN), E(ONLINE_API_KEY), E(ONLINE_OAUTH_TOKEN), E(ONLINE_API_TOKEN).
|
C(ONLINE_TOKEN), C(ONLINE_API_KEY), C(ONLINE_OAUTH_TOKEN), C(ONLINE_API_TOKEN)
|
||||||
- If one wants to use a different O(api_url) one can also set the E(ONLINE_API_URL)
|
- If one wants to use a different C(api_url) one can also set the C(ONLINE_API_URL)
|
||||||
environment variable.
|
environment variable.
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -15,26 +15,26 @@ options:
|
|||||||
api_url:
|
api_url:
|
||||||
description:
|
description:
|
||||||
- The ENDPOINT URL of the XMLRPC server.
|
- The ENDPOINT URL of the XMLRPC server.
|
||||||
- If not specified then the value of the E(ONE_URL) environment variable, if any, is used.
|
- If not specified then the value of the ONE_URL environment variable, if any, is used.
|
||||||
type: str
|
type: str
|
||||||
aliases:
|
aliases:
|
||||||
- api_endpoint
|
- api_endpoint
|
||||||
api_username:
|
api_username:
|
||||||
description:
|
description:
|
||||||
- The name of the user for XMLRPC authentication.
|
- The name of the user for XMLRPC authentication.
|
||||||
- If not specified then the value of the E(ONE_USERNAME) environment variable, if any, is used.
|
- If not specified then the value of the ONE_USERNAME environment variable, if any, is used.
|
||||||
type: str
|
type: str
|
||||||
api_password:
|
api_password:
|
||||||
description:
|
description:
|
||||||
- The password or token for XMLRPC authentication.
|
- The password or token for XMLRPC authentication.
|
||||||
- If not specified then the value of the E(ONE_PASSWORD) environment variable, if any, is used.
|
- If not specified then the value of the ONE_PASSWORD environment variable, if any, is used.
|
||||||
type: str
|
type: str
|
||||||
aliases:
|
aliases:
|
||||||
- api_token
|
- api_token
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- Whether to validate the TLS/SSL certificates or not.
|
- Whether to validate the SSL certificates or not.
|
||||||
- This parameter is ignored if E(PYTHONHTTPSVERIFY) environment variable is used.
|
- This parameter is ignored if PYTHONHTTPSVERIFY environment variable is used.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
wait_timeout:
|
wait_timeout:
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ options:
|
|||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- Specifies the port to use when building the connection to the remote
|
- Specifies the port to use when building the connection to the remote
|
||||||
device. This value applies to either O(transport=cli) or O(transport=rest). The port
|
device. This value applies to either I(cli) or I(rest). The port
|
||||||
value will default to the appropriate transport common port if
|
value will default to the appropriate transport common port if
|
||||||
none is provided in the task. (cli=22, http=80, https=443). Note
|
none is provided in the task. (cli=22, http=80, https=443). Note
|
||||||
this argument does not affect the SSH transport.
|
this argument does not affect the SSH transport.
|
||||||
@@ -36,15 +36,15 @@ options:
|
|||||||
either the CLI login or the eAPI authentication depending on which
|
either the CLI login or the eAPI authentication depending on which
|
||||||
transport is used. Note this argument does not affect the SSH
|
transport is used. Note this argument does not affect the SSH
|
||||||
transport. If the value is not specified in the task, the value of
|
transport. If the value is not specified in the task, the value of
|
||||||
environment variable E(ANSIBLE_NET_USERNAME) will be used instead.
|
environment variable C(ANSIBLE_NET_USERNAME) will be used instead.
|
||||||
type: str
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Specifies the password to use to authenticate the connection to
|
- Specifies the password to use to authenticate the connection to
|
||||||
the remote device. This is a common argument used for either O(transport=cli)
|
the remote device. This is a common argument used for either I(cli)
|
||||||
or O(transport=rest). Note this argument does not affect the SSH
|
or I(rest) transports. Note this argument does not affect the SSH
|
||||||
transport. If the value is not specified in the task, the value of
|
transport. If the value is not specified in the task, the value of
|
||||||
environment variable E(ANSIBLE_NET_PASSWORD) will be used instead.
|
environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
|
||||||
type: str
|
type: str
|
||||||
timeout:
|
timeout:
|
||||||
description:
|
description:
|
||||||
@@ -56,9 +56,9 @@ options:
|
|||||||
ssh_keyfile:
|
ssh_keyfile:
|
||||||
description:
|
description:
|
||||||
- Specifies the SSH key to use to authenticate the connection to
|
- Specifies the SSH key to use to authenticate the connection to
|
||||||
the remote device. This argument is only used for O(transport=cli).
|
the remote device. This argument is only used for the I(cli)
|
||||||
If the value is not specified in the task, the value of
|
transports. If the value is not specified in the task, the value of
|
||||||
environment variable E(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
||||||
type: path
|
type: path
|
||||||
transport:
|
transport:
|
||||||
description:
|
description:
|
||||||
@@ -71,14 +71,14 @@ options:
|
|||||||
default: ssh
|
default: ssh
|
||||||
use_ssl:
|
use_ssl:
|
||||||
description:
|
description:
|
||||||
- Configures the O(transport) to use SSL if set to V(true) only when the
|
- Configures the I(transport) to use SSL if set to C(true) only when the
|
||||||
O(transport) argument is configured as rest. If the transport
|
I(transport) argument is configured as rest. If the transport
|
||||||
argument is not V(rest), this value is ignored.
|
argument is not I(rest), this value is ignored.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
provider:
|
provider:
|
||||||
description:
|
description:
|
||||||
- Convenience method that allows all C(openswitch) arguments to be passed as
|
- Convenience method that allows all I(openswitch) arguments to be passed as
|
||||||
a dict object. All constraints (required, choices, etc) must be
|
a dict object. All constraints (required, choices, etc) must be
|
||||||
met either by individual arguments or values in this dict.
|
met either by individual arguments or values in this dict.
|
||||||
type: dict
|
type: dict
|
||||||
|
|||||||
@@ -18,28 +18,28 @@ class ModuleDocFragment(object):
|
|||||||
options:
|
options:
|
||||||
config_file_location:
|
config_file_location:
|
||||||
description:
|
description:
|
||||||
- Path to configuration file. If not set then the value of the E(OCI_CONFIG_FILE) environment variable,
|
- Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable,
|
||||||
if any, is used. Otherwise, defaults to ~/.oci/config.
|
if any, is used. Otherwise, defaults to ~/.oci/config.
|
||||||
type: str
|
type: str
|
||||||
config_profile_name:
|
config_profile_name:
|
||||||
description:
|
description:
|
||||||
- The profile to load from the config file referenced by O(config_file_location). If not set, then the
|
- The profile to load from the config file referenced by C(config_file_location). If not set, then the
|
||||||
value of the E(OCI_CONFIG_PROFILE) environment variable, if any, is used. Otherwise, defaults to the
|
value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the
|
||||||
"DEFAULT" profile in O(config_file_location).
|
"DEFAULT" profile in C(config_file_location).
|
||||||
default: "DEFAULT"
|
default: "DEFAULT"
|
||||||
type: str
|
type: str
|
||||||
api_user:
|
api_user:
|
||||||
description:
|
description:
|
||||||
- The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the
|
- The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the
|
||||||
value of the E(OCI_USER_OCID) environment variable, if any, is used. This option is required if the user
|
value of the OCI_USER_OCID environment variable, if any, is used. This option is required if the user
|
||||||
is not specified through a configuration file (See O(config_file_location)). To get the user's OCID,
|
is not specified through a configuration file (See C(config_file_location)). To get the user's OCID,
|
||||||
please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
|
please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
|
||||||
type: str
|
type: str
|
||||||
api_user_fingerprint:
|
api_user_fingerprint:
|
||||||
description:
|
description:
|
||||||
- Fingerprint for the key pair being used. If not set, then the value of the E(OCI_USER_FINGERPRINT)
|
- Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT
|
||||||
environment variable, if any, is used. This option is required if the key fingerprint is not
|
environment variable, if any, is used. This option is required if the key fingerprint is not
|
||||||
specified through a configuration file (See O(config_file_location)). To get the key pair's
|
specified through a configuration file (See C(config_file_location)). To get the key pair's
|
||||||
fingerprint value please refer
|
fingerprint value please refer
|
||||||
U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
|
U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
|
||||||
type: str
|
type: str
|
||||||
@@ -47,21 +47,21 @@ class ModuleDocFragment(object):
|
|||||||
description:
|
description:
|
||||||
- Full path and filename of the private key (in PEM format). If not set, then the value of the
|
- Full path and filename of the private key (in PEM format). If not set, then the value of the
|
||||||
OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is
|
OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is
|
||||||
not specified through a configuration file (See O(config_file_location)). If the key is encrypted
|
not specified through a configuration file (See C(config_file_location)). If the key is encrypted
|
||||||
with a pass-phrase, the O(api_user_key_pass_phrase) option must also be provided.
|
with a pass-phrase, the C(api_user_key_pass_phrase) option must also be provided.
|
||||||
type: path
|
type: path
|
||||||
api_user_key_pass_phrase:
|
api_user_key_pass_phrase:
|
||||||
description:
|
description:
|
||||||
- Passphrase used by the key referenced in O(api_user_key_file), if it is encrypted. If not set, then
|
- Passphrase used by the key referenced in C(api_user_key_file), if it is encrypted. If not set, then
|
||||||
the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the
|
the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the
|
||||||
key passphrase is not specified through a configuration file (See O(config_file_location)).
|
key passphrase is not specified through a configuration file (See C(config_file_location)).
|
||||||
type: str
|
type: str
|
||||||
auth_type:
|
auth_type:
|
||||||
description:
|
description:
|
||||||
- The type of authentication to use for making API requests. By default O(auth_type=api_key) based
|
- The type of authentication to use for making API requests. By default C(auth_type="api_key") based
|
||||||
authentication is performed and the API key (see O(api_user_key_file)) in your config file will be
|
authentication is performed and the API key (see I(api_user_key_file)) in your config file will be
|
||||||
used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE,
|
used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE,
|
||||||
if any, is used. Use O(auth_type=instance_principal) to use instance principal based authentication
|
if any, is used. Use C(auth_type="instance_principal") to use instance principal based authentication
|
||||||
when running ansible playbooks within an OCI compute instance.
|
when running ansible playbooks within an OCI compute instance.
|
||||||
choices: ['api_key', 'instance_principal']
|
choices: ['api_key', 'instance_principal']
|
||||||
default: 'api_key'
|
default: 'api_key'
|
||||||
@@ -70,14 +70,14 @@ class ModuleDocFragment(object):
|
|||||||
description:
|
description:
|
||||||
- OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is
|
- OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is
|
||||||
used. This option is required if the tenancy OCID is not specified through a configuration file
|
used. This option is required if the tenancy OCID is not specified through a configuration file
|
||||||
(See O(config_file_location)). To get the tenancy OCID, please refer
|
(See C(config_file_location)). To get the tenancy OCID, please refer
|
||||||
U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm)
|
U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm)
|
||||||
type: str
|
type: str
|
||||||
region:
|
region:
|
||||||
description:
|
description:
|
||||||
- The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the
|
- The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the
|
||||||
value of the OCI_REGION variable, if any, is used. This option is required if the region is
|
value of the OCI_REGION variable, if any, is used. This option is required if the region is
|
||||||
not specified through a configuration file (See O(config_file_location)). Please refer to
|
not specified through a configuration file (See C(config_file_location)). Please refer to
|
||||||
U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm) for more information
|
U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm) for more information
|
||||||
on OCI regions.
|
on OCI regions.
|
||||||
type: str
|
type: str
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ class ModuleDocFragment(object):
|
|||||||
description: Whether to attempt non-idempotent creation of a resource. By default, create resource is an
|
description: Whether to attempt non-idempotent creation of a resource. By default, create resource is an
|
||||||
idempotent operation, and doesn't create the resource if it already exists. Setting this option
|
idempotent operation, and doesn't create the resource if it already exists. Setting this option
|
||||||
to true, forcefully creates a copy of the resource, even if it already exists.This option is
|
to true, forcefully creates a copy of the resource, even if it already exists.This option is
|
||||||
mutually exclusive with O(key_by).
|
mutually exclusive with I(key_by).
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: bool
|
||||||
key_by:
|
key_by:
|
||||||
description: The list of comma-separated attributes of this resource which should be used to uniquely
|
description: The list of comma-separated attributes of this resource which should be used to uniquely
|
||||||
identify an instance of the resource. By default, all the attributes of a resource except
|
identify an instance of the resource. By default, all the attributes of a resource except
|
||||||
O(freeform_tags) are used to uniquely identify a resource.
|
I(freeform_tags) are used to uniquely identify a resource.
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class ModuleDocFragment(object):
|
|||||||
DOCUMENTATION = """
|
DOCUMENTATION = """
|
||||||
options:
|
options:
|
||||||
display_name:
|
display_name:
|
||||||
description: Use O(display_name) along with the other options to return only resources that match the given
|
description: Use I(display_name) along with the other options to return only resources that match the given
|
||||||
display name exactly.
|
display name exactly.
|
||||||
type: str
|
type: str
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class ModuleDocFragment(object):
|
|||||||
DOCUMENTATION = """
|
DOCUMENTATION = """
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description: Use O(name) along with the other options to return only resources that match the given name
|
description: Use I(name) along with the other options to return only resources that match the given name
|
||||||
exactly.
|
exactly.
|
||||||
type: str
|
type: str
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ class ModuleDocFragment(object):
|
|||||||
default: true
|
default: true
|
||||||
type: bool
|
type: bool
|
||||||
wait_timeout:
|
wait_timeout:
|
||||||
description: Time, in seconds, to wait when O(wait=true).
|
description: Time, in seconds, to wait when I(wait=true).
|
||||||
default: 1200
|
default: 1200
|
||||||
type: int
|
type: int
|
||||||
wait_until:
|
wait_until:
|
||||||
description: The lifecycle state to wait for the resource to transition into when O(wait=true). By default,
|
description: The lifecycle state to wait for the resource to transition into when I(wait=true). By default,
|
||||||
when O(wait=true), we wait for the resource to get into ACTIVE/ATTACHED/AVAILABLE/PROVISIONED/
|
when I(wait=true), we wait for the resource to get into ACTIVE/ATTACHED/AVAILABLE/PROVISIONED/
|
||||||
RUNNING applicable lifecycle state during create operation & to get into DELETED/DETACHED/
|
RUNNING applicable lifecycle state during create operation & to get into DELETED/DETACHED/
|
||||||
TERMINATED lifecycle state during delete operation.
|
TERMINATED lifecycle state during delete operation.
|
||||||
type: str
|
type: str
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ options:
|
|||||||
default: true
|
default: true
|
||||||
description:
|
description:
|
||||||
- If certificates should be validated or not.
|
- If certificates should be validated or not.
|
||||||
- This should never be set to V(false), except if you are very sure that
|
- This should never be set to C(false), except if you are very sure that
|
||||||
your connection to the server can not be subject to a Man In The Middle
|
your connection to the server can not be subject to a Man In The Middle
|
||||||
attack.
|
attack.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -24,23 +24,21 @@ options:
|
|||||||
api_password:
|
api_password:
|
||||||
description:
|
description:
|
||||||
- Specify the password to authenticate with.
|
- Specify the password to authenticate with.
|
||||||
- You can use E(PROXMOX_PASSWORD) environment variable.
|
- You can use C(PROXMOX_PASSWORD) environment variable.
|
||||||
type: str
|
type: str
|
||||||
api_token_id:
|
api_token_id:
|
||||||
description:
|
description:
|
||||||
- Specify the token ID.
|
- Specify the token ID.
|
||||||
- Requires C(proxmoxer>=1.1.0) to work.
|
|
||||||
type: str
|
type: str
|
||||||
version_added: 1.3.0
|
version_added: 1.3.0
|
||||||
api_token_secret:
|
api_token_secret:
|
||||||
description:
|
description:
|
||||||
- Specify the token secret.
|
- Specify the token secret.
|
||||||
- Requires C(proxmoxer>=1.1.0) to work.
|
|
||||||
type: str
|
type: str
|
||||||
version_added: 1.3.0
|
version_added: 1.3.0
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If V(false), SSL certificates will not be validated.
|
- If C(false), SSL certificates will not be validated.
|
||||||
- This should only be used on personally controlled sites using self-signed certificates.
|
- This should only be used on personally controlled sites using self-signed certificates.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
@@ -57,7 +55,7 @@ options:
|
|||||||
node:
|
node:
|
||||||
description:
|
description:
|
||||||
- Proxmox VE node on which to operate.
|
- Proxmox VE node on which to operate.
|
||||||
- Only required for O(state=present).
|
- Only required for I(state=present).
|
||||||
- For every other states it will be autodiscovered.
|
- For every other states it will be autodiscovered.
|
||||||
type: str
|
type: str
|
||||||
pool:
|
pool:
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
notes:
|
notes:
|
||||||
- This module requires the C(purity_fb) Python library
|
- This module requires the C(purity_fb) Python library
|
||||||
- You must set E(PUREFB_URL) and E(PUREFB_API) environment variables
|
- You must set C(PUREFB_URL) and C(PUREFB_API) environment variables
|
||||||
if O(fb_url) and O(api_token) arguments are not passed to the module directly
|
if I(fb_url) and I(api_token) arguments are not passed to the module directly
|
||||||
requirements:
|
requirements:
|
||||||
- python >= 2.7
|
- python >= 2.7
|
||||||
- purity_fb >= 1.1
|
- purity_fb >= 1.1
|
||||||
@@ -55,8 +55,8 @@ options:
|
|||||||
required: true
|
required: true
|
||||||
notes:
|
notes:
|
||||||
- This module requires the C(purestorage) Python library
|
- This module requires the C(purestorage) Python library
|
||||||
- You must set E(PUREFA_URL) and E(PUREFA_API) environment variables
|
- You must set C(PUREFA_URL) and C(PUREFA_API) environment variables
|
||||||
if O(fa_url) and O(api_token) arguments are not passed to the module directly
|
if I(fa_url) and I(api_token) arguments are not passed to the module directly
|
||||||
requirements:
|
requirements:
|
||||||
- python >= 2.7
|
- python >= 2.7
|
||||||
- purestorage
|
- purestorage
|
||||||
|
|||||||
@@ -15,18 +15,18 @@ class ModuleDocFragment(object):
|
|||||||
options:
|
options:
|
||||||
api_key:
|
api_key:
|
||||||
description:
|
description:
|
||||||
- Rackspace API key, overrides O(credentials).
|
- Rackspace API key, overrides I(credentials).
|
||||||
type: str
|
type: str
|
||||||
aliases: [ password ]
|
aliases: [ password ]
|
||||||
credentials:
|
credentials:
|
||||||
description:
|
description:
|
||||||
- File to find the Rackspace credentials in. Ignored if O(api_key) and
|
- File to find the Rackspace credentials in. Ignored if I(api_key) and
|
||||||
O(username) are provided.
|
I(username) are provided.
|
||||||
type: path
|
type: path
|
||||||
aliases: [ creds_file ]
|
aliases: [ creds_file ]
|
||||||
env:
|
env:
|
||||||
description:
|
description:
|
||||||
- Environment as configured in C(~/.pyrax.cfg),
|
- Environment as configured in I(~/.pyrax.cfg),
|
||||||
see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration).
|
see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration).
|
||||||
type: str
|
type: str
|
||||||
region:
|
region:
|
||||||
@@ -35,7 +35,7 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- Rackspace username, overrides O(credentials).
|
- Rackspace username, overrides I(credentials).
|
||||||
type: str
|
type: str
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
@@ -46,12 +46,12 @@ requirements:
|
|||||||
- python >= 2.6
|
- python >= 2.6
|
||||||
- pyrax
|
- pyrax
|
||||||
notes:
|
notes:
|
||||||
- The following environment variables can be used, E(RAX_USERNAME),
|
- The following environment variables can be used, C(RAX_USERNAME),
|
||||||
E(RAX_API_KEY), E(RAX_CREDS_FILE), E(RAX_CREDENTIALS), E(RAX_REGION).
|
C(RAX_API_KEY), C(RAX_CREDS_FILE), C(RAX_CREDENTIALS), C(RAX_REGION).
|
||||||
- E(RAX_CREDENTIALS) and E(RAX_CREDS_FILE) point to a credentials file
|
- C(RAX_CREDENTIALS) and C(RAX_CREDS_FILE) points to a credentials file
|
||||||
appropriate for pyrax. See U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating)
|
appropriate for pyrax. See U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating)
|
||||||
- E(RAX_USERNAME) and E(RAX_API_KEY) obviate the use of a credentials file
|
- C(RAX_USERNAME) and C(RAX_API_KEY) obviate the use of a credentials file
|
||||||
- E(RAX_REGION) defines a Rackspace Public Cloud region (DFW, ORD, LON, ...)
|
- C(RAX_REGION) defines a Rackspace Public Cloud region (DFW, ORD, LON, ...)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# Documentation fragment including attributes to enable communication
|
# Documentation fragment including attributes to enable communication
|
||||||
@@ -61,7 +61,7 @@ options:
|
|||||||
api_key:
|
api_key:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Rackspace API key, overrides O(credentials).
|
- Rackspace API key, overrides I(credentials).
|
||||||
aliases: [ password ]
|
aliases: [ password ]
|
||||||
auth_endpoint:
|
auth_endpoint:
|
||||||
type: str
|
type: str
|
||||||
@@ -71,13 +71,13 @@ options:
|
|||||||
credentials:
|
credentials:
|
||||||
type: path
|
type: path
|
||||||
description:
|
description:
|
||||||
- File to find the Rackspace credentials in. Ignored if O(api_key) and
|
- File to find the Rackspace credentials in. Ignored if I(api_key) and
|
||||||
O(username) are provided.
|
I(username) are provided.
|
||||||
aliases: [ creds_file ]
|
aliases: [ creds_file ]
|
||||||
env:
|
env:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Environment as configured in C(~/.pyrax.cfg),
|
- Environment as configured in I(~/.pyrax.cfg),
|
||||||
see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration).
|
see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration).
|
||||||
identity_type:
|
identity_type:
|
||||||
type: str
|
type: str
|
||||||
@@ -99,24 +99,20 @@ options:
|
|||||||
username:
|
username:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Rackspace username, overrides O(credentials).
|
- Rackspace username, overrides I(credentials).
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- Whether or not to require SSL validation of API endpoints.
|
- Whether or not to require SSL validation of API endpoints.
|
||||||
type: bool
|
type: bool
|
||||||
aliases: [ verify_ssl ]
|
aliases: [ verify_ssl ]
|
||||||
deprecated:
|
|
||||||
removed_in: 9.0.0
|
|
||||||
why: This module relies on the deprecated package pyrax.
|
|
||||||
alternative: Use the Openstack modules instead.
|
|
||||||
requirements:
|
requirements:
|
||||||
- python >= 2.6
|
- python >= 2.6
|
||||||
- pyrax
|
- pyrax
|
||||||
notes:
|
notes:
|
||||||
- The following environment variables can be used, E(RAX_USERNAME),
|
- The following environment variables can be used, C(RAX_USERNAME),
|
||||||
E(RAX_API_KEY), E(RAX_CREDS_FILE), E(RAX_CREDENTIALS), E(RAX_REGION).
|
C(RAX_API_KEY), C(RAX_CREDS_FILE), C(RAX_CREDENTIALS), C(RAX_REGION).
|
||||||
- E(RAX_CREDENTIALS) and E(RAX_CREDS_FILE) points to a credentials file
|
- C(RAX_CREDENTIALS) and C(RAX_CREDS_FILE) points to a credentials file
|
||||||
appropriate for pyrax. See U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating)
|
appropriate for pyrax. See U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating)
|
||||||
- E(RAX_USERNAME) and E(RAX_API_KEY) obviate the use of a credentials file
|
- C(RAX_USERNAME) and C(RAX_API_KEY) obviate the use of a credentials file
|
||||||
- E(RAX_REGION) defines a Rackspace Public Cloud region (DFW, ORD, LON, ...)
|
- C(RAX_REGION) defines a Rackspace Public Cloud region (DFW, ORD, LON, ...)
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ options:
|
|||||||
default: true
|
default: true
|
||||||
ca_certs:
|
ca_certs:
|
||||||
description:
|
description:
|
||||||
- Path to root certificates file. If not set and O(tls) is
|
- Path to root certificates file. If not set and I(tls) is
|
||||||
set to V(true), certifi ca-certificates will be used.
|
set to C(true), certifi ca-certificates will be used.
|
||||||
type: str
|
type: str
|
||||||
requirements: [ "redis", "certifi" ]
|
requirements: [ "redis", "certifi" ]
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ options:
|
|||||||
default: true
|
default: true
|
||||||
notes:
|
notes:
|
||||||
- Also see the API documentation on U(https://developer.scaleway.com/)
|
- Also see the API documentation on U(https://developer.scaleway.com/)
|
||||||
- If O(api_token) is not set within the module, the following
|
- If C(api_token) is not set within the module, the following
|
||||||
environment variables can be used in decreasing order of precedence
|
environment variables can be used in decreasing order of precedence
|
||||||
E(SCW_TOKEN), E(SCW_API_KEY), E(SCW_OAUTH_TOKEN) or E(SCW_API_TOKEN).
|
C(SCW_TOKEN), C(SCW_API_KEY), C(SCW_OAUTH_TOKEN) or C(SCW_API_TOKEN).
|
||||||
- If one wants to use a different O(api_url) one can also set the E(SCW_API_URL)
|
- If one wants to use a different C(api_url) one can also set the C(SCW_API_URL)
|
||||||
environment variable.
|
environment variable.
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ options:
|
|||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- The desired state of the object.
|
- The desired state of the object.
|
||||||
- V(present) will create or update an object
|
- C(present) will create or update an object
|
||||||
- V(absent) will delete an object if it was present
|
- C(absent) will delete an object if it was present
|
||||||
type: str
|
type: str
|
||||||
choices: [ absent, present ]
|
choices: [ absent, present ]
|
||||||
default: present
|
default: present
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- Allows connection when SSL certificates are not valid. Set to V(false) when certificates are not trusted.
|
- Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted.
|
||||||
- If set to V(true), please make sure Python >= 2.7.9 is installed on the given machine.
|
- If set to C(true), please make sure Python >= 2.7.9 is installed on the given machine.
|
||||||
required: false
|
required: false
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
|
|||||||
@@ -15,27 +15,27 @@ options:
|
|||||||
hostname:
|
hostname:
|
||||||
description:
|
description:
|
||||||
- The hostname or IP address of the XenServer host or XenServer pool master.
|
- The hostname or IP address of the XenServer host or XenServer pool master.
|
||||||
- If the value is not specified in the task, the value of environment variable E(XENSERVER_HOST) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(XENSERVER_HOST) will be used instead.
|
||||||
type: str
|
type: str
|
||||||
default: localhost
|
default: localhost
|
||||||
aliases: [ host, pool ]
|
aliases: [ host, pool ]
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- The username to use for connecting to XenServer.
|
- The username to use for connecting to XenServer.
|
||||||
- If the value is not specified in the task, the value of environment variable E(XENSERVER_USER) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(XENSERVER_USER) will be used instead.
|
||||||
type: str
|
type: str
|
||||||
default: root
|
default: root
|
||||||
aliases: [ admin, user ]
|
aliases: [ admin, user ]
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- The password to use for connecting to XenServer.
|
- The password to use for connecting to XenServer.
|
||||||
- If the value is not specified in the task, the value of environment variable E(XENSERVER_PASSWORD) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(XENSERVER_PASSWORD) will be used instead.
|
||||||
type: str
|
type: str
|
||||||
aliases: [ pass, pwd ]
|
aliases: [ pass, pwd ]
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- Allows connection when SSL certificates are not valid. Set to V(false) when certificates are not trusted.
|
- Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted.
|
||||||
- If the value is not specified in the task, the value of environment variable E(XENSERVER_VALIDATE_CERTS) will be used instead.
|
- If the value is not specified in the task, the value of environment variable C(XENSERVER_VALIDATE_CERTS) will be used instead.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ DOCUMENTATION = '''
|
|||||||
dialect:
|
dialect:
|
||||||
description:
|
description:
|
||||||
- The CSV dialect to use when parsing the CSV file.
|
- The CSV dialect to use when parsing the CSV file.
|
||||||
- Possible values include V(excel), V(excel-tab) or V(unix).
|
- Possible values include C(excel), C(excel-tab) or C(unix).
|
||||||
type: str
|
type: str
|
||||||
default: excel
|
default: excel
|
||||||
fieldnames:
|
fieldnames:
|
||||||
@@ -35,19 +35,19 @@ DOCUMENTATION = '''
|
|||||||
delimiter:
|
delimiter:
|
||||||
description:
|
description:
|
||||||
- A one-character string used to separate fields.
|
- A one-character string used to separate fields.
|
||||||
- When using this parameter, you change the default value used by O(dialect).
|
- When using this parameter, you change the default value used by I(dialect).
|
||||||
- The default value depends on the dialect used.
|
- The default value depends on the dialect used.
|
||||||
type: str
|
type: str
|
||||||
skipinitialspace:
|
skipinitialspace:
|
||||||
description:
|
description:
|
||||||
- Whether to ignore any whitespaces immediately following the delimiter.
|
- Whether to ignore any whitespaces immediately following the delimiter.
|
||||||
- When using this parameter, you change the default value used by O(dialect).
|
- When using this parameter, you change the default value used by I(dialect).
|
||||||
- The default value depends on the dialect used.
|
- The default value depends on the dialect used.
|
||||||
type: bool
|
type: bool
|
||||||
strict:
|
strict:
|
||||||
description:
|
description:
|
||||||
- Whether to raise an exception on bad CSV input.
|
- Whether to raise an exception on bad CSV input.
|
||||||
- When using this parameter, you change the default value used by O(dialect).
|
- When using this parameter, you change the default value used by I(dialect).
|
||||||
- The default value depends on the dialect used.
|
- The default value depends on the dialect used.
|
||||||
type: bool
|
type: bool
|
||||||
'''
|
'''
|
||||||
@@ -56,7 +56,7 @@ EXAMPLES = '''
|
|||||||
- name: Parse a CSV file's contents
|
- name: Parse a CSV file's contents
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: >-
|
msg: >-
|
||||||
{{ csv_data | community.general.from_csv(dialect='unix') }}
|
{{ csv_data | community.genera.from_csv(dialect='unix') }}
|
||||||
vars:
|
vars:
|
||||||
csv_data: |
|
csv_data: |
|
||||||
Column 1,Value
|
Column 1,Value
|
||||||
|
|||||||
@@ -25,17 +25,17 @@ DOCUMENTATION = '''
|
|||||||
parser:
|
parser:
|
||||||
description:
|
description:
|
||||||
- The correct parser for the input data.
|
- The correct parser for the input data.
|
||||||
- For example V(ifconfig).
|
- For example C(ifconfig).
|
||||||
- "Note: use underscores instead of dashes (if any) in the parser module name."
|
- "Note: use underscores instead of dashes (if any) in the parser module name."
|
||||||
- See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers.
|
- See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers.
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
quiet:
|
quiet:
|
||||||
description: Set to V(false) to not suppress warnings.
|
description: Set to C(false) to not suppress warnings.
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
raw:
|
raw:
|
||||||
description: Set to V(true) to return pre-processed JSON.
|
description: Set to C(true) to return pre-processed JSON.
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
requirements:
|
requirements:
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ DOCUMENTATION = '''
|
|||||||
version_added: 2.0.0
|
version_added: 2.0.0
|
||||||
author: Vladimir Botka (@vbotka)
|
author: Vladimir Botka (@vbotka)
|
||||||
description:
|
description:
|
||||||
- Merge two or more lists by attribute O(index). Optional parameters O(recursive) and O(list_merge)
|
- Merge two or more lists by attribute I(index). Optional parameters 'recursive' and 'list_merge'
|
||||||
control the merging of the lists in values. The function merge_hash from ansible.utils.vars
|
control the merging of the lists in values. The function merge_hash from ansible.utils.vars
|
||||||
is used. To learn details on how to use the parameters O(recursive) and O(list_merge) see
|
is used. To learn details on how to use the parameters 'recursive' and 'list_merge' see
|
||||||
Ansible User's Guide chapter "Using filters to manipulate data" section "Combining
|
Ansible User's Guide chapter "Using filters to manipulate data" section "Combining
|
||||||
hashes/dictionaries".
|
hashes/dictionaries".
|
||||||
positional: another_list, index
|
positional: another_list, index
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
year:
|
year:
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
year:
|
year:
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
year:
|
year:
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
year:
|
year:
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
year:
|
year:
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
year:
|
year:
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
unit:
|
unit:
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
year:
|
year:
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ DOCUMENTATION:
|
|||||||
_input:
|
_input:
|
||||||
description:
|
description:
|
||||||
- The time string to convert.
|
- The time string to convert.
|
||||||
- Can use the units V(y) and V(year) for a year, V(mo) and V(month) for a month, V(w) and V(week) for a week,
|
- Can use the units C(y) and C(year) for a year, C(mo) and C(month) for a month, C(w) and C(week) for a week,
|
||||||
V(d) and V(day) for a day, V(h) and V(hour) for a hour, V(m), V(min) and V(minute) for minutes, V(s), V(sec)
|
C(d) and C(day) for a day, C(h) and C(hour) for a hour, C(m), C(min) and C(minute) for minutes, C(s), C(sec)
|
||||||
and V(second) for seconds, V(ms), V(msec), V(msecond) and V(millisecond) for milliseconds. The suffix V(s)
|
and C(second) for seconds, C(ms), C(msec), C(msecond) and C(millisecond) for milliseconds. The suffix C(s)
|
||||||
can be added to a unit as well, so V(seconds) is the same as V(second).
|
can be added to a unit as well, so C(seconds) is the same as C(second).
|
||||||
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
- Valid strings are space separated combinations of an integer with an optional minus sign and a unit.
|
||||||
- Examples are V(1h), V(-5m), and V(3h -5m 6s).
|
- Examples are C(1h), C(-5m), and C(3h -5m 6s).
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
year:
|
year:
|
||||||
|
|||||||
@@ -13,14 +13,12 @@ DOCUMENTATION = '''
|
|||||||
version_added: 1.0.0
|
version_added: 1.0.0
|
||||||
description:
|
description:
|
||||||
- Get inventory hosts from the cobbler service.
|
- Get inventory hosts from the cobbler service.
|
||||||
- "Uses a configuration file as an inventory source, it must end in C(.cobbler.yml) or C(.cobbler.yaml) and have a C(plugin: cobbler) entry."
|
- "Uses a configuration file as an inventory source, it must end in C(.cobbler.yml) or C(.cobbler.yaml) and has a C(plugin: cobbler) entry."
|
||||||
- Adds the primary IP addresses to C(cobbler_ipv4_address) and C(cobbler_ipv6_address) host variables if defined in Cobbler. The primary IP address is
|
|
||||||
defined as the management interface if defined, or the interface who's DNS name matches the hostname of the system, or else the first interface found.
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- inventory_cache
|
- inventory_cache
|
||||||
options:
|
options:
|
||||||
plugin:
|
plugin:
|
||||||
description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as it's own.
|
description: The name of this plugin, it should always be set to C(community.general.cobbler) for this plugin to recognize it as it's own.
|
||||||
required: true
|
required: true
|
||||||
choices: [ 'cobbler', 'community.general.cobbler' ]
|
choices: [ 'cobbler', 'community.general.cobbler' ]
|
||||||
url:
|
url:
|
||||||
@@ -34,73 +32,45 @@ DOCUMENTATION = '''
|
|||||||
env:
|
env:
|
||||||
- name: COBBLER_USER
|
- name: COBBLER_USER
|
||||||
password:
|
password:
|
||||||
description: Cobbler authentication password.
|
description: Cobbler authentication password
|
||||||
required: false
|
required: false
|
||||||
env:
|
env:
|
||||||
- name: COBBLER_PASSWORD
|
- name: COBBLER_PASSWORD
|
||||||
cache_fallback:
|
cache_fallback:
|
||||||
description: Fallback to cached results if connection to cobbler fails.
|
description: Fallback to cached results if connection to cobbler fails
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
exclude_mgmt_classes:
|
|
||||||
description: Management classes to exclude from inventory.
|
|
||||||
type: list
|
|
||||||
default: []
|
|
||||||
elements: str
|
|
||||||
version_added: 7.4.0
|
|
||||||
exclude_profiles:
|
exclude_profiles:
|
||||||
description:
|
description:
|
||||||
- Profiles to exclude from inventory.
|
- Profiles to exclude from inventory.
|
||||||
- Ignored if O(include_profiles) is specified.
|
- Ignored if I(include_profiles) is specified.
|
||||||
type: list
|
type: list
|
||||||
default: []
|
default: []
|
||||||
elements: str
|
elements: str
|
||||||
include_mgmt_classes:
|
|
||||||
description: Management classes to include from inventory.
|
|
||||||
type: list
|
|
||||||
default: []
|
|
||||||
elements: str
|
|
||||||
version_added: 7.4.0
|
|
||||||
include_profiles:
|
include_profiles:
|
||||||
description:
|
description:
|
||||||
- Profiles to include from inventory.
|
- Profiles to include from inventory.
|
||||||
- If specified, all other profiles will be excluded.
|
- If specified, all other profiles will be excluded.
|
||||||
- O(exclude_profiles) is ignored if O(include_profiles) is specified.
|
- I(exclude_profiles) is ignored if I(include_profiles) is specified.
|
||||||
type: list
|
type: list
|
||||||
default: []
|
default: []
|
||||||
elements: str
|
elements: str
|
||||||
version_added: 4.4.0
|
version_added: 4.4.0
|
||||||
inventory_hostname:
|
|
||||||
description:
|
|
||||||
- What to use for the ansible inventory hostname.
|
|
||||||
- By default the networking hostname is used if defined, otherwise the DNS name of the management or first non-static interface.
|
|
||||||
- If set to V(system), the cobbler system name is used.
|
|
||||||
type: str
|
|
||||||
choices: [ 'hostname', 'system' ]
|
|
||||||
default: hostname
|
|
||||||
version_added: 7.1.0
|
|
||||||
group_by:
|
group_by:
|
||||||
description: Keys to group hosts by.
|
description: Keys to group hosts by
|
||||||
type: list
|
type: list
|
||||||
elements: string
|
elements: string
|
||||||
default: [ 'mgmt_classes', 'owners', 'status' ]
|
default: [ 'mgmt_classes', 'owners', 'status' ]
|
||||||
group:
|
group:
|
||||||
description: Group to place all hosts into.
|
description: Group to place all hosts into
|
||||||
default: cobbler
|
default: cobbler
|
||||||
group_prefix:
|
group_prefix:
|
||||||
description: Prefix to apply to cobbler groups.
|
description: Prefix to apply to cobbler groups
|
||||||
default: cobbler_
|
default: cobbler_
|
||||||
want_facts:
|
want_facts:
|
||||||
description: Toggle, if V(true) the plugin will retrieve host facts from the server.
|
description: Toggle, if C(true) the plugin will retrieve host facts from the server
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
want_ip_addresses:
|
|
||||||
description:
|
|
||||||
- Toggle, if V(true) the plugin will add a C(cobbler_ipv4_addresses) and C(cobbleer_ipv6_addresses) dictionary to the defined O(group) mapping
|
|
||||||
interface DNS names to IP addresses.
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
version_added: 7.1.0
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
@@ -115,8 +85,8 @@ import socket
|
|||||||
|
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
from ansible.module_utils.common.text.converters import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
|
from ansible.module_utils.six import iteritems
|
||||||
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name
|
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name
|
||||||
from ansible.module_utils.six import text_type
|
|
||||||
|
|
||||||
# xmlrpc
|
# xmlrpc
|
||||||
try:
|
try:
|
||||||
@@ -158,7 +128,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
|
|||||||
self.connection = xmlrpc_client.Server(self.cobbler_url, allow_none=True)
|
self.connection = xmlrpc_client.Server(self.cobbler_url, allow_none=True)
|
||||||
self.token = None
|
self.token = None
|
||||||
if self.get_option('user') is not None:
|
if self.get_option('user') is not None:
|
||||||
self.token = self.connection.login(text_type(self.get_option('user')), text_type(self.get_option('password')))
|
self.token = self.connection.login(self.get_option('user'), self.get_option('password'))
|
||||||
return self.connection
|
return self.connection
|
||||||
|
|
||||||
def _init_cache(self):
|
def _init_cache(self):
|
||||||
@@ -228,12 +198,9 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
|
|||||||
self.cache_key = self.get_cache_key(path)
|
self.cache_key = self.get_cache_key(path)
|
||||||
self.use_cache = cache and self.get_option('cache')
|
self.use_cache = cache and self.get_option('cache')
|
||||||
|
|
||||||
self.exclude_mgmt_classes = self.get_option('exclude_mgmt_classes')
|
|
||||||
self.include_mgmt_classes = self.get_option('include_mgmt_classes')
|
|
||||||
self.exclude_profiles = self.get_option('exclude_profiles')
|
self.exclude_profiles = self.get_option('exclude_profiles')
|
||||||
self.include_profiles = self.get_option('include_profiles')
|
self.include_profiles = self.get_option('include_profiles')
|
||||||
self.group_by = self.get_option('group_by')
|
self.group_by = self.get_option('group_by')
|
||||||
self.inventory_hostname = self.get_option('inventory_hostname')
|
|
||||||
|
|
||||||
for profile in self._get_profiles():
|
for profile in self._get_profiles():
|
||||||
if profile['parent']:
|
if profile['parent']:
|
||||||
@@ -269,30 +236,18 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
|
|||||||
self.inventory.add_group(self.group)
|
self.inventory.add_group(self.group)
|
||||||
self.display.vvvv('Added site group %s\n' % self.group)
|
self.display.vvvv('Added site group %s\n' % self.group)
|
||||||
|
|
||||||
ip_addresses = {}
|
|
||||||
ipv6_addresses = {}
|
|
||||||
for host in self._get_systems():
|
for host in self._get_systems():
|
||||||
# Get the FQDN for the host and add it to the right groups
|
# Get the FQDN for the host and add it to the right groups
|
||||||
if self.inventory_hostname == 'system':
|
hostname = host['hostname'] # None
|
||||||
hostname = host['name'] # None
|
|
||||||
else:
|
|
||||||
hostname = host['hostname'] # None
|
|
||||||
interfaces = host['interfaces']
|
interfaces = host['interfaces']
|
||||||
|
|
||||||
if set(host['mgmt_classes']) & set(self.include_mgmt_classes):
|
if self._exclude_profile(host['profile']):
|
||||||
self.display.vvvv('Including host %s in mgmt_classes %s\n' % (host['name'], host['mgmt_classes']))
|
self.display.vvvv('Excluding host %s in profile %s\n' % (host['name'], host['profile']))
|
||||||
else:
|
continue
|
||||||
if self._exclude_profile(host['profile']):
|
|
||||||
self.display.vvvv('Excluding host %s in profile %s\n' % (host['name'], host['profile']))
|
|
||||||
continue
|
|
||||||
|
|
||||||
if set(host['mgmt_classes']) & set(self.exclude_mgmt_classes):
|
|
||||||
self.display.vvvv('Excluding host %s in mgmt_classes %s\n' % (host['name'], host['mgmt_classes']))
|
|
||||||
continue
|
|
||||||
|
|
||||||
# hostname is often empty for non-static IP hosts
|
# hostname is often empty for non-static IP hosts
|
||||||
if hostname == '':
|
if hostname == '':
|
||||||
for iname, ivalue in interfaces.items():
|
for (iname, ivalue) in iteritems(interfaces):
|
||||||
if ivalue['management'] or not ivalue['static']:
|
if ivalue['management'] or not ivalue['static']:
|
||||||
this_dns_name = ivalue.get('dns_name', None)
|
this_dns_name = ivalue.get('dns_name', None)
|
||||||
if this_dns_name is not None and this_dns_name != "":
|
if this_dns_name is not None and this_dns_name != "":
|
||||||
@@ -307,11 +262,8 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
|
|||||||
self.display.vvvv('Added host %s hostname %s\n' % (host['name'], hostname))
|
self.display.vvvv('Added host %s hostname %s\n' % (host['name'], hostname))
|
||||||
|
|
||||||
# Add host to profile group
|
# Add host to profile group
|
||||||
if host['profile'] != '':
|
group_name = self._add_safe_group_name(host['profile'], child=hostname)
|
||||||
group_name = self._add_safe_group_name(host['profile'], child=hostname)
|
self.display.vvvv('Added host %s to profile group %s\n' % (hostname, group_name))
|
||||||
self.display.vvvv('Added host %s to profile group %s\n' % (hostname, group_name))
|
|
||||||
else:
|
|
||||||
self.display.warning('Host %s has an empty profile\n' % (hostname))
|
|
||||||
|
|
||||||
# Add host to groups specified by group_by fields
|
# Add host to groups specified by group_by fields
|
||||||
for group_by in self.group_by:
|
for group_by in self.group_by:
|
||||||
@@ -328,51 +280,8 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
|
|||||||
self.inventory.add_child(self.group, hostname)
|
self.inventory.add_child(self.group, hostname)
|
||||||
|
|
||||||
# Add host variables
|
# Add host variables
|
||||||
ip_address = None
|
|
||||||
ip_address_first = None
|
|
||||||
ipv6_address = None
|
|
||||||
ipv6_address_first = None
|
|
||||||
for iname, ivalue in interfaces.items():
|
|
||||||
# Set to first interface or management interface if defined or hostname matches dns_name
|
|
||||||
if ivalue['ip_address'] != "":
|
|
||||||
if ip_address_first is None:
|
|
||||||
ip_address_first = ivalue['ip_address']
|
|
||||||
if ivalue['management']:
|
|
||||||
ip_address = ivalue['ip_address']
|
|
||||||
elif ivalue['dns_name'] == hostname and ip_address is None:
|
|
||||||
ip_address = ivalue['ip_address']
|
|
||||||
if ivalue['ipv6_address'] != "":
|
|
||||||
if ipv6_address_first is None:
|
|
||||||
ipv6_address_first = ivalue['ipv6_address']
|
|
||||||
if ivalue['management']:
|
|
||||||
ipv6_address = ivalue['ipv6_address']
|
|
||||||
elif ivalue['dns_name'] == hostname and ipv6_address is None:
|
|
||||||
ipv6_address = ivalue['ipv6_address']
|
|
||||||
|
|
||||||
# Collect all interface name mappings for adding to group vars
|
|
||||||
if self.get_option('want_ip_addresses'):
|
|
||||||
if ivalue['dns_name'] != "":
|
|
||||||
if ivalue['ip_address'] != "":
|
|
||||||
ip_addresses[ivalue['dns_name']] = ivalue['ip_address']
|
|
||||||
if ivalue['ipv6_address'] != "":
|
|
||||||
ip_addresses[ivalue['dns_name']] = ivalue['ipv6_address']
|
|
||||||
|
|
||||||
# Add ip_address to host if defined, use first if no management or matched dns_name
|
|
||||||
if ip_address is None and ip_address_first is not None:
|
|
||||||
ip_address = ip_address_first
|
|
||||||
if ip_address is not None:
|
|
||||||
self.inventory.set_variable(hostname, 'cobbler_ipv4_address', ip_address)
|
|
||||||
if ipv6_address is None and ipv6_address_first is not None:
|
|
||||||
ipv6_address = ipv6_address_first
|
|
||||||
if ipv6_address is not None:
|
|
||||||
self.inventory.set_variable(hostname, 'cobbler_ipv6_address', ipv6_address)
|
|
||||||
|
|
||||||
if self.get_option('want_facts'):
|
if self.get_option('want_facts'):
|
||||||
try:
|
try:
|
||||||
self.inventory.set_variable(hostname, 'cobbler', host)
|
self.inventory.set_variable(hostname, 'cobbler', host)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self.display.warning("Could not set host info for %s: %s" % (hostname, to_text(e)))
|
self.display.warning("Could not set host info for %s: %s" % (hostname, to_text(e)))
|
||||||
|
|
||||||
if self.get_option('want_ip_addresses'):
|
|
||||||
self.inventory.set_variable(self.group, 'cobbler_ipv4_addresses', ip_addresses)
|
|
||||||
self.inventory.set_variable(self.group, 'cobbler_ipv6_addresses', ipv6_addresses)
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ DOCUMENTATION = '''
|
|||||||
description:
|
description:
|
||||||
- Allows the override of the inventory name based on different attributes.
|
- Allows the override of the inventory name based on different attributes.
|
||||||
- This allows for changing the way limits are used.
|
- This allows for changing the way limits are used.
|
||||||
- The current default, V(address), is sometimes not unique or present. We recommend to use V(name) instead.
|
- The current default, C(address), is sometimes not unique or present. We recommend to use C(name) instead.
|
||||||
type: string
|
type: string
|
||||||
default: address
|
default: address
|
||||||
choices: ['name', 'display_name', 'address']
|
choices: ['name', 'display_name', 'address']
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ DOCUMENTATION = r'''
|
|||||||
- You need to set this password on the lxd server before
|
- You need to set this password on the lxd server before
|
||||||
running this module using the following command
|
running this module using the following command
|
||||||
C(lxc config set core.trust_password <some random password>)
|
C(lxc config set core.trust_password <some random password>)
|
||||||
See U(https://documentation.ubuntu.com/lxd/en/latest/authentication/#adding-client-certificates-using-a-trust-password).
|
See U(https://www.stgraber.org/2016/04/18/lxd-api-direct-interaction/).
|
||||||
- If O(trust_password) is set, this module send a request for authentication before sending any requests.
|
- If I(trust_password) is set, this module send a request for authentication before sending any requests.
|
||||||
type: str
|
type: str
|
||||||
state:
|
state:
|
||||||
description: Filter the instance according to the current status.
|
description: Filter the instance according to the current status.
|
||||||
@@ -62,7 +62,7 @@ DOCUMENTATION = r'''
|
|||||||
version_added: 6.2.0
|
version_added: 6.2.0
|
||||||
type_filter:
|
type_filter:
|
||||||
description:
|
description:
|
||||||
- Filter the instances by type V(virtual-machine), V(container) or V(both).
|
- Filter the instances by type C(virtual-machine), C(container) or C(both).
|
||||||
- The first version of the inventory only supported containers.
|
- The first version of the inventory only supported containers.
|
||||||
type: str
|
type: str
|
||||||
default: container
|
default: container
|
||||||
@@ -70,18 +70,18 @@ DOCUMENTATION = r'''
|
|||||||
version_added: 4.2.0
|
version_added: 4.2.0
|
||||||
prefered_instance_network_interface:
|
prefered_instance_network_interface:
|
||||||
description:
|
description:
|
||||||
- If an instance has multiple network interfaces, select which one is the preferred as pattern.
|
- If an instance has multiple network interfaces, select which one is the prefered as pattern.
|
||||||
- Combined with the first number that can be found e.g. 'eth' + 0.
|
- Combined with the first number that can be found e.g. 'eth' + 0.
|
||||||
- The option has been renamed from O(prefered_container_network_interface) to O(prefered_instance_network_interface)
|
- The option has been renamed from I(prefered_container_network_interface) to I(prefered_instance_network_interface) in community.general 3.8.0.
|
||||||
in community.general 3.8.0. The old name still works as an alias.
|
The old name still works as an alias.
|
||||||
type: str
|
type: str
|
||||||
default: eth
|
default: eth
|
||||||
aliases:
|
aliases:
|
||||||
- prefered_container_network_interface
|
- prefered_container_network_interface
|
||||||
prefered_instance_network_family:
|
prefered_instance_network_family:
|
||||||
description:
|
description:
|
||||||
- If an instance has multiple network interfaces, which one is the preferred by family.
|
- If an instance has multiple network interfaces, which one is the prefered by family.
|
||||||
- Specify V(inet) for IPv4 and V(inet6) for IPv6.
|
- Specify C(inet) for IPv4 and C(inet6) for IPv6.
|
||||||
type: str
|
type: str
|
||||||
default: inet
|
default: inet
|
||||||
choices: [ 'inet', 'inet6' ]
|
choices: [ 'inet', 'inet6' ]
|
||||||
@@ -359,7 +359,7 @@ class InventoryModule(BaseInventoryPlugin):
|
|||||||
Kwargs:
|
Kwargs:
|
||||||
None
|
None
|
||||||
Source:
|
Source:
|
||||||
https://documentation.ubuntu.com/lxd/en/latest/rest-api/
|
https://github.com/lxc/lxd/blob/master/doc/rest-api.md
|
||||||
Raises:
|
Raises:
|
||||||
None
|
None
|
||||||
Returns:
|
Returns:
|
||||||
@@ -376,7 +376,7 @@ class InventoryModule(BaseInventoryPlugin):
|
|||||||
def get_instance_data(self, names):
|
def get_instance_data(self, names):
|
||||||
"""Create Inventory of the instance
|
"""Create Inventory of the instance
|
||||||
|
|
||||||
Iterate through the different branches of the instances and collect Information.
|
Iterate through the different branches of the instances and collect Informations.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
list(names): List of instance names
|
list(names): List of instance names
|
||||||
@@ -398,7 +398,7 @@ class InventoryModule(BaseInventoryPlugin):
|
|||||||
def get_network_data(self, names):
|
def get_network_data(self, names):
|
||||||
"""Create Inventory of the instance
|
"""Create Inventory of the instance
|
||||||
|
|
||||||
Iterate through the different branches of the instances and collect Information.
|
Iterate through the different branches of the instances and collect Informations.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
list(names): List of instance names
|
list(names): List of instance names
|
||||||
@@ -451,9 +451,9 @@ class InventoryModule(BaseInventoryPlugin):
|
|||||||
return network_configuration
|
return network_configuration
|
||||||
|
|
||||||
def get_prefered_instance_network_interface(self, instance_name):
|
def get_prefered_instance_network_interface(self, instance_name):
|
||||||
"""Helper to get the preferred interface of thr instance
|
"""Helper to get the prefered interface of thr instance
|
||||||
|
|
||||||
Helper to get the preferred interface provide by neme pattern from 'prefered_instance_network_interface'.
|
Helper to get the prefered interface provide by neme pattern from 'prefered_instance_network_interface'.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
str(containe_name): name of instance
|
str(containe_name): name of instance
|
||||||
@@ -563,7 +563,7 @@ class InventoryModule(BaseInventoryPlugin):
|
|||||||
else:
|
else:
|
||||||
path[instance_name][key] = value
|
path[instance_name][key] = value
|
||||||
except KeyError as err:
|
except KeyError as err:
|
||||||
raise AnsibleParserError("Unable to store Information: {0}".format(to_native(err)))
|
raise AnsibleParserError("Unable to store Informations: {0}".format(to_native(err)))
|
||||||
|
|
||||||
def extract_information_from_instance_configs(self):
|
def extract_information_from_instance_configs(self):
|
||||||
"""Process configuration information
|
"""Process configuration information
|
||||||
@@ -683,7 +683,7 @@ class InventoryModule(BaseInventoryPlugin):
|
|||||||
continue
|
continue
|
||||||
# add instance
|
# add instance
|
||||||
self.inventory.add_host(instance_name)
|
self.inventory.add_host(instance_name)
|
||||||
# add network information
|
# add network informations
|
||||||
self.build_inventory_network(instance_name)
|
self.build_inventory_network(instance_name)
|
||||||
# add os
|
# add os
|
||||||
v = self._get_data_entry('inventory/{0}/os'.format(instance_name))
|
v = self._get_data_entry('inventory/{0}/os'.format(instance_name))
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ DOCUMENTATION = '''
|
|||||||
required: true
|
required: true
|
||||||
choices: ['nmap', 'community.general.nmap']
|
choices: ['nmap', 'community.general.nmap']
|
||||||
sudo:
|
sudo:
|
||||||
description: Set to V(true) to execute a C(sudo nmap) plugin scan.
|
description: Set to C(true) to execute a C(sudo nmap) plugin scan.
|
||||||
version_added: 4.8.0
|
version_added: 4.8.0
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@@ -36,7 +36,7 @@ DOCUMENTATION = '''
|
|||||||
exclude:
|
exclude:
|
||||||
description:
|
description:
|
||||||
- List of addresses to exclude.
|
- List of addresses to exclude.
|
||||||
- For example V(10.2.2.15-25) or V(10.2.2.15,10.2.2.16).
|
- For example C(10.2.2.15-25) or C(10.2.2.15,10.2.2.16).
|
||||||
type: list
|
type: list
|
||||||
elements: string
|
elements: string
|
||||||
env:
|
env:
|
||||||
@@ -45,8 +45,8 @@ DOCUMENTATION = '''
|
|||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- Only scan specific port or port range (C(-p)).
|
- Only scan specific port or port range (C(-p)).
|
||||||
- For example, you could pass V(22) for a single port, V(1-65535) for a range of ports,
|
- For example, you could pass C(22) for a single port, C(1-65535) for a range of ports,
|
||||||
or V(U:53,137,T:21-25,139,8080,S:9) to check port 53 with UDP, ports 21-25 with TCP, port 9 with SCTP, and ports 137, 139, and 8080 with all.
|
or C(U:53,137,T:21-25,139,8080,S:9) to check port 53 with UDP, ports 21-25 with TCP, port 9 with SCTP, and ports 137, 139, and 8080 with all.
|
||||||
type: string
|
type: string
|
||||||
version_added: 6.5.0
|
version_added: 6.5.0
|
||||||
ports:
|
ports:
|
||||||
@@ -64,14 +64,14 @@ DOCUMENTATION = '''
|
|||||||
udp_scan:
|
udp_scan:
|
||||||
description:
|
description:
|
||||||
- Scan via UDP.
|
- Scan via UDP.
|
||||||
- Depending on your system you might need O(sudo=true) for this to work.
|
- Depending on your system you might need I(sudo=true) for this to work.
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
version_added: 6.1.0
|
version_added: 6.1.0
|
||||||
icmp_timestamp:
|
icmp_timestamp:
|
||||||
description:
|
description:
|
||||||
- Scan via ICMP Timestamp (C(-PP)).
|
- Scan via ICMP Timestamp (C(-PP)).
|
||||||
- Depending on your system you might need O(sudo=true) for this to work.
|
- Depending on your system you might need I(sudo=true) for this to work.
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
version_added: 6.1.0
|
version_added: 6.1.0
|
||||||
@@ -81,15 +81,10 @@ DOCUMENTATION = '''
|
|||||||
default: false
|
default: false
|
||||||
version_added: 6.5.0
|
version_added: 6.5.0
|
||||||
dns_resolve:
|
dns_resolve:
|
||||||
description: Whether to always (V(true)) or never (V(false)) do DNS resolution.
|
description: Whether to always (C(true)) or never (C(false)) do DNS resolution.
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
version_added: 6.1.0
|
version_added: 6.1.0
|
||||||
use_arp_ping:
|
|
||||||
description: Whether to always (V(true)) use the quick ARP ping or (V(false)) a slower but more reliable method.
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
version_added: 7.4.0
|
|
||||||
notes:
|
notes:
|
||||||
- At least one of ipv4 or ipv6 is required to be True, both can be True, but they cannot both be False.
|
- At least one of ipv4 or ipv6 is required to be True, both can be True, but they cannot both be False.
|
||||||
- 'TODO: add OS fingerprinting'
|
- 'TODO: add OS fingerprinting'
|
||||||
@@ -201,43 +196,40 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||||||
# setup command
|
# setup command
|
||||||
cmd = [self._nmap]
|
cmd = [self._nmap]
|
||||||
|
|
||||||
if self.get_option('sudo'):
|
if self._options['sudo']:
|
||||||
cmd.insert(0, 'sudo')
|
cmd.insert(0, 'sudo')
|
||||||
|
|
||||||
if self.get_option('port'):
|
if self._options['port']:
|
||||||
cmd.append('-p')
|
cmd.append('-p')
|
||||||
cmd.append(self.get_option('port'))
|
cmd.append(self._options['port'])
|
||||||
|
|
||||||
if not self.get_option('ports'):
|
if not self._options['ports']:
|
||||||
cmd.append('-sP')
|
cmd.append('-sP')
|
||||||
|
|
||||||
if self.get_option('ipv4') and not self.get_option('ipv6'):
|
if self._options['ipv4'] and not self._options['ipv6']:
|
||||||
cmd.append('-4')
|
cmd.append('-4')
|
||||||
elif self.get_option('ipv6') and not self.get_option('ipv4'):
|
elif self._options['ipv6'] and not self._options['ipv4']:
|
||||||
cmd.append('-6')
|
cmd.append('-6')
|
||||||
elif not self.get_option('ipv6') and not self.get_option('ipv4'):
|
elif not self._options['ipv6'] and not self._options['ipv4']:
|
||||||
raise AnsibleParserError('One of ipv4 or ipv6 must be enabled for this plugin')
|
raise AnsibleParserError('One of ipv4 or ipv6 must be enabled for this plugin')
|
||||||
|
|
||||||
if self.get_option('exclude'):
|
if self._options['exclude']:
|
||||||
cmd.append('--exclude')
|
cmd.append('--exclude')
|
||||||
cmd.append(','.join(self.get_option('exclude')))
|
cmd.append(','.join(self._options['exclude']))
|
||||||
|
|
||||||
if self.get_option('dns_resolve'):
|
if self._options['dns_resolve']:
|
||||||
cmd.append('-n')
|
cmd.append('-n')
|
||||||
|
|
||||||
if self.get_option('udp_scan'):
|
if self._options['udp_scan']:
|
||||||
cmd.append('-sU')
|
cmd.append('-sU')
|
||||||
|
|
||||||
if self.get_option('icmp_timestamp'):
|
if self._options['icmp_timestamp']:
|
||||||
cmd.append('-PP')
|
cmd.append('-PP')
|
||||||
|
|
||||||
if self.get_option('open'):
|
if self._options['open']:
|
||||||
cmd.append('--open')
|
cmd.append('--open')
|
||||||
|
|
||||||
if not self.get_option('use_arp_ping'):
|
cmd.append(self._options['address'])
|
||||||
cmd.append('--disable-arp-ping')
|
|
||||||
|
|
||||||
cmd.append(self.get_option('address'))
|
|
||||||
try:
|
try:
|
||||||
# execute
|
# execute
|
||||||
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
|
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ DOCUMENTATION = r'''
|
|||||||
- constructed
|
- constructed
|
||||||
description:
|
description:
|
||||||
- Get inventory hosts from OpenNebula cloud.
|
- Get inventory hosts from OpenNebula cloud.
|
||||||
- Uses an YAML configuration file ending with either C(opennebula.yml) or C(opennebula.yaml)
|
- Uses an YAML configuration file ending with either I(opennebula.yml) or I(opennebula.yaml)
|
||||||
to set parameter values.
|
to set parameter values.
|
||||||
- Uses O(api_authfile), C(~/.one/one_auth), or E(ONE_AUTH) pointing to a OpenNebula credentials file.
|
- Uses I(api_authfile), C(~/.one/one_auth), or C(ONE_AUTH) pointing to a OpenNebula credentials file.
|
||||||
options:
|
options:
|
||||||
plugin:
|
plugin:
|
||||||
description: Token that ensures this is a source file for the 'opennebula' plugin.
|
description: Token that ensures this is a source file for the 'opennebula' plugin.
|
||||||
@@ -31,7 +31,7 @@ DOCUMENTATION = r'''
|
|||||||
- URL of the OpenNebula RPC server.
|
- URL of the OpenNebula RPC server.
|
||||||
- It is recommended to use HTTPS so that the username/password are not
|
- It is recommended to use HTTPS so that the username/password are not
|
||||||
transferred over the network unencrypted.
|
transferred over the network unencrypted.
|
||||||
- If not set then the value of the E(ONE_URL) environment variable is used.
|
- If not set then the value of the C(ONE_URL) environment variable is used.
|
||||||
env:
|
env:
|
||||||
- name: ONE_URL
|
- name: ONE_URL
|
||||||
required: true
|
required: true
|
||||||
@@ -39,29 +39,29 @@ DOCUMENTATION = r'''
|
|||||||
api_username:
|
api_username:
|
||||||
description:
|
description:
|
||||||
- Name of the user to login into the OpenNebula RPC server. If not set
|
- Name of the user to login into the OpenNebula RPC server. If not set
|
||||||
then the value of the E(ONE_USERNAME) environment variable is used.
|
then the value of the C(ONE_USERNAME) environment variable is used.
|
||||||
env:
|
env:
|
||||||
- name: ONE_USERNAME
|
- name: ONE_USERNAME
|
||||||
type: string
|
type: string
|
||||||
api_password:
|
api_password:
|
||||||
description:
|
description:
|
||||||
- Password or a token of the user to login into OpenNebula RPC server.
|
- Password or a token of the user to login into OpenNebula RPC server.
|
||||||
- If not set, the value of the E(ONE_PASSWORD) environment variable is used.
|
- If not set, the value of the C(ONE_PASSWORD) environment variable is used.
|
||||||
env:
|
env:
|
||||||
- name: ONE_PASSWORD
|
- name: ONE_PASSWORD
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
api_authfile:
|
api_authfile:
|
||||||
description:
|
description:
|
||||||
- If both O(api_username) or O(api_password) are not set, then it will try
|
- If both I(api_username) or I(api_password) are not set, then it will try
|
||||||
authenticate with ONE auth file. Default path is C(~/.one/one_auth).
|
authenticate with ONE auth file. Default path is C(~/.one/one_auth).
|
||||||
- Set environment variable E(ONE_AUTH) to override this path.
|
- Set environment variable C(ONE_AUTH) to override this path.
|
||||||
env:
|
env:
|
||||||
- name: ONE_AUTH
|
- name: ONE_AUTH
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
hostname:
|
hostname:
|
||||||
description: Field to match the hostname. Note V(v4_first_ip) corresponds to the first IPv4 found on VM.
|
description: Field to match the hostname. Note C(v4_first_ip) corresponds to the first IPv4 found on VM.
|
||||||
type: string
|
type: string
|
||||||
default: v4_first_ip
|
default: v4_first_ip
|
||||||
choices:
|
choices:
|
||||||
|
|||||||
@@ -25,15 +25,15 @@ DOCUMENTATION = '''
|
|||||||
- inventory_cache
|
- inventory_cache
|
||||||
options:
|
options:
|
||||||
plugin:
|
plugin:
|
||||||
description: The name of this plugin, it should always be set to V(community.general.proxmox) for this plugin to recognize it as it's own.
|
description: The name of this plugin, it should always be set to C(community.general.proxmox) for this plugin to recognize it as it's own.
|
||||||
required: true
|
required: true
|
||||||
choices: ['community.general.proxmox']
|
choices: ['community.general.proxmox']
|
||||||
type: str
|
type: str
|
||||||
url:
|
url:
|
||||||
description:
|
description:
|
||||||
- URL to Proxmox cluster.
|
- URL to Proxmox cluster.
|
||||||
- If the value is not specified in the inventory configuration, the value of environment variable E(PROXMOX_URL) will be used instead.
|
- If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_URL) will be used instead.
|
||||||
- Since community.general 4.7.0 you can also use templating to specify the value of the O(url).
|
- Since community.general 4.7.0 you can also use templating to specify the value of the I(url).
|
||||||
default: 'http://localhost:8006'
|
default: 'http://localhost:8006'
|
||||||
type: str
|
type: str
|
||||||
env:
|
env:
|
||||||
@@ -42,8 +42,8 @@ DOCUMENTATION = '''
|
|||||||
user:
|
user:
|
||||||
description:
|
description:
|
||||||
- Proxmox authentication user.
|
- Proxmox authentication user.
|
||||||
- If the value is not specified in the inventory configuration, the value of environment variable E(PROXMOX_USER) will be used instead.
|
- If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_USER) will be used instead.
|
||||||
- Since community.general 4.7.0 you can also use templating to specify the value of the O(user).
|
- Since community.general 4.7.0 you can also use templating to specify the value of the I(user).
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
env:
|
env:
|
||||||
@@ -52,9 +52,9 @@ DOCUMENTATION = '''
|
|||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Proxmox authentication password.
|
- Proxmox authentication password.
|
||||||
- If the value is not specified in the inventory configuration, the value of environment variable E(PROXMOX_PASSWORD) will be used instead.
|
- If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_PASSWORD) will be used instead.
|
||||||
- Since community.general 4.7.0 you can also use templating to specify the value of the O(password).
|
- Since community.general 4.7.0 you can also use templating to specify the value of the I(password).
|
||||||
- If you do not specify a password, you must set O(token_id) and O(token_secret) instead.
|
- If you do not specify a password, you must set I(token_id) and I(token_secret) instead.
|
||||||
type: str
|
type: str
|
||||||
env:
|
env:
|
||||||
- name: PROXMOX_PASSWORD
|
- name: PROXMOX_PASSWORD
|
||||||
@@ -62,8 +62,8 @@ DOCUMENTATION = '''
|
|||||||
token_id:
|
token_id:
|
||||||
description:
|
description:
|
||||||
- Proxmox authentication token ID.
|
- Proxmox authentication token ID.
|
||||||
- If the value is not specified in the inventory configuration, the value of environment variable E(PROXMOX_TOKEN_ID) will be used instead.
|
- If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_TOKEN_ID) will be used instead.
|
||||||
- To use token authentication, you must also specify O(token_secret). If you do not specify O(token_id) and O(token_secret),
|
- To use token authentication, you must also specify I(token_secret). If you do not specify I(token_id) and I(token_secret),
|
||||||
you must set a password instead.
|
you must set a password instead.
|
||||||
- Make sure to grant explicit pve permissions to the token or disable 'privilege separation' to use the users' privileges instead.
|
- Make sure to grant explicit pve permissions to the token or disable 'privilege separation' to use the users' privileges instead.
|
||||||
version_added: 4.8.0
|
version_added: 4.8.0
|
||||||
@@ -73,8 +73,8 @@ DOCUMENTATION = '''
|
|||||||
token_secret:
|
token_secret:
|
||||||
description:
|
description:
|
||||||
- Proxmox authentication token secret.
|
- Proxmox authentication token secret.
|
||||||
- If the value is not specified in the inventory configuration, the value of environment variable E(PROXMOX_TOKEN_SECRET) will be used instead.
|
- If the value is not specified in the inventory configuration, the value of environment variable C(PROXMOX_TOKEN_SECRET) will be used instead.
|
||||||
- To use token authentication, you must also specify O(token_id). If you do not specify O(token_id) and O(token_secret),
|
- To use token authentication, you must also specify I(token_id). If you do not specify I(token_id) and I(token_secret),
|
||||||
you must set a password instead.
|
you must set a password instead.
|
||||||
version_added: 4.8.0
|
version_added: 4.8.0
|
||||||
type: str
|
type: str
|
||||||
@@ -95,25 +95,25 @@ DOCUMENTATION = '''
|
|||||||
want_facts:
|
want_facts:
|
||||||
description:
|
description:
|
||||||
- Gather LXC/QEMU configuration facts.
|
- Gather LXC/QEMU configuration facts.
|
||||||
- When O(want_facts) is set to V(true) more details about QEMU VM status are possible, besides the running and stopped states.
|
- When I(want_facts) is set to C(true) more details about QEMU VM status are possible, besides the running and stopped states.
|
||||||
Currently if the VM is running and it is suspended, the status will be running and the machine will be in C(running) group,
|
Currently if the VM is running and it is suspended, the status will be running and the machine will be in C(running) group,
|
||||||
but its actual state will be paused. See O(qemu_extended_statuses) for how to retrieve the real status.
|
but its actual state will be paused. See I(qemu_extended_statuses) for how to retrieve the real status.
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: bool
|
||||||
qemu_extended_statuses:
|
qemu_extended_statuses:
|
||||||
description:
|
description:
|
||||||
- Requires O(want_facts) to be set to V(true) to function. This will allow you to differentiate between C(paused) and C(prelaunch)
|
- Requires I(want_facts) to be set to C(true) to function. This will allow you to differentiate betweend C(paused) and C(prelaunch)
|
||||||
statuses of the QEMU VMs.
|
statuses of the QEMU VMs.
|
||||||
- This introduces multiple groups [prefixed with O(group_prefix)] C(prelaunch) and C(paused).
|
- This introduces multiple groups [prefixed with I(group_prefix)] C(prelaunch) and C(paused).
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: bool
|
||||||
version_added: 5.1.0
|
version_added: 5.1.0
|
||||||
want_proxmox_nodes_ansible_host:
|
want_proxmox_nodes_ansible_host:
|
||||||
version_added: 3.0.0
|
version_added: 3.0.0
|
||||||
description:
|
description:
|
||||||
- Whether to set C(ansible_host) for proxmox nodes.
|
- Whether to set C(ansbile_host) for proxmox nodes.
|
||||||
- When set to V(true) (default), will use the first available interface. This can be different from what you expect.
|
- When set to C(true) (default), will use the first available interface. This can be different from what you expect.
|
||||||
- The default of this option changed from V(true) to V(false) in community.general 6.0.0.
|
- The default of this option changed from C(true) to C(false) in community.general 6.0.0.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
filters:
|
filters:
|
||||||
@@ -590,10 +590,6 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||||||
ip = self._get_node_ip(node['node'])
|
ip = self._get_node_ip(node['node'])
|
||||||
self.inventory.set_variable(node['node'], 'ansible_host', ip)
|
self.inventory.set_variable(node['node'], 'ansible_host', ip)
|
||||||
|
|
||||||
# Setting composite variables
|
|
||||||
variables = self.inventory.get_host(node['node']).get_vars()
|
|
||||||
self._set_composite_vars(self.get_option('compose'), variables, node['node'], strict=self.strict)
|
|
||||||
|
|
||||||
# add LXC/Qemu groups for the node
|
# add LXC/Qemu groups for the node
|
||||||
for ittype in ('lxc', 'qemu'):
|
for ittype in ('lxc', 'qemu'):
|
||||||
node_type_group = self._group('%s_%s' % (node['node'], ittype))
|
node_type_group = self._group('%s_%s' % (node['node'], ittype))
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ DOCUMENTATION = r'''
|
|||||||
scw_profile:
|
scw_profile:
|
||||||
description:
|
description:
|
||||||
- The config profile to use in config file.
|
- The config profile to use in config file.
|
||||||
- By default uses the one specified as C(active_profile) in the config file, or falls back to V(default) if that is not defined.
|
- By default uses the one specified as C(active_profile) in the config file, or falls back to C(default) if that is not defined.
|
||||||
type: string
|
type: string
|
||||||
version_added: 4.4.0
|
version_added: 4.4.0
|
||||||
oauth_token:
|
oauth_token:
|
||||||
|
|||||||
@@ -23,21 +23,21 @@ DOCUMENTATION = '''
|
|||||||
- inventory_cache
|
- inventory_cache
|
||||||
options:
|
options:
|
||||||
plugin:
|
plugin:
|
||||||
description: The name of this plugin, it should always be set to V(community.general.xen_orchestra) for this plugin to recognize it as its own.
|
description: The name of this plugin, it should always be set to C(community.general.xen_orchestra) for this plugin to recognize it as its own.
|
||||||
required: true
|
required: true
|
||||||
choices: ['community.general.xen_orchestra']
|
choices: ['community.general.xen_orchestra']
|
||||||
type: str
|
type: str
|
||||||
api_host:
|
api_host:
|
||||||
description:
|
description:
|
||||||
- API host to XOA API.
|
- API host to XOA API.
|
||||||
- If the value is not specified in the inventory configuration, the value of environment variable E(ANSIBLE_XO_HOST) will be used instead.
|
- If the value is not specified in the inventory configuration, the value of environment variable C(ANSIBLE_XO_HOST) will be used instead.
|
||||||
type: str
|
type: str
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_XO_HOST
|
- name: ANSIBLE_XO_HOST
|
||||||
user:
|
user:
|
||||||
description:
|
description:
|
||||||
- Xen Orchestra user.
|
- Xen Orchestra user.
|
||||||
- If the value is not specified in the inventory configuration, the value of environment variable E(ANSIBLE_XO_USER) will be used instead.
|
- If the value is not specified in the inventory configuration, the value of environment variable C(ANSIBLE_XO_USER) will be used instead.
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
env:
|
env:
|
||||||
@@ -45,7 +45,7 @@ DOCUMENTATION = '''
|
|||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Xen Orchestra password.
|
- Xen Orchestra password.
|
||||||
- If the value is not specified in the inventory configuration, the value of environment variable E(ANSIBLE_XO_PASSWORD) will be used instead.
|
- If the value is not specified in the inventory configuration, the value of environment variable C(ANSIBLE_XO_PASSWORD) will be used instead.
|
||||||
required: true
|
required: true
|
||||||
type: str
|
type: str
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ DOCUMENTATION = """
|
|||||||
- bw (command line utility)
|
- bw (command line utility)
|
||||||
- be logged into bitwarden
|
- be logged into bitwarden
|
||||||
- bitwarden vault unlocked
|
- bitwarden vault unlocked
|
||||||
- E(BW_SESSION) environment variable set
|
- C(BW_SESSION) environment variable set
|
||||||
short_description: Retrieve secrets from Bitwarden
|
short_description: Retrieve secrets from Bitwarden
|
||||||
version_added: 5.4.0
|
version_added: 5.4.0
|
||||||
description:
|
description:
|
||||||
@@ -25,7 +25,7 @@ DOCUMENTATION = """
|
|||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
search:
|
search:
|
||||||
description: Field to retrieve, for example V(name) or V(id).
|
description: Field to retrieve, for example C(name) or C(id).
|
||||||
type: str
|
type: str
|
||||||
default: name
|
default: name
|
||||||
version_added: 5.7.0
|
version_added: 5.7.0
|
||||||
@@ -132,29 +132,20 @@ class Bitwarden(object):
|
|||||||
If field is None, return the whole record for each match.
|
If field is None, return the whole record for each match.
|
||||||
"""
|
"""
|
||||||
matches = self._get_matches(search_value, search_field, collection_id)
|
matches = self._get_matches(search_value, search_field, collection_id)
|
||||||
if not field:
|
|
||||||
|
if field in ['autofillOnPageLoad', 'password', 'passwordRevisionDate', 'totp', 'uris', 'username']:
|
||||||
|
return [match['login'][field] for match in matches]
|
||||||
|
elif not field:
|
||||||
return matches
|
return matches
|
||||||
field_matches = []
|
else:
|
||||||
for match in matches:
|
custom_field_matches = []
|
||||||
# if there are no custom fields, then `match` has no key 'fields'
|
for match in matches:
|
||||||
if 'fields' in match:
|
|
||||||
custom_field_found = False
|
|
||||||
for custom_field in match['fields']:
|
for custom_field in match['fields']:
|
||||||
if field == custom_field['name']:
|
if custom_field['name'] == field:
|
||||||
field_matches.append(custom_field['value'])
|
custom_field_matches.append(custom_field['value'])
|
||||||
custom_field_found = True
|
if matches and not custom_field_matches:
|
||||||
break
|
raise AnsibleError("Custom field {field} does not exist in {search_value}".format(field=field, search_value=search_value))
|
||||||
if custom_field_found:
|
return custom_field_matches
|
||||||
continue
|
|
||||||
if 'login' in match and field in match['login']:
|
|
||||||
field_matches.append(match['login'][field])
|
|
||||||
continue
|
|
||||||
if field in match:
|
|
||||||
field_matches.append(match[field])
|
|
||||||
continue
|
|
||||||
if matches and not field_matches:
|
|
||||||
raise AnsibleError("field {field} does not exist in {search_value}".format(field=field, search_value=search_value))
|
|
||||||
return field_matches
|
|
||||||
|
|
||||||
|
|
||||||
class LookupModule(LookupBase):
|
class LookupModule(LookupBase):
|
||||||
|
|||||||
@@ -1,125 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright (c) 2023, jantari (https://github.com/jantari)
|
|
||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
from __future__ import (absolute_import, division, print_function)
|
|
||||||
|
|
||||||
__metaclass__ = type
|
|
||||||
|
|
||||||
DOCUMENTATION = """
|
|
||||||
name: bitwarden_secrets_manager
|
|
||||||
author:
|
|
||||||
- jantari (@jantari)
|
|
||||||
requirements:
|
|
||||||
- bws (command line utility)
|
|
||||||
short_description: Retrieve secrets from Bitwarden Secrets Manager
|
|
||||||
version_added: 7.2.0
|
|
||||||
description:
|
|
||||||
- Retrieve secrets from Bitwarden Secrets Manager.
|
|
||||||
options:
|
|
||||||
_terms:
|
|
||||||
description: Secret ID(s) to fetch values for.
|
|
||||||
required: true
|
|
||||||
type: list
|
|
||||||
elements: str
|
|
||||||
bws_access_token:
|
|
||||||
description: The BWS access token to use for this lookup.
|
|
||||||
env:
|
|
||||||
- name: BWS_ACCESS_TOKEN
|
|
||||||
required: true
|
|
||||||
type: str
|
|
||||||
"""
|
|
||||||
|
|
||||||
EXAMPLES = """
|
|
||||||
- name: Get a secret relying on the BWS_ACCESS_TOKEN environment variable for authentication
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: >-
|
|
||||||
{{ lookup("community.general.bitwarden_secrets_manager", "2bc23e48-4932-40de-a047-5524b7ddc972") }}
|
|
||||||
|
|
||||||
- name: Get a secret passing an explicit access token for authentication
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: >-
|
|
||||||
{{
|
|
||||||
lookup(
|
|
||||||
"community.general.bitwarden_secrets_manager",
|
|
||||||
"2bc23e48-4932-40de-a047-5524b7ddc972",
|
|
||||||
bws_access_token="9.4f570d14-4b54-42f5-bc07-60f4450b1db5.YmluYXJ5LXNvbWV0aGluZy0xMjMK:d2h5IGhlbGxvIHRoZXJlCg=="
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
|
|
||||||
- name: Get two different secrets each using a different access token for authentication
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg:
|
|
||||||
- '{{ lookup("community.general.bitwarden_secrets_manager", "2bc23e48-4932-40de-a047-5524b7ddc972", bws_access_token=token1) }}'
|
|
||||||
- '{{ lookup("community.general.bitwarden_secrets_manager", "9d89af4c-eb5d-41f5-bb0f-4ae81215c768", bws_access_token=token2) }}'
|
|
||||||
vars:
|
|
||||||
token1: "9.4f570d14-4b54-42f5-bc07-60f4450b1db5.YmluYXJ5LXNvbWV0aGluZy0xMjMK:d2h5IGhlbGxvIHRoZXJlCg=="
|
|
||||||
token2: "1.69b72797-6ea9-4687-a11e-848e41a30ae6.YW5zaWJsZSBpcyBncmVhdD8K:YW5zaWJsZSBpcyBncmVhdAo="
|
|
||||||
|
|
||||||
- name: Get just the value of a secret
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: >-
|
|
||||||
{{ lookup("community.general.bitwarden_secrets_manager", "2bc23e48-4932-40de-a047-5524b7ddc972").value }}
|
|
||||||
"""
|
|
||||||
|
|
||||||
RETURN = """
|
|
||||||
_raw:
|
|
||||||
description: List containing one or more secrets.
|
|
||||||
type: list
|
|
||||||
elements: dict
|
|
||||||
"""
|
|
||||||
|
|
||||||
from subprocess import Popen, PIPE
|
|
||||||
|
|
||||||
from ansible.errors import AnsibleLookupError
|
|
||||||
from ansible.module_utils.common.text.converters import to_text
|
|
||||||
from ansible.parsing.ajson import AnsibleJSONDecoder
|
|
||||||
from ansible.plugins.lookup import LookupBase
|
|
||||||
|
|
||||||
|
|
||||||
class BitwardenSecretsManagerException(AnsibleLookupError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class BitwardenSecretsManager(object):
|
|
||||||
def __init__(self, path='bws'):
|
|
||||||
self._cli_path = path
|
|
||||||
|
|
||||||
@property
|
|
||||||
def cli_path(self):
|
|
||||||
return self._cli_path
|
|
||||||
|
|
||||||
def _run(self, args, stdin=None):
|
|
||||||
p = Popen([self.cli_path] + args, stdout=PIPE, stderr=PIPE, stdin=PIPE)
|
|
||||||
out, err = p.communicate(stdin)
|
|
||||||
rc = p.wait()
|
|
||||||
return to_text(out, errors='surrogate_or_strict'), to_text(err, errors='surrogate_or_strict'), rc
|
|
||||||
|
|
||||||
def get_secret(self, secret_id, bws_access_token):
|
|
||||||
"""Get and return the secret with the given secret_id.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Prepare set of params for Bitwarden Secrets Manager CLI
|
|
||||||
# Color output was not always disabled correctly with the default 'auto' setting so explicitly disable it.
|
|
||||||
params = [
|
|
||||||
'--color', 'no',
|
|
||||||
'--access-token', bws_access_token,
|
|
||||||
'get', 'secret', secret_id
|
|
||||||
]
|
|
||||||
|
|
||||||
out, err, rc = self._run(params)
|
|
||||||
if rc != 0:
|
|
||||||
raise BitwardenSecretsManagerException(to_text(err))
|
|
||||||
|
|
||||||
return AnsibleJSONDecoder().raw_decode(out)[0]
|
|
||||||
|
|
||||||
|
|
||||||
class LookupModule(LookupBase):
|
|
||||||
def run(self, terms, variables=None, **kwargs):
|
|
||||||
self.set_options(var_options=variables, direct=kwargs)
|
|
||||||
bws_access_token = self.get_option('bws_access_token')
|
|
||||||
|
|
||||||
return [_bitwarden_secrets_manager.get_secret(term, bws_access_token) for term in terms]
|
|
||||||
|
|
||||||
|
|
||||||
_bitwarden_secrets_manager = BitwardenSecretsManager()
|
|
||||||
@@ -13,22 +13,22 @@ short_description: Retrieves the version of an installed collection
|
|||||||
description:
|
description:
|
||||||
- This lookup allows to query the version of an installed collection, and to determine whether a
|
- This lookup allows to query the version of an installed collection, and to determine whether a
|
||||||
collection is installed at all.
|
collection is installed at all.
|
||||||
- By default it returns V(none) for non-existing collections and V(*) for collections without a
|
- By default it returns C(none) for non-existing collections and C(*) for collections without a
|
||||||
version number. The latter should only happen in development environments, or when installing
|
version number. The latter should only happen in development environments, or when installing
|
||||||
a collection from git which has no version in its C(galaxy.yml). This behavior can be adjusted
|
a collection from git which has no version in its C(galaxy.yml). This behavior can be adjusted
|
||||||
by providing other values with O(result_not_found) and O(result_no_version).
|
by providing other values with I(result_not_found) and I(result_no_version).
|
||||||
options:
|
options:
|
||||||
_terms:
|
_terms:
|
||||||
description:
|
description:
|
||||||
- The collections to look for.
|
- The collections to look for.
|
||||||
- For example V(community.general).
|
- For example C(community.general).
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
required: true
|
required: true
|
||||||
result_not_found:
|
result_not_found:
|
||||||
description:
|
description:
|
||||||
- The value to return when the collection could not be found.
|
- The value to return when the collection could not be found.
|
||||||
- By default, V(none) is returned.
|
- By default, C(none) is returned.
|
||||||
type: string
|
type: string
|
||||||
default: ~
|
default: ~
|
||||||
result_no_version:
|
result_no_version:
|
||||||
@@ -36,7 +36,7 @@ options:
|
|||||||
- The value to return when the collection has no version number.
|
- The value to return when the collection has no version number.
|
||||||
- This can happen for collections installed from git which do not have a version number
|
- This can happen for collections installed from git which do not have a version number
|
||||||
in C(galaxy.yml).
|
in C(galaxy.yml).
|
||||||
- By default, V(*) is returned.
|
- By default, C(*) is returned.
|
||||||
type: string
|
type: string
|
||||||
default: '*'
|
default: '*'
|
||||||
"""
|
"""
|
||||||
@@ -51,11 +51,11 @@ RETURN = """
|
|||||||
_raw:
|
_raw:
|
||||||
description:
|
description:
|
||||||
- The version number of the collections listed as input.
|
- The version number of the collections listed as input.
|
||||||
- If a collection can not be found, it will return the value provided in O(result_not_found).
|
- If a collection can not be found, it will return the value provided in I(result_not_found).
|
||||||
By default, this is V(none).
|
By default, this is C(none).
|
||||||
- If a collection can be found, but the version not identified, it will return the value provided in
|
- If a collection can be found, but the version not identified, it will return the value provided in
|
||||||
O(result_no_version). By default, this is V(*). This can happen for collections installed
|
I(result_no_version). By default, this is C(*). This can happen for collections installed
|
||||||
from git which do not have a version number in V(galaxy.yml).
|
from git which do not have a version number in C(galaxy.yml).
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -38,20 +38,23 @@ DOCUMENTATION = '''
|
|||||||
default: localhost
|
default: localhost
|
||||||
description:
|
description:
|
||||||
- The target to connect to, must be a resolvable address.
|
- The target to connect to, must be a resolvable address.
|
||||||
- Will be determined from E(ANSIBLE_CONSUL_URL) if that is set.
|
Will be determined from C(ANSIBLE_CONSUL_URL) if that is set.
|
||||||
|
- "C(ANSIBLE_CONSUL_URL) should look like this: C(https://my.consul.server:8500)"
|
||||||
|
env:
|
||||||
|
- name: ANSIBLE_CONSUL_URL
|
||||||
ini:
|
ini:
|
||||||
- section: lookup_consul
|
- section: lookup_consul
|
||||||
key: host
|
key: host
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- The port of the target host to connect to.
|
- The port of the target host to connect to.
|
||||||
- If you use E(ANSIBLE_CONSUL_URL) this value will be used from there.
|
- If you use C(ANSIBLE_CONSUL_URL) this value will be used from there.
|
||||||
default: 8500
|
default: 8500
|
||||||
scheme:
|
scheme:
|
||||||
default: http
|
default: http
|
||||||
description:
|
description:
|
||||||
- Whether to use http or https.
|
- Whether to use http or https.
|
||||||
- If you use E(ANSIBLE_CONSUL_URL) this value will be used from there.
|
- If you use C(ANSIBLE_CONSUL_URL) this value will be used from there.
|
||||||
validate_certs:
|
validate_certs:
|
||||||
default: true
|
default: true
|
||||||
description: Whether to verify the ssl connection or not.
|
description: Whether to verify the ssl connection or not.
|
||||||
@@ -68,9 +71,7 @@ DOCUMENTATION = '''
|
|||||||
- section: lookup_consul
|
- section: lookup_consul
|
||||||
key: client_cert
|
key: client_cert
|
||||||
url:
|
url:
|
||||||
description:
|
description: "The target to connect to, should look like this: C(https://my.consul.server:8500)."
|
||||||
- The target to connect to.
|
|
||||||
- "Should look like this: V(https://my.consul.server:8500)."
|
|
||||||
type: str
|
type: str
|
||||||
version_added: 1.0.0
|
version_added: 1.0.0
|
||||||
env:
|
env:
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user