zuul-manage-ansible: add validate option
Listing installed ansibles with --list is nice but it only shows the configured versions. I had the use case to validate each of them by invoking AnsibleManager.validate(). Add such an entrypoint to zuul-manage-ansible via --validate. Change-Id: I8d892253da9e1a0f756196146b9fe625d5f7ffaf
This commit is contained in:
parent
000f6ec21e
commit
d67adc42a4
|
@ -52,6 +52,9 @@ class ManageAnsible(zuul.cmd.ZuulApp):
|
|||
help='upgrade ansible versions')
|
||||
parser.add_argument('-l', dest='list_supported', action='store_true',
|
||||
help='list supported versions')
|
||||
parser.add_argument('--validate', dest='validate',
|
||||
action='store_true',
|
||||
help='validate installed versions')
|
||||
parser.add_argument('-r', dest='install_root', default=None,
|
||||
help='root path for ansible venv installations')
|
||||
return parser
|
||||
|
@ -84,6 +87,10 @@ class ManageAnsible(zuul.cmd.ZuulApp):
|
|||
print('\n'.join(versions))
|
||||
return
|
||||
|
||||
if self.args.validate:
|
||||
manager.validate()
|
||||
return
|
||||
|
||||
manager.install(upgrade=self.args.upgrade)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue