From 39cf3daca496a2f6b18d6e8b50d532e86c5384fe Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Tue, 31 Jan 2023 17:21:03 -0800 Subject: 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 --- zuul/configloader.py | 6 +++--- 1 file 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: -- cgit v1.2.1