summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jim@acmegating.com>2023-01-31 17:21:03 -0800
committerJames E. Blair <jim@acmegating.com>2023-01-31 17:21:03 -0800
commit39cf3daca496a2f6b18d6e8b50d532e86c5384fe (patch)
treef921f324470058ad7d1b5f027185312e709d9542
parentc0985cff39e0ec2b9f7252e7d4a29e9979cda99f (diff)
downloadzuul-39cf3daca496a2f6b18d6e8b50d532e86c5384fe.tar.gz
Allow default-ansible-version to be an int
We allow job.ansible-version to be a str, int, or float and coerce it to a string. We should do the same for tenant.default-ansible-version. Change-Id: I1a104b84d578f4932597893f62cd0cd06f031b4a
-rw-r--r--zuul/configloader.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/zuul/configloader.py b/zuul/configloader.py
index 7f8346382..d7cc6199d 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -1697,7 +1697,7 @@ class TenantParser(object):
'disallowed-labels': to_list(str),
'allow-circular-dependencies': bool,
'default-parent': str,
- 'default-ansible-version': vs.Any(str, float),
+ 'default-ansible-version': vs.Any(str, float, int),
'access-rules': to_list(str),
'admin-rules': to_list(str),
'semaphores': to_list(str),
@@ -1780,8 +1780,8 @@ class TenantParser(object):
# Set default ansible version
default_ansible_version = conf.get('default-ansible-version')
if default_ansible_version is not None:
- # The ansible version can be interpreted as float by yaml so make
- # sure it's a string.
+ # The ansible version can be interpreted as float or int
+ # by yaml so make sure it's a string.
default_ansible_version = str(default_ansible_version)
ansible_manager.requestVersion(default_ansible_version)
else: