ansible-core 2.16.12rc1__py3-none-any.whl → 2.16.13__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/executor/play_iterator.py +18 -0
- ansible/executor/task_executor.py +2 -2
- ansible/module_utils/ansible_release.py +1 -1
- ansible/modules/user.py +15 -2
- ansible/plugins/action/include_vars.py +2 -1
- ansible/plugins/strategy/__init__.py +2 -0
- ansible/plugins/strategy/linear.py +1 -13
- ansible/release.py +1 -1
- {ansible_core-2.16.12rc1.dist-info → ansible_core-2.16.13.dist-info}/METADATA +1 -1
- {ansible_core-2.16.12rc1.dist-info → ansible_core-2.16.13.dist-info}/RECORD +18 -18
- {ansible_core-2.16.12rc1.dist-info → ansible_core-2.16.13.dist-info}/WHEEL +1 -1
- ansible_test/_internal/docker_util.py +9 -1
- ansible_test/_internal/util.py +16 -8
- ansible_test/_util/controller/sanity/pylint/plugins/hide_unraisable.py +3 -4
- {ansible_core-2.16.12rc1.data → ansible_core-2.16.13.data}/scripts/ansible-test +0 -0
- {ansible_core-2.16.12rc1.dist-info → ansible_core-2.16.13.dist-info}/COPYING +0 -0
- {ansible_core-2.16.12rc1.dist-info → ansible_core-2.16.13.dist-info}/entry_points.txt +0 -0
- {ansible_core-2.16.12rc1.dist-info → ansible_core-2.16.13.dist-info}/top_level.txt +0 -0
|
@@ -449,6 +449,24 @@ class PlayIterator:
|
|
|
449
449
|
|
|
450
450
|
# if something above set the task, break out of the loop now
|
|
451
451
|
if task:
|
|
452
|
+
# skip implicit flush_handlers if there are no handlers notified
|
|
453
|
+
if (
|
|
454
|
+
task.implicit
|
|
455
|
+
and task.action in C._ACTION_META
|
|
456
|
+
and task.args.get('_raw_params', None) == 'flush_handlers'
|
|
457
|
+
and (
|
|
458
|
+
# the state store in the `state` variable could be a nested state,
|
|
459
|
+
# notifications are always stored in the top level state, get it here
|
|
460
|
+
not self.get_state_for_host(host.name).handler_notifications
|
|
461
|
+
# in case handlers notifying other handlers, the notifications are not
|
|
462
|
+
# saved in `handler_notifications` and handlers are notified directly
|
|
463
|
+
# to prevent duplicate handler runs, so check whether any handler
|
|
464
|
+
# is notified
|
|
465
|
+
and all(not h.notified_hosts for h in self.handlers)
|
|
466
|
+
)
|
|
467
|
+
):
|
|
468
|
+
continue
|
|
469
|
+
|
|
452
470
|
break
|
|
453
471
|
|
|
454
472
|
return (state, task)
|
|
@@ -656,8 +656,8 @@ class TaskExecutor:
|
|
|
656
656
|
self._handler.cleanup()
|
|
657
657
|
display.debug("handler run complete")
|
|
658
658
|
|
|
659
|
-
#
|
|
660
|
-
result["_ansible_no_log"] = no_log
|
|
659
|
+
# propagate no log to result- the action can set this, so only overwrite it with the task's value if missing or falsey
|
|
660
|
+
result["_ansible_no_log"] = bool(no_log or result.get('_ansible_no_log', False))
|
|
661
661
|
|
|
662
662
|
if self._task.action not in C._ACTION_WITH_CLEAN_FACTS:
|
|
663
663
|
result = wrap_var(result)
|
ansible/modules/user.py
CHANGED
|
@@ -1160,9 +1160,11 @@ class User(object):
|
|
|
1160
1160
|
overwrite = None
|
|
1161
1161
|
try:
|
|
1162
1162
|
ssh_key_file = self.get_ssh_key_path()
|
|
1163
|
+
pub_file = '%s.pub' % ssh_key_file
|
|
1163
1164
|
except Exception as e:
|
|
1164
1165
|
return (1, '', to_native(e))
|
|
1165
1166
|
ssh_dir = os.path.dirname(ssh_key_file)
|
|
1167
|
+
|
|
1166
1168
|
if not os.path.exists(ssh_dir):
|
|
1167
1169
|
if self.module.check_mode:
|
|
1168
1170
|
return (0, '', '')
|
|
@@ -1171,12 +1173,23 @@ class User(object):
|
|
|
1171
1173
|
os.chown(ssh_dir, info[2], info[3])
|
|
1172
1174
|
except OSError as e:
|
|
1173
1175
|
return (1, '', 'Failed to create %s: %s' % (ssh_dir, to_native(e)))
|
|
1176
|
+
|
|
1174
1177
|
if os.path.exists(ssh_key_file):
|
|
1175
1178
|
if self.force:
|
|
1176
|
-
|
|
1179
|
+
self.module.warn('Overwriting existing ssh key private file "%s"' % ssh_key_file)
|
|
1177
1180
|
overwrite = 'y'
|
|
1178
1181
|
else:
|
|
1182
|
+
self.module.warn('Found existing ssh key private file "%s", no force, so skipping ssh-keygen generation' % ssh_key_file)
|
|
1179
1183
|
return (None, 'Key already exists, use "force: yes" to overwrite', '')
|
|
1184
|
+
|
|
1185
|
+
if os.path.exists(pub_file):
|
|
1186
|
+
if self.force:
|
|
1187
|
+
self.module.warn('Overwriting existing ssh key public file "%s"' % pub_file)
|
|
1188
|
+
os.unlink(pub_file)
|
|
1189
|
+
else:
|
|
1190
|
+
self.module.warn('Found existing ssh key public file "%s", no force, so skipping ssh-keygen generation' % pub_file)
|
|
1191
|
+
return (None, 'Public key already exists, use "force: yes" to overwrite', '')
|
|
1192
|
+
|
|
1180
1193
|
cmd = [self.module.get_bin_path('ssh-keygen', True)]
|
|
1181
1194
|
cmd.append('-t')
|
|
1182
1195
|
cmd.append(self.ssh_type)
|
|
@@ -1243,7 +1256,7 @@ class User(object):
|
|
|
1243
1256
|
# If the keys were successfully created, we should be able
|
|
1244
1257
|
# to tweak ownership.
|
|
1245
1258
|
os.chown(ssh_key_file, info[2], info[3])
|
|
1246
|
-
os.chown(
|
|
1259
|
+
os.chown(pub_file, info[2], info[3])
|
|
1247
1260
|
return (rc, out, err)
|
|
1248
1261
|
|
|
1249
1262
|
def ssh_key_fingerprint(self):
|
|
@@ -238,7 +238,8 @@ class ActionModule(ActionBase):
|
|
|
238
238
|
b_data, show_content = self._loader._get_file_contents(filename)
|
|
239
239
|
data = to_text(b_data, errors='surrogate_or_strict')
|
|
240
240
|
|
|
241
|
-
self.show_content
|
|
241
|
+
self.show_content &= show_content # mask all results if any file was encrypted
|
|
242
|
+
|
|
242
243
|
data = self._loader.load(data, file_name=filename, show_content=show_content)
|
|
243
244
|
if not data:
|
|
244
245
|
data = dict()
|
|
@@ -928,6 +928,8 @@ class StrategyBase:
|
|
|
928
928
|
meta_action = task.args.get('_raw_params')
|
|
929
929
|
|
|
930
930
|
def _evaluate_conditional(h):
|
|
931
|
+
if not task.when:
|
|
932
|
+
return True
|
|
931
933
|
all_vars = self._variable_manager.get_vars(play=iterator._play, host=h, task=task,
|
|
932
934
|
_hosts=self._hosts_cache, _hosts_all=self._hosts_cache_all)
|
|
933
935
|
templar = Templar(loader=self._loader, variables=all_vars)
|
|
@@ -37,7 +37,6 @@ from ansible.executor.play_iterator import IteratingStates, FailedStates
|
|
|
37
37
|
from ansible.module_utils.common.text.converters import to_text
|
|
38
38
|
from ansible.playbook.handler import Handler
|
|
39
39
|
from ansible.playbook.included_file import IncludedFile
|
|
40
|
-
from ansible.playbook.task import Task
|
|
41
40
|
from ansible.plugins.loader import action_loader
|
|
42
41
|
from ansible.plugins.strategy import StrategyBase
|
|
43
42
|
from ansible.template import Templar
|
|
@@ -54,12 +53,6 @@ class StrategyModule(StrategyBase):
|
|
|
54
53
|
be a noop task to keep the iterator in lock step across
|
|
55
54
|
all hosts.
|
|
56
55
|
'''
|
|
57
|
-
noop_task = Task()
|
|
58
|
-
noop_task.action = 'meta'
|
|
59
|
-
noop_task.args['_raw_params'] = 'noop'
|
|
60
|
-
noop_task.implicit = True
|
|
61
|
-
noop_task.set_loader(iterator._play._loader)
|
|
62
|
-
|
|
63
56
|
state_task_per_host = {}
|
|
64
57
|
for host in hosts:
|
|
65
58
|
state, task = iterator.get_next_task_for_host(host, peek=True)
|
|
@@ -67,7 +60,7 @@ class StrategyModule(StrategyBase):
|
|
|
67
60
|
state_task_per_host[host] = state, task
|
|
68
61
|
|
|
69
62
|
if not state_task_per_host:
|
|
70
|
-
return [
|
|
63
|
+
return []
|
|
71
64
|
|
|
72
65
|
task_uuids = {t._uuid for s, t in state_task_per_host.values()}
|
|
73
66
|
_loop_cnt = 0
|
|
@@ -93,8 +86,6 @@ class StrategyModule(StrategyBase):
|
|
|
93
86
|
if cur_task._uuid == task._uuid:
|
|
94
87
|
iterator.set_state_for_host(host.name, state)
|
|
95
88
|
host_tasks.append((host, task))
|
|
96
|
-
else:
|
|
97
|
-
host_tasks.append((host, noop_task))
|
|
98
89
|
|
|
99
90
|
if cur_task.action in C._ACTION_META and cur_task.args.get('_raw_params') == 'flush_handlers':
|
|
100
91
|
iterator.all_tasks[iterator.cur_task:iterator.cur_task] = [h for b in iterator._play.handlers for h in b.block]
|
|
@@ -136,9 +127,6 @@ class StrategyModule(StrategyBase):
|
|
|
136
127
|
|
|
137
128
|
results = []
|
|
138
129
|
for (host, task) in host_tasks:
|
|
139
|
-
if not task:
|
|
140
|
-
continue
|
|
141
|
-
|
|
142
130
|
if self._tqm._terminated:
|
|
143
131
|
break
|
|
144
132
|
|
ansible/release.py
CHANGED
|
@@ -3,7 +3,7 @@ ansible/__main__.py,sha256=IvyRvY64pT0on94qCLibxgDJ0-7_2CRoaZ5kfGOl54Q,1395
|
|
|
3
3
|
ansible/constants.py,sha256=FvX7PDG0GWV91Vszb5-DFKvkR8O2OTpBmIbQk-d51sc,9193
|
|
4
4
|
ansible/context.py,sha256=OzSlaA_GgGRyyf5I209sy19_eGOX6HXn441W9w_FcvU,2018
|
|
5
5
|
ansible/keyword_desc.yml,sha256=vE9joFgSeHR4Djl7Bd-HHVCrGByRCrTUmWYZ8LKPZKk,7412
|
|
6
|
-
ansible/release.py,sha256=
|
|
6
|
+
ansible/release.py,sha256=GK4bPFG30Vpf20vpQ8rY3Hf_78IyYnrcb3ZLrrEQRY0,916
|
|
7
7
|
ansible/_vendor/__init__.py,sha256=wJRKH7kI9OzYVY9hgSchOsTNTmTnugpPLGYj9Y5akX0,2086
|
|
8
8
|
ansible/cli/__init__.py,sha256=6jaX6SS-UBM7pjiUlDsC0y07k3klUjxTR5ZEnDiCmP8,28706
|
|
9
9
|
ansible/cli/adhoc.py,sha256=suzo4QnsaMjJBk5JlAUd-cpQLs8Ckj6A55CiG9Y8Gns,8247
|
|
@@ -34,10 +34,10 @@ ansible/executor/__init__.py,sha256=1lMXN1i2fFqslda4BmeI5tpYMFP95D5Wpr1AjDJi-SQ,
|
|
|
34
34
|
ansible/executor/action_write_locks.py,sha256=Up2n3cwFCr4T4IvttHpe3QOxRBF_9NgWJ1tFm9CHpfM,1915
|
|
35
35
|
ansible/executor/interpreter_discovery.py,sha256=0n3JAD8LfYBjnyNnj-JbWH8tb1jy23dwX7f5QvlyrFY,9943
|
|
36
36
|
ansible/executor/module_common.py,sha256=GjRWM0L9Y4iDPa3ffhxjpy07i9e6ozpvvPnSLxZF_y8,65839
|
|
37
|
-
ansible/executor/play_iterator.py,sha256=
|
|
37
|
+
ansible/executor/play_iterator.py,sha256=nAtg4t6XI7I7js-Bbk1rAi0OxOrdYotnOwpQPA6hwwI,31541
|
|
38
38
|
ansible/executor/playbook_executor.py,sha256=RYYgI82wviDOE1o8zrIB5WWsSEg13KdxEVMXLGPKK7A,15098
|
|
39
39
|
ansible/executor/stats.py,sha256=757UK8wDzLCXq4ltI9PqpoMNAdtRsd9D9-GS-5Al_Hs,3264
|
|
40
|
-
ansible/executor/task_executor.py,sha256=
|
|
40
|
+
ansible/executor/task_executor.py,sha256=lLQq-9TkX2bCSQVvfS0Cgm1agiVx3hFsqmdoXQ-JY5M,60752
|
|
41
41
|
ansible/executor/task_queue_manager.py,sha256=DUWwK8RZuUJPY66to8kplFBFcUPAJwLB3kW8vfl1IOM,18724
|
|
42
42
|
ansible/executor/task_result.py,sha256=DvshMci5i9-qCXs0m_vScSa6BJMbPwwNQBV7L2DTCzE,5748
|
|
43
43
|
ansible/executor/discovery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -140,7 +140,7 @@ ansible/inventory/host.py,sha256=7RZjLiB7M74bejFRflOTa8XPHxMC334qhSo_5VmZrKI,512
|
|
|
140
140
|
ansible/inventory/manager.py,sha256=ZwmEF3E2BKOJi9SMVQNz83A2f3raQn6Nyo-rfSNMn2k,29507
|
|
141
141
|
ansible/module_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
142
142
|
ansible/module_utils/_text.py,sha256=F_YfeaxhwmTI16HICAzQS9ZmlKgBDdQ4mqR-Kh--okg,597
|
|
143
|
-
ansible/module_utils/ansible_release.py,sha256=
|
|
143
|
+
ansible/module_utils/ansible_release.py,sha256=GK4bPFG30Vpf20vpQ8rY3Hf_78IyYnrcb3ZLrrEQRY0,916
|
|
144
144
|
ansible/module_utils/api.py,sha256=BTo7stVOANbtd-ngZslaqx70r9t5gfvo44cKyu5SFjU,5837
|
|
145
145
|
ansible/module_utils/basic.py,sha256=i_lL7YrkhtBewM21t4uIfAgqrGqStyCWwjYiUyqRBi0,87706
|
|
146
146
|
ansible/module_utils/connection.py,sha256=9Us-d-y1bhC3zNnziQxvYNT4umIaN0OYv8zPaUSdEf0,8447
|
|
@@ -342,7 +342,7 @@ ansible/modules/tempfile.py,sha256=5QDq5jiUcIlhTQnZmAuoyUMwtd13sIgcIAMoEcKdVyI,3
|
|
|
342
342
|
ansible/modules/template.py,sha256=E3GB8_LZNSu_64hzFKQD6Ov7HTfrkzsaJ3Xl4IOrL8A,4586
|
|
343
343
|
ansible/modules/unarchive.py,sha256=6szHhYTZo4IQoXNNaF43TZbUIVvsM0VgefroScs4wDM,44451
|
|
344
344
|
ansible/modules/uri.py,sha256=xzruu2NYOW0K2MAI0rBlSNA6OU4zNPav1m4wfAGH4OM,28428
|
|
345
|
-
ansible/modules/user.py,sha256=
|
|
345
|
+
ansible/modules/user.py,sha256=amyH8XgLv3lTULf3xv0mEUp-WXcvrLV0XX3ReITVXxY,118388
|
|
346
346
|
ansible/modules/validate_argument_spec.py,sha256=wbFJ6zNUOcRBtmES7rYBqt_Cqior9CKVBNem5k6jvsk,3128
|
|
347
347
|
ansible/modules/wait_for.py,sha256=VxgBrnnxjhfi5VkP6T_ElE5oVrr1rEJXuidQfwkHFz4,27373
|
|
348
348
|
ansible/modules/wait_for_connection.py,sha256=EjxPKKwc1LNoKfQ7g0g-citLSZfhqNgpTeJTnO6_fB0,3377
|
|
@@ -406,7 +406,7 @@ ansible/plugins/action/fail.py,sha256=JEVU_Xoc9iuo2RjQUE5ZnoHZNilHh2eTC9OggnUS7n
|
|
|
406
406
|
ansible/plugins/action/fetch.py,sha256=27ufzOz81oO8EzKZJvCGGJuPv7MwEBCR0LJ3uanuV9I,10249
|
|
407
407
|
ansible/plugins/action/gather_facts.py,sha256=Ilj7MeE9O75S_6A6lvcy4pbFDSBMyAaDeGvVZ3Y1ql8,7914
|
|
408
408
|
ansible/plugins/action/group_by.py,sha256=lj6Grr05Qq5vaMLuoS4slfKkwiBt3QUCJVfrwwRsDT4,1947
|
|
409
|
-
ansible/plugins/action/include_vars.py,sha256=
|
|
409
|
+
ansible/plugins/action/include_vars.py,sha256=G8DPzUrODQ6PIZcl1afTsY6eY4D-TX8kQVc8L8dQV5A,11626
|
|
410
410
|
ansible/plugins/action/normal.py,sha256=HWvLZkFE8__1CylzwjCP0FhHSIe6nnr83uNnbYJHcIk,1907
|
|
411
411
|
ansible/plugins/action/package.py,sha256=iam5kUcjiiB2YSFaFjCXOj9VAw6Dj9yIdb_MlEOGojk,4224
|
|
412
412
|
ansible/plugins/action/pause.py,sha256=KXnfLuv8PQtnCpMFcQoaIELT4_IOaBUv2RxqeyWXd2A,5727
|
|
@@ -580,11 +580,11 @@ ansible/plugins/shell/__init__.py,sha256=207VqtEpJsvwHGG2HkCtvA9JpeAWscUnwEM-ohJ
|
|
|
580
580
|
ansible/plugins/shell/cmd.py,sha256=vQcWC8CGmnSEyUVmX0X1QSObBbkmqePmLRLvv7Mj_5s,2223
|
|
581
581
|
ansible/plugins/shell/powershell.py,sha256=hXAfwfOa_vEGz_gH4lypadIMRcVBXUdQrV29sVNSRhY,12933
|
|
582
582
|
ansible/plugins/shell/sh.py,sha256=1nhiMv0_c8zu2MaDHvOCr--dG8b-iUVEPPnpMh_Hx8I,3952
|
|
583
|
-
ansible/plugins/strategy/__init__.py,sha256=
|
|
583
|
+
ansible/plugins/strategy/__init__.py,sha256=VzjlpS2UkuOYCftsjRgSFu8yo42RjroS5jX9NrIfh_g,56963
|
|
584
584
|
ansible/plugins/strategy/debug.py,sha256=GxUS0bSiaWInIK8zgB7rMREEqvgrZhVlFUzOCJtnjFo,1258
|
|
585
585
|
ansible/plugins/strategy/free.py,sha256=mPhduX1-EnfCVoHRV8C5LU0QG1O31sgtVJdjYvFyHJ8,16142
|
|
586
586
|
ansible/plugins/strategy/host_pinned.py,sha256=3-q5l-tpheMlU-BXGm6ZQNgHvQv5IMvOCDZBLibl1L4,1959
|
|
587
|
-
ansible/plugins/strategy/linear.py,sha256=
|
|
587
|
+
ansible/plugins/strategy/linear.py,sha256=VgBwL_nQyE_LkBSuPYWodfd27jf_uVtkQunjzpMSwFo,18375
|
|
588
588
|
ansible/plugins/terminal/__init__.py,sha256=Pgzb8SsOGE2irgrv4f--4rfTDNxDFURzToWOatDg8J4,4472
|
|
589
589
|
ansible/plugins/test/__init__.py,sha256=6DY18LxzSdtO7-fDS6957bo61fg-xG3TDWvtFkhGYOQ,471
|
|
590
590
|
ansible/plugins/test/abs.yml,sha256=lZA0XP1oBNg___Du6SqNOkDeQC9xIcZpROYV5XJG9bg,764
|
|
@@ -682,7 +682,7 @@ ansible/vars/hostvars.py,sha256=xd9TRpqvqMoZxrzQpbBHV_EAii_CdzSBzCg5Y5kpJr8,5202
|
|
|
682
682
|
ansible/vars/manager.py,sha256=lIfISTPyRcNfJVWJhhNof36Zmk6xSMUkf9sFxrzCzcI,38180
|
|
683
683
|
ansible/vars/plugins.py,sha256=RsRU9fiLcJwPIAyTYnmVZglsiEOMCIgQskflavE-XnE,4546
|
|
684
684
|
ansible/vars/reserved.py,sha256=FBD7n2dnA0CW4I0J1LtWwk2hQqvGW0KTRPcxaRtMKWo,2615
|
|
685
|
-
ansible_core-2.16.
|
|
685
|
+
ansible_core-2.16.13.data/scripts/ansible-test,sha256=CYIYL99IxWdVTtDIj3avilIJXhGAmtjuKPPWNuLWuc8,1690
|
|
686
686
|
ansible_test/__init__.py,sha256=6e721yAyyyocRKzbCKtQXloAfFP7Aqv0L3zG70uh-4A,190
|
|
687
687
|
ansible_test/_data/ansible.cfg,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
688
688
|
ansible_test/_data/coveragerc,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -749,7 +749,7 @@ ansible_test/_internal/coverage_util.py,sha256=VscejjrRQ0m0XTQRtqNYpYwkji8CbqHQT
|
|
|
749
749
|
ansible_test/_internal/data.py,sha256=OFDpRa47yqBqQO1aSvTZVQQpScHvBHsr861586MQEUI,11184
|
|
750
750
|
ansible_test/_internal/delegation.py,sha256=D8hluDQf_YN3DtVG_8HW0iumRBY3gjp_zP-rlc3VNY4,13418
|
|
751
751
|
ansible_test/_internal/diff.py,sha256=qfzSL7BtoW7bLLgzF0-m--jthVDpUQSr9aBw1fCMIHk,7310
|
|
752
|
-
ansible_test/_internal/docker_util.py,sha256=
|
|
752
|
+
ansible_test/_internal/docker_util.py,sha256=lPtdeOFo-alMPvHfbR3AE7Yds3rFv7a4nFjT8EslY6M,38208
|
|
753
753
|
ansible_test/_internal/encoding.py,sha256=E61EfXbQw0uQoFhbN3SYx3Oy_1tAMCPAAvY9hkEcSSo,1367
|
|
754
754
|
ansible_test/_internal/executor.py,sha256=KW5yI-f-giErQ077MTj707fTtFkf_Kr8IV_Nr36NNmc,2959
|
|
755
755
|
ansible_test/_internal/git.py,sha256=njtciWq2DlzZ1DAkQi08HRRP-TgH0mgeGZsWcsJGctI,4366
|
|
@@ -771,7 +771,7 @@ ansible_test/_internal/target.py,sha256=Whtb_n0jn4zbiMmX7je5jewgzsRczfXRm_ndYtjT
|
|
|
771
771
|
ansible_test/_internal/test.py,sha256=znQmGjKACqDU8T0EAPqcv2qyy0J7M2w4OmyYhwHLqT0,14515
|
|
772
772
|
ansible_test/_internal/thread.py,sha256=WQoZ2q2ljmEkKHRDkIqwxW7eZbkCKDrG3YZfcaxHzHw,2596
|
|
773
773
|
ansible_test/_internal/timeout.py,sha256=hT-LirImhAh1iCGIh8JpmECXsiGu6Zetw8BWl1iBIC8,4050
|
|
774
|
-
ansible_test/_internal/util.py,sha256=
|
|
774
|
+
ansible_test/_internal/util.py,sha256=xU7SH0cQ2G1hC-9WyG7_xh-NTyHYveaz2LUxbpYExpU,37781
|
|
775
775
|
ansible_test/_internal/util_common.py,sha256=wxYutoQap6iemTLRC8c0fGSm3GP0ziAlq4XBV77aZfk,17389
|
|
776
776
|
ansible_test/_internal/venv.py,sha256=DPHAt4tuoIdP7BOXa75-i4T7Paild8eGDsV2UUKOZ7U,9062
|
|
777
777
|
ansible_test/_internal/ci/__init__.py,sha256=QOaC_8_wUzqFEbsFCXYAnElWoUo6gB40CXvP9RJ-Iyo,7738
|
|
@@ -950,7 +950,7 @@ ansible_test/_util/controller/sanity/pylint/config/code-smell.cfg,sha256=yZd1BKF
|
|
|
950
950
|
ansible_test/_util/controller/sanity/pylint/config/collection.cfg,sha256=VU7PJ2G0sxdcMxmCHMebFvi1Avy3fELFDzvaQkU0p3s,4400
|
|
951
951
|
ansible_test/_util/controller/sanity/pylint/config/default.cfg,sha256=hRFKTA4wt2UVdiUapm6d-fAIGmiDMdrJU3Op3xhwz2E,3906
|
|
952
952
|
ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py,sha256=WZdwUwc6Jyxf25VI8z34JH7Itw1XFunRYoXuEXUXaZg,18674
|
|
953
|
-
ansible_test/_util/controller/sanity/pylint/plugins/hide_unraisable.py,sha256=
|
|
953
|
+
ansible_test/_util/controller/sanity/pylint/plugins/hide_unraisable.py,sha256=Fua0oKX3ONMELx4UrmWDJOx-KBP9ZkvuSq-EgqHedtE,835
|
|
954
954
|
ansible_test/_util/controller/sanity/pylint/plugins/string_format.py,sha256=hAX_9P0VR5ngilRKxN5NOgS4vJmoeGCgLJ2mMI8IliA,2626
|
|
955
955
|
ansible_test/_util/controller/sanity/pylint/plugins/unwanted.py,sha256=9ZS9CiTARriKsHw807pO4Wp9FGg01xQqWJXwD9MeiJ8,9061
|
|
956
956
|
ansible_test/_util/controller/sanity/shellcheck/exclude.txt,sha256=-idybvpZeOHVfR8usoyCNdNLD5WpaKQeP9mgzganMpQ,21
|
|
@@ -1001,9 +1001,9 @@ ansible_test/config/cloud-config-vultr.ini.template,sha256=XLKHk3lg_8ReQMdWfZzhh
|
|
|
1001
1001
|
ansible_test/config/config.yml,sha256=wb3knoBmZewG3GWOMnRHoVPQWW4vPixKLPMNS6vJmTc,2620
|
|
1002
1002
|
ansible_test/config/inventory.networking.template,sha256=bFNSk8zNQOaZ_twaflrY0XZ9mLwUbRLuNT0BdIFwvn4,1335
|
|
1003
1003
|
ansible_test/config/inventory.winrm.template,sha256=1QU8W-GFLnYEw8yY9bVIvUAVvJYPM3hyoijf6-M7T00,1098
|
|
1004
|
-
ansible_core-2.16.
|
|
1005
|
-
ansible_core-2.16.
|
|
1006
|
-
ansible_core-2.16.
|
|
1007
|
-
ansible_core-2.16.
|
|
1008
|
-
ansible_core-2.16.
|
|
1009
|
-
ansible_core-2.16.
|
|
1004
|
+
ansible_core-2.16.13.dist-info/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
1005
|
+
ansible_core-2.16.13.dist-info/METADATA,sha256=Sna7hrNPzCzdQ90OwJgYiVk-sChIwtggzLgknWw8bXA,6906
|
|
1006
|
+
ansible_core-2.16.13.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1007
|
+
ansible_core-2.16.13.dist-info/entry_points.txt,sha256=0mpmsrIhODChxKl3eS-NcVQCaMetBn8KdPLtVxQgR64,453
|
|
1008
|
+
ansible_core-2.16.13.dist-info/top_level.txt,sha256=IFbRLjAvih1DYzJWg3_F6t4sCzEMxRO7TOMNs6GkYHo,21
|
|
1009
|
+
ansible_core-2.16.13.dist-info/RECORD,,
|
|
@@ -20,6 +20,8 @@ from .util import (
|
|
|
20
20
|
SubprocessError,
|
|
21
21
|
cache,
|
|
22
22
|
OutputStream,
|
|
23
|
+
InternalError,
|
|
24
|
+
format_command_output,
|
|
23
25
|
)
|
|
24
26
|
|
|
25
27
|
from .util_common import (
|
|
@@ -300,7 +302,7 @@ def detect_host_properties(args: CommonConfig) -> ContainerHostProperties:
|
|
|
300
302
|
options = ['--volume', '/sys/fs/cgroup:/probe:ro']
|
|
301
303
|
cmd = ['sh', '-c', ' && echo "-" && '.join(multi_line_commands)]
|
|
302
304
|
|
|
303
|
-
stdout = run_utility_container(args, 'ansible-test-probe', cmd, options)
|
|
305
|
+
stdout, stderr = run_utility_container(args, 'ansible-test-probe', cmd, options)
|
|
304
306
|
|
|
305
307
|
if args.explain:
|
|
306
308
|
return ContainerHostProperties(
|
|
@@ -313,6 +315,12 @@ def detect_host_properties(args: CommonConfig) -> ContainerHostProperties:
|
|
|
313
315
|
|
|
314
316
|
blocks = stdout.split('\n-\n')
|
|
315
317
|
|
|
318
|
+
if len(blocks) != len(multi_line_commands):
|
|
319
|
+
message = f'Unexpected probe output. Expected {len(multi_line_commands)} blocks but found {len(blocks)}.\n'
|
|
320
|
+
message += format_command_output(stdout, stderr)
|
|
321
|
+
|
|
322
|
+
raise InternalError(message.strip())
|
|
323
|
+
|
|
316
324
|
values = blocks[0].split('\n')
|
|
317
325
|
|
|
318
326
|
audit_parts = values[0].split(' ', 1)
|
ansible_test/_internal/util.py
CHANGED
|
@@ -930,14 +930,7 @@ class SubprocessError(ApplicationError):
|
|
|
930
930
|
error_callback: t.Optional[c.Callable[[SubprocessError], None]] = None,
|
|
931
931
|
) -> None:
|
|
932
932
|
message = 'Command "%s" returned exit status %s.\n' % (shlex.join(cmd), status)
|
|
933
|
-
|
|
934
|
-
if stderr:
|
|
935
|
-
message += '>>> Standard Error\n'
|
|
936
|
-
message += '%s%s\n' % (stderr.strip(), Display.clear)
|
|
937
|
-
|
|
938
|
-
if stdout:
|
|
939
|
-
message += '>>> Standard Output\n'
|
|
940
|
-
message += '%s%s\n' % (stdout.strip(), Display.clear)
|
|
933
|
+
message += format_command_output(stdout, stderr)
|
|
941
934
|
|
|
942
935
|
self.cmd = cmd
|
|
943
936
|
self.message = message
|
|
@@ -981,6 +974,21 @@ class HostConnectionError(ApplicationError):
|
|
|
981
974
|
self._callback()
|
|
982
975
|
|
|
983
976
|
|
|
977
|
+
def format_command_output(stdout: str, stderr: str) -> str:
|
|
978
|
+
"""Return a formatted string containing the given stdout and stderr (if any)."""
|
|
979
|
+
message = ''
|
|
980
|
+
|
|
981
|
+
if stderr := stderr.strip():
|
|
982
|
+
message += '>>> Standard Error\n'
|
|
983
|
+
message += f'{stderr}{Display.clear}\n'
|
|
984
|
+
|
|
985
|
+
if stdout := stdout.strip():
|
|
986
|
+
message += '>>> Standard Output\n'
|
|
987
|
+
message += f'{stdout}{Display.clear}\n'
|
|
988
|
+
|
|
989
|
+
return message
|
|
990
|
+
|
|
991
|
+
|
|
984
992
|
def retry(func: t.Callable[..., TValue], ex_type: t.Type[BaseException] = SubprocessError, sleep: int = 10, attempts: int = 10, warn: bool = True) -> TValue:
|
|
985
993
|
"""Retry the specified function on failure."""
|
|
986
994
|
for dummy in range(1, attempts):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Temporary plugin to prevent stdout noise pollution from finalization of abandoned generators
|
|
1
|
+
"""Temporary plugin to prevent stdout noise pollution from finalization of abandoned generators."""
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
4
|
import sys
|
|
@@ -10,7 +10,7 @@ if t.TYPE_CHECKING:
|
|
|
10
10
|
|
|
11
11
|
def _mask_finalizer_valueerror(ur: t.Any) -> None:
|
|
12
12
|
"""Mask only ValueErrors from finalizing abandoned generators; delegate everything else"""
|
|
13
|
-
# work around
|
|
13
|
+
# work around Python finalizer issue that sometimes spews this error message to stdout
|
|
14
14
|
# see https://github.com/pylint-dev/pylint/issues/9138
|
|
15
15
|
if ur.exc_type is ValueError and 'generator already executing' in str(ur.exc_value):
|
|
16
16
|
return
|
|
@@ -20,5 +20,4 @@ def _mask_finalizer_valueerror(ur: t.Any) -> None:
|
|
|
20
20
|
|
|
21
21
|
def register(linter: PyLinter) -> None: # pylint: disable=unused-argument
|
|
22
22
|
"""PyLint plugin registration entrypoint"""
|
|
23
|
-
|
|
24
|
-
sys.unraisablehook = _mask_finalizer_valueerror
|
|
23
|
+
sys.unraisablehook = _mask_finalizer_valueerror
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|