ansible-core 2.16.8__py3-none-any.whl → 2.16.9rc1__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/module_utils/ansible_release.py +1 -1
- ansible/modules/dnf.py +8 -3
- ansible/modules/dnf5.py +17 -4
- ansible/plugins/strategy/linear.py +5 -14
- ansible/release.py +1 -1
- ansible/vars/hostvars.py +12 -1
- {ansible_core-2.16.8.dist-info → ansible_core-2.16.9rc1.dist-info}/METADATA +1 -1
- {ansible_core-2.16.8.dist-info → ansible_core-2.16.9rc1.dist-info}/RECORD +14 -14
- {ansible_core-2.16.8.dist-info → ansible_core-2.16.9rc1.dist-info}/WHEEL +1 -1
- ansible_test/_util/target/setup/bootstrap.sh +9 -0
- {ansible_core-2.16.8.data → ansible_core-2.16.9rc1.data}/scripts/ansible-test +0 -0
- {ansible_core-2.16.8.dist-info → ansible_core-2.16.9rc1.dist-info}/COPYING +0 -0
- {ansible_core-2.16.8.dist-info → ansible_core-2.16.9rc1.dist-info}/entry_points.txt +0 -0
- {ansible_core-2.16.8.dist-info → ansible_core-2.16.9rc1.dist-info}/top_level.txt +0 -0
ansible/modules/dnf.py
CHANGED
|
@@ -719,9 +719,14 @@ class DnfModule(YumDnf):
|
|
|
719
719
|
self.module.exit_json(msg="", results=results)
|
|
720
720
|
|
|
721
721
|
def _is_installed(self, pkg):
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
722
|
+
installed_query = dnf.subject.Subject(pkg).get_best_query(sack=self.base.sack).installed()
|
|
723
|
+
if dnf.util.is_glob_pattern(pkg):
|
|
724
|
+
available_query = dnf.subject.Subject(pkg).get_best_query(sack=self.base.sack).available()
|
|
725
|
+
return not (
|
|
726
|
+
{p.name for p in available_query} - {p.name for p in installed_query}
|
|
727
|
+
)
|
|
728
|
+
else:
|
|
729
|
+
return bool(installed_query)
|
|
725
730
|
|
|
726
731
|
def _is_newer_version_installed(self, pkg_name):
|
|
727
732
|
try:
|
ansible/modules/dnf5.py
CHANGED
|
@@ -350,10 +350,23 @@ libdnf5 = None
|
|
|
350
350
|
|
|
351
351
|
def is_installed(base, spec):
|
|
352
352
|
settings = libdnf5.base.ResolveSpecSettings()
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
match, nevra =
|
|
356
|
-
|
|
353
|
+
installed_query = libdnf5.rpm.PackageQuery(base)
|
|
354
|
+
installed_query.filter_installed()
|
|
355
|
+
match, nevra = installed_query.resolve_pkg_spec(spec, settings, True)
|
|
356
|
+
|
|
357
|
+
# FIXME use `is_glob_pattern` function when available:
|
|
358
|
+
# https://github.com/rpm-software-management/dnf5/issues/1563
|
|
359
|
+
glob_patterns = set("*[?")
|
|
360
|
+
if any(set(char) & glob_patterns for char in spec):
|
|
361
|
+
available_query = libdnf5.rpm.PackageQuery(base)
|
|
362
|
+
available_query.filter_available()
|
|
363
|
+
available_query.resolve_pkg_spec(spec, settings, True)
|
|
364
|
+
|
|
365
|
+
return not (
|
|
366
|
+
{p.get_name() for p in available_query} - {p.get_name() for p in installed_query}
|
|
367
|
+
)
|
|
368
|
+
else:
|
|
369
|
+
return match
|
|
357
370
|
|
|
358
371
|
|
|
359
372
|
def is_newer_version_installed(base, spec):
|
|
@@ -213,30 +213,21 @@ class StrategyModule(StrategyBase):
|
|
|
213
213
|
skip_rest = True
|
|
214
214
|
break
|
|
215
215
|
|
|
216
|
-
run_once =
|
|
216
|
+
run_once = action and getattr(action, 'BYPASS_HOST_LOOP', False) or templar.template(task.run_once)
|
|
217
|
+
try:
|
|
218
|
+
task.name = to_text(templar.template(task.name, fail_on_undefined=False), nonstring='empty')
|
|
219
|
+
except Exception as e:
|
|
220
|
+
display.debug(f"Failed to templalte task name ({task.name}), ignoring error and continuing: {e}")
|
|
217
221
|
|
|
218
222
|
if (task.any_errors_fatal or run_once) and not task.ignore_errors:
|
|
219
223
|
any_errors_fatal = True
|
|
220
224
|
|
|
221
225
|
if not callback_sent:
|
|
222
|
-
display.debug("sending task start callback, copying the task so we can template it temporarily")
|
|
223
|
-
saved_name = task.name
|
|
224
|
-
display.debug("done copying, going to template now")
|
|
225
|
-
try:
|
|
226
|
-
task.name = to_text(templar.template(task.name, fail_on_undefined=False), nonstring='empty')
|
|
227
|
-
display.debug("done templating")
|
|
228
|
-
except Exception:
|
|
229
|
-
# just ignore any errors during task name templating,
|
|
230
|
-
# we don't care if it just shows the raw name
|
|
231
|
-
display.debug("templating failed for some reason")
|
|
232
|
-
display.debug("here goes the callback...")
|
|
233
226
|
if isinstance(task, Handler):
|
|
234
227
|
self._tqm.send_callback('v2_playbook_on_handler_task_start', task)
|
|
235
228
|
else:
|
|
236
229
|
self._tqm.send_callback('v2_playbook_on_task_start', task, is_conditional=False)
|
|
237
|
-
task.name = saved_name
|
|
238
230
|
callback_sent = True
|
|
239
|
-
display.debug("sending task start callback")
|
|
240
231
|
|
|
241
232
|
self._blocked_hosts[host.get_name()] = True
|
|
242
233
|
self._queue_task(host, task, task_vars, play_context)
|
ansible/release.py
CHANGED
ansible/vars/hostvars.py
CHANGED
|
@@ -20,6 +20,7 @@ from __future__ import (absolute_import, division, print_function)
|
|
|
20
20
|
__metaclass__ = type
|
|
21
21
|
|
|
22
22
|
from collections.abc import Mapping
|
|
23
|
+
from functools import cached_property
|
|
23
24
|
|
|
24
25
|
from ansible import constants as C
|
|
25
26
|
from ansible.template import Templar, AnsibleUndefined
|
|
@@ -117,9 +118,12 @@ class HostVarsVars(Mapping):
|
|
|
117
118
|
def __init__(self, variables, loader):
|
|
118
119
|
self._vars = variables
|
|
119
120
|
self._loader = loader
|
|
121
|
+
|
|
122
|
+
@cached_property
|
|
123
|
+
def _templar(self):
|
|
120
124
|
# NOTE: this only has access to the host's own vars,
|
|
121
125
|
# so templates that depend on vars in other scopes will not work.
|
|
122
|
-
|
|
126
|
+
return Templar(variables=self._vars, loader=self._loader)
|
|
123
127
|
|
|
124
128
|
def __getitem__(self, var):
|
|
125
129
|
return self._templar.template(self._vars[var], fail_on_undefined=False, static_vars=C.INTERNAL_STATIC_VARS)
|
|
@@ -136,3 +140,10 @@ class HostVarsVars(Mapping):
|
|
|
136
140
|
|
|
137
141
|
def __repr__(self):
|
|
138
142
|
return repr(self._templar.template(self._vars, fail_on_undefined=False, static_vars=C.INTERNAL_STATIC_VARS))
|
|
143
|
+
|
|
144
|
+
def __getstate__(self):
|
|
145
|
+
''' override serialization here to avoid
|
|
146
|
+
pickle issues with templar and Jinja native'''
|
|
147
|
+
state = self.__dict__.copy()
|
|
148
|
+
state.pop('_templar', None)
|
|
149
|
+
return state
|
|
@@ -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=1ycUxlOhAJwyHAL_wrOIGrr84I9pDFM5XsSeQa9nKjE,918
|
|
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
|
|
@@ -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=1ycUxlOhAJwyHAL_wrOIGrr84I9pDFM5XsSeQa9nKjE,918
|
|
144
144
|
ansible/module_utils/api.py,sha256=BTo7stVOANbtd-ngZslaqx70r9t5gfvo44cKyu5SFjU,5837
|
|
145
145
|
ansible/module_utils/basic.py,sha256=7xL3IsZK68gyyYm2x8yB2s1V7Sx77-vK3rkXmp2mlCM,87489
|
|
146
146
|
ansible/module_utils/connection.py,sha256=9Us-d-y1bhC3zNnziQxvYNT4umIaN0OYv8zPaUSdEf0,8447
|
|
@@ -291,8 +291,8 @@ ansible/modules/cron.py,sha256=HlokG4Pcx219oksqbZRLXC61SlpbZSpCFVG-uRL_Qz4,26189
|
|
|
291
291
|
ansible/modules/deb822_repository.py,sha256=rZzJzyl7TfVKrcICzYOBJISTrqRYGq8AoWNLwyl6eb0,15693
|
|
292
292
|
ansible/modules/debconf.py,sha256=dqW8NQtQom64KUjre6liHNzT5oqyuEumyRQpyEfD9RE,8452
|
|
293
293
|
ansible/modules/debug.py,sha256=eAQPIQ_LKHy718uD175T22nTrv7_8OlHjwO0ekKBQMU,2958
|
|
294
|
-
ansible/modules/dnf.py,sha256=
|
|
295
|
-
ansible/modules/dnf5.py,sha256=
|
|
294
|
+
ansible/modules/dnf.py,sha256=Uj-n0qPhdeUlb8t2Eg-WpZfKDFlgDE9iGXfx_4hj4BQ,56178
|
|
295
|
+
ansible/modules/dnf5.py,sha256=8C9tIC64-qyZqK5PpQeEJaBpDsZu6PRQpXxg6UrTP1o,26855
|
|
296
296
|
ansible/modules/dpkg_selections.py,sha256=NBiePEQRamuOO5ncxt6mBbvlWihhMFwMmqiql7zZU34,2833
|
|
297
297
|
ansible/modules/expect.py,sha256=C7t85H_TV9Y10wLVx0ok6qvYk4Lb6n6xT2qu3DSMBKE,9067
|
|
298
298
|
ansible/modules/fail.py,sha256=AI4gNQC7E5U2Vs7QiIlFk7PcWozN0tXtiVPa_LJrQpk,1710
|
|
@@ -584,7 +584,7 @@ ansible/plugins/strategy/__init__.py,sha256=eS8JSyb3zFrTK8qm0-tK-bk8fNtG_tmbmUZ1
|
|
|
584
584
|
ansible/plugins/strategy/debug.py,sha256=GxUS0bSiaWInIK8zgB7rMREEqvgrZhVlFUzOCJtnjFo,1258
|
|
585
585
|
ansible/plugins/strategy/free.py,sha256=BAz89LpU2_uP4mFizdG7Lt5GmxsDGOmR9bS_M4RKCQk,15897
|
|
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=vIX_3E0UpOfaksxsRiT8Zt5LAm4JPRLFP2L6zsv5rqk,19770
|
|
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
|
|
@@ -678,11 +678,11 @@ ansible/utils/collection_loader/_collection_meta.py,sha256=THmk42SU58welYL5C-dg3
|
|
|
678
678
|
ansible/vars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
679
679
|
ansible/vars/clean.py,sha256=TeNDx7skJFqR0K1ok_cQuvKDjzTrCc7u2qGWTNambQo,6083
|
|
680
680
|
ansible/vars/fact_cache.py,sha256=4lxkYru1qucTDQ0aSmtc5UDWP-gm3edPmDSuTZ2GCmE,1956
|
|
681
|
-
ansible/vars/hostvars.py,sha256=
|
|
681
|
+
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.9rc1.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
|
|
@@ -980,7 +980,7 @@ ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py,sha256=Hp
|
|
|
980
980
|
ansible_test/_util/target/pytest/plugins/ansible_pytest_coverage.py,sha256=Nr52YbVP7BwI4u6mZZptZIYGAfmqzzytdbC98lTr5Ks,1599
|
|
981
981
|
ansible_test/_util/target/sanity/compile/compile.py,sha256=X1WHH2iLT4K8kyYJKlr-6AL6EAzKisL_hYrjvGrHCZ8,1637
|
|
982
982
|
ansible_test/_util/target/sanity/import/importer.py,sha256=LIcGIOyRa9UJ_HPClIknLAKZ6uIRJi81CQW-4KpRFeg,25773
|
|
983
|
-
ansible_test/_util/target/setup/bootstrap.sh,sha256=
|
|
983
|
+
ansible_test/_util/target/setup/bootstrap.sh,sha256=bcRQQjmMjTXS2TW_VjicH7UQAsiIdWvXmGPQ4Bgvq20,14173
|
|
984
984
|
ansible_test/_util/target/setup/check_systemd_cgroup_v1.sh,sha256=Aq0T62x_KLtkGaWzYqWjvhchTqYFflrTbQET3h6xrT0,395
|
|
985
985
|
ansible_test/_util/target/setup/probe_cgroups.py,sha256=ygqTkZc_YDH6EkZqp95rk_xkqsYcy_9IslPHKZO2A-8,712
|
|
986
986
|
ansible_test/_util/target/setup/quiet_pip.py,sha256=lJLE2g2ArvwjkYZj5yJbKML9PlS7s5FByiun6n5xb5Y,2939
|
|
@@ -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.9rc1.dist-info/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
1005
|
+
ansible_core-2.16.9rc1.dist-info/METADATA,sha256=0Rj4HaVNQT2haN2dy7vFzG2EmhLVfMvLpyj58-67HJI,6908
|
|
1006
|
+
ansible_core-2.16.9rc1.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
|
1007
|
+
ansible_core-2.16.9rc1.dist-info/entry_points.txt,sha256=0mpmsrIhODChxKl3eS-NcVQCaMetBn8KdPLtVxQgR64,453
|
|
1008
|
+
ansible_core-2.16.9rc1.dist-info/top_level.txt,sha256=IFbRLjAvih1DYzJWg3_F6t4sCzEMxRO7TOMNs6GkYHo,21
|
|
1009
|
+
ansible_core-2.16.9rc1.dist-info/RECORD,,
|
|
@@ -430,6 +430,15 @@ bootstrap_docker()
|
|
|
430
430
|
{
|
|
431
431
|
# Required for newer mysql-server packages to install/upgrade on Ubuntu 16.04.
|
|
432
432
|
rm -f /usr/sbin/policy-rc.d
|
|
433
|
+
|
|
434
|
+
# CentOS 7 is EoL and its official repos are down; we need to the archived ones.
|
|
435
|
+
if grep -q '^CENTOS_MANTISBT_PROJECT="CentOS-7"$' /etc/os-release
|
|
436
|
+
then
|
|
437
|
+
sed -i \
|
|
438
|
+
-e 's/mirrorlist/#mirrorlist/g' \
|
|
439
|
+
-e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' \
|
|
440
|
+
/etc/yum.repos.d/CentOS-*
|
|
441
|
+
fi
|
|
433
442
|
}
|
|
434
443
|
|
|
435
444
|
bootstrap_remote()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|