ansible-core 2.19.0rc2__py3-none-any.whl → 2.19.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ansible-core might be problematic. Click here for more details.
- ansible/_internal/_ansiballz/_builder.py +25 -14
- ansible/_internal/_templating/_engine.py +6 -4
- ansible/_internal/_templating/_jinja_bits.py +3 -1
- ansible/_internal/_templating/_jinja_plugins.py +7 -2
- ansible/_internal/_templating/_lazy_containers.py +5 -5
- ansible/config/base.yml +16 -6
- ansible/config/manager.py +7 -3
- ansible/executor/task_executor.py +4 -1
- ansible/executor/task_queue_manager.py +2 -2
- ansible/module_utils/_internal/_ansiballz/_extensions/_debugpy.py +97 -0
- ansible/module_utils/_internal/_ansiballz/_extensions/_pydevd.py +2 -4
- ansible/module_utils/_internal/_traceback.py +1 -1
- ansible/module_utils/ansible_release.py +1 -1
- ansible/module_utils/basic.py +10 -2
- ansible/module_utils/common/validation.py +4 -1
- ansible/modules/dnf.py +36 -50
- ansible/modules/dnf5.py +36 -29
- ansible/modules/meta.py +2 -1
- ansible/modules/service_facts.py +5 -1
- ansible/playbook/helpers.py +1 -0
- ansible/playbook/taggable.py +1 -2
- ansible/plugins/__init__.py +18 -10
- ansible/plugins/callback/__init__.py +6 -1
- ansible/plugins/lookup/template.py +6 -1
- ansible/release.py +1 -1
- ansible/utils/encrypt.py +2 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/METADATA +1 -1
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/RECORD +46 -45
- ansible_test/_internal/commands/integration/coverage.py +2 -2
- ansible_test/_internal/commands/shell/__init__.py +67 -28
- ansible_test/_internal/coverage_util.py +28 -25
- ansible_test/_internal/debugging.py +337 -49
- ansible_test/_internal/host_profiles.py +43 -43
- ansible_test/_internal/metadata.py +7 -42
- ansible_test/_internal/python_requirements.py +2 -2
- ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg +1 -0
- ansible_test/_util/target/setup/bootstrap.sh +37 -16
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/WHEEL +0 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/entry_points.txt +0 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/licenses/COPYING +0 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/licenses/licenses/Apache-License.txt +0 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/licenses/licenses/BSD-3-Clause.txt +0 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/licenses/licenses/MIT-license.txt +0 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/licenses/licenses/PSF-license.txt +0 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/licenses/licenses/simplified_bsd.txt +0 -0
- {ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/top_level.txt +0 -0
|
@@ -22,6 +22,9 @@ from .diff import (
|
|
|
22
22
|
FileDiff,
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
+
if t.TYPE_CHECKING:
|
|
26
|
+
from .debugging import DebuggerSettings
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
class Metadata:
|
|
27
30
|
"""Metadata object for passing data to delegated tests."""
|
|
@@ -71,7 +74,7 @@ class Metadata:
|
|
|
71
74
|
ansible_test_root=self.ansible_test_root,
|
|
72
75
|
collection_root=self.collection_root,
|
|
73
76
|
debugger_flags=dataclasses.asdict(self.debugger_flags),
|
|
74
|
-
debugger_settings=
|
|
77
|
+
debugger_settings=self.debugger_settings.as_dict() if self.debugger_settings else None,
|
|
75
78
|
)
|
|
76
79
|
|
|
77
80
|
def to_file(self, path: str) -> None:
|
|
@@ -91,6 +94,8 @@ class Metadata:
|
|
|
91
94
|
@staticmethod
|
|
92
95
|
def from_dict(data: dict[str, t.Any]) -> Metadata:
|
|
93
96
|
"""Return metadata loaded from the specified dictionary."""
|
|
97
|
+
from .debugging import DebuggerSettings
|
|
98
|
+
|
|
94
99
|
metadata = Metadata(
|
|
95
100
|
debugger_flags=DebuggerFlags(**data['debugger_flags']),
|
|
96
101
|
)
|
|
@@ -103,7 +108,7 @@ class Metadata:
|
|
|
103
108
|
metadata.ansible_lib_root = data['ansible_lib_root']
|
|
104
109
|
metadata.ansible_test_root = data['ansible_test_root']
|
|
105
110
|
metadata.collection_root = data['collection_root']
|
|
106
|
-
metadata.debugger_settings = DebuggerSettings(
|
|
111
|
+
metadata.debugger_settings = DebuggerSettings.from_dict(data['debugger_settings']) if data['debugger_settings'] else None
|
|
107
112
|
metadata.loaded = True
|
|
108
113
|
|
|
109
114
|
return metadata
|
|
@@ -155,46 +160,6 @@ class ChangeDescription:
|
|
|
155
160
|
return changes
|
|
156
161
|
|
|
157
162
|
|
|
158
|
-
@dataclasses.dataclass(frozen=True, kw_only=True)
|
|
159
|
-
class DebuggerSettings:
|
|
160
|
-
"""Settings for remote debugging."""
|
|
161
|
-
|
|
162
|
-
module: str | None = None
|
|
163
|
-
"""
|
|
164
|
-
The Python module to import.
|
|
165
|
-
This should be pydevd or a derivative.
|
|
166
|
-
If not provided it will be auto-detected.
|
|
167
|
-
"""
|
|
168
|
-
|
|
169
|
-
package: str | None = None
|
|
170
|
-
"""
|
|
171
|
-
The Python package to install for debugging.
|
|
172
|
-
If `None` then the package will be auto-detected.
|
|
173
|
-
If an empty string, then no package will be installed.
|
|
174
|
-
"""
|
|
175
|
-
|
|
176
|
-
settrace: dict[str, object] = dataclasses.field(default_factory=dict)
|
|
177
|
-
"""
|
|
178
|
-
Options to pass to the `{module}.settrace` method.
|
|
179
|
-
Used for running AnsiballZ modules only.
|
|
180
|
-
The `host` and `port` options will be provided by ansible-test.
|
|
181
|
-
The `suspend` option defaults to `False`.
|
|
182
|
-
"""
|
|
183
|
-
|
|
184
|
-
args: list[str] = dataclasses.field(default_factory=list)
|
|
185
|
-
"""
|
|
186
|
-
Arguments to pass to `pydevd` on the command line.
|
|
187
|
-
Used for running Ansible CLI programs only.
|
|
188
|
-
The `--client` and `--port` options will be provided by ansible-test.
|
|
189
|
-
"""
|
|
190
|
-
|
|
191
|
-
port: int = 5678
|
|
192
|
-
"""
|
|
193
|
-
The port on the origin host which is listening for incoming connections from pydevd.
|
|
194
|
-
SSH port forwarding will be automatically configured for non-local hosts to connect to this port as needed.
|
|
195
|
-
"""
|
|
196
|
-
|
|
197
|
-
|
|
198
163
|
@dataclasses.dataclass(frozen=True, kw_only=True)
|
|
199
164
|
class DebuggerFlags:
|
|
200
165
|
"""Flags for enabling specific debugging features."""
|
|
@@ -170,11 +170,11 @@ def install_requirements(
|
|
|
170
170
|
|
|
171
171
|
from .host_profiles import DebuggableProfile
|
|
172
172
|
|
|
173
|
-
if isinstance(host_profile, DebuggableProfile) and host_profile.
|
|
173
|
+
if isinstance(host_profile, DebuggableProfile) and host_profile.debugger and host_profile.debugger.get_python_package():
|
|
174
174
|
commands.append(PipInstall(
|
|
175
175
|
requirements=[],
|
|
176
176
|
constraints=[],
|
|
177
|
-
packages=[
|
|
177
|
+
packages=[host_profile.debugger.get_python_package()],
|
|
178
178
|
))
|
|
179
179
|
|
|
180
180
|
if not commands:
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
set -eu
|
|
4
4
|
|
|
5
|
+
retry_init()
|
|
6
|
+
{
|
|
7
|
+
attempt=0
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
retry_or_fail()
|
|
11
|
+
{
|
|
12
|
+
attempt=$((attempt + 1))
|
|
13
|
+
|
|
14
|
+
if [ $attempt -gt 5 ]; then
|
|
15
|
+
echo "Failed to install packages. Giving up."
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
echo "Failed to install packages. Sleeping before trying again..."
|
|
20
|
+
sleep 10
|
|
21
|
+
}
|
|
22
|
+
|
|
5
23
|
remove_externally_managed_marker()
|
|
6
24
|
{
|
|
7
25
|
"${python_interpreter}" -c '
|
|
@@ -64,13 +82,13 @@ install_pip() {
|
|
|
64
82
|
;;
|
|
65
83
|
esac
|
|
66
84
|
|
|
85
|
+
retry_init
|
|
67
86
|
while true; do
|
|
68
87
|
curl --silent --show-error "${pip_bootstrap_url}" -o /tmp/get-pip.py && \
|
|
69
88
|
"${python_interpreter}" /tmp/get-pip.py --disable-pip-version-check --quiet && \
|
|
70
89
|
rm /tmp/get-pip.py \
|
|
71
90
|
&& break
|
|
72
|
-
|
|
73
|
-
sleep 10
|
|
91
|
+
retry_or_fail
|
|
74
92
|
done
|
|
75
93
|
fi
|
|
76
94
|
}
|
|
@@ -99,21 +117,21 @@ bootstrap_remote_alpine()
|
|
|
99
117
|
"
|
|
100
118
|
fi
|
|
101
119
|
|
|
120
|
+
retry_init
|
|
102
121
|
while true; do
|
|
103
122
|
# shellcheck disable=SC2086
|
|
104
123
|
apk add -q ${packages} \
|
|
105
124
|
&& break
|
|
106
|
-
|
|
107
|
-
sleep 10
|
|
125
|
+
retry_or_fail
|
|
108
126
|
done
|
|
109
127
|
|
|
110
128
|
# Upgrade the `libexpat` package to ensure that an upgraded Python (`pyexpat`) continues to work.
|
|
129
|
+
retry_init
|
|
111
130
|
while true; do
|
|
112
131
|
# shellcheck disable=SC2086
|
|
113
132
|
apk upgrade -q libexpat \
|
|
114
133
|
&& break
|
|
115
|
-
|
|
116
|
-
sleep 10
|
|
134
|
+
retry_or_fail
|
|
117
135
|
done
|
|
118
136
|
}
|
|
119
137
|
|
|
@@ -138,12 +156,12 @@ bootstrap_remote_fedora()
|
|
|
138
156
|
"
|
|
139
157
|
fi
|
|
140
158
|
|
|
159
|
+
retry_init
|
|
141
160
|
while true; do
|
|
142
161
|
# shellcheck disable=SC2086
|
|
143
162
|
dnf install -q -y ${packages} \
|
|
144
163
|
&& break
|
|
145
|
-
|
|
146
|
-
sleep 10
|
|
164
|
+
retry_or_fail
|
|
147
165
|
done
|
|
148
166
|
}
|
|
149
167
|
|
|
@@ -169,6 +187,9 @@ bootstrap_remote_freebsd()
|
|
|
169
187
|
# Declare platform/python version combinations which do not have supporting OS packages available.
|
|
170
188
|
# For these combinations ansible-test will use pip to install the requirements instead.
|
|
171
189
|
case "${platform_version}/${python_version}" in
|
|
190
|
+
13.5/3.11)
|
|
191
|
+
# defaults available
|
|
192
|
+
;;
|
|
172
193
|
14.2/3.11)
|
|
173
194
|
# defaults available
|
|
174
195
|
;;
|
|
@@ -191,13 +212,13 @@ bootstrap_remote_freebsd()
|
|
|
191
212
|
"
|
|
192
213
|
fi
|
|
193
214
|
|
|
215
|
+
retry_init
|
|
194
216
|
while true; do
|
|
195
217
|
# shellcheck disable=SC2086
|
|
196
218
|
env ASSUME_ALWAYS_YES=YES pkg bootstrap && \
|
|
197
219
|
pkg install -q -y ${packages} \
|
|
198
220
|
&& break
|
|
199
|
-
|
|
200
|
-
sleep 10
|
|
221
|
+
retry_or_fail
|
|
201
222
|
done
|
|
202
223
|
|
|
203
224
|
install_pip
|
|
@@ -272,12 +293,12 @@ bootstrap_remote_rhel_9()
|
|
|
272
293
|
"
|
|
273
294
|
fi
|
|
274
295
|
|
|
296
|
+
retry_init
|
|
275
297
|
while true; do
|
|
276
298
|
# shellcheck disable=SC2086
|
|
277
299
|
dnf install -q -y ${packages} \
|
|
278
300
|
&& break
|
|
279
|
-
|
|
280
|
-
sleep 10
|
|
301
|
+
retry_or_fail
|
|
281
302
|
done
|
|
282
303
|
}
|
|
283
304
|
|
|
@@ -302,12 +323,12 @@ bootstrap_remote_rhel_10()
|
|
|
302
323
|
"
|
|
303
324
|
fi
|
|
304
325
|
|
|
326
|
+
retry_init
|
|
305
327
|
while true; do
|
|
306
328
|
# shellcheck disable=SC2086
|
|
307
329
|
dnf install -q -y ${packages} \
|
|
308
330
|
&& break
|
|
309
|
-
|
|
310
|
-
sleep 10
|
|
331
|
+
retry_or_fail
|
|
311
332
|
done
|
|
312
333
|
}
|
|
313
334
|
|
|
@@ -354,13 +375,13 @@ bootstrap_remote_ubuntu()
|
|
|
354
375
|
"
|
|
355
376
|
fi
|
|
356
377
|
|
|
378
|
+
retry_init
|
|
357
379
|
while true; do
|
|
358
380
|
# shellcheck disable=SC2086
|
|
359
381
|
apt-get update -qq -y && \
|
|
360
382
|
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends ${packages} \
|
|
361
383
|
&& break
|
|
362
|
-
|
|
363
|
-
sleep 10
|
|
384
|
+
retry_or_fail
|
|
364
385
|
done
|
|
365
386
|
}
|
|
366
387
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/licenses/licenses/MIT-license.txt
RENAMED
|
File without changes
|
{ansible_core-2.19.0rc2.dist-info → ansible_core-2.19.1.dist-info}/licenses/licenses/PSF-license.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|