Move static-inventory option into parser group

Static-inventory should not be in extra_vars_group, this
patch move this option into parser.
It's faling when we want to provide both:
--static-inventory and --extra-vars option since the
extra_vars_group is mutually exclusive.

Change-Id: I973ea8c210db477b735a99755332346a646bea19
(cherry picked from commit 986f926111)
This commit is contained in:
matbu 2021-03-30 15:20:02 +02:00 committed by mbu
parent 1a88932ff9
commit 1a64962d0b
1 changed files with 13 additions and 11 deletions

View File

@ -255,12 +255,25 @@ class TripleOValidatorRun(command.Command):
" run invocation. For example: --limit \"compute-0,"
" compute-1, compute-5\".")
)
parser.add_argument(
'--python-interpreter',
action='store',
default="/usr/bin/python{}".format(sys.version_info[0]),
help=_("Python interpreter for Ansible execution. ")
)
parser.add_argument(
'--static-inventory',
action='store',
default='',
help=_(
"Provide your own static inventory file. You can generate "
"such an inventory calling tripleo-ansible-inventory command. "
"Especially useful when heat service isn't available."
)
)
extra_vars_group = parser.add_mutually_exclusive_group(required=False)
extra_vars_group.add_argument(
@ -299,17 +312,6 @@ class TripleOValidatorRun(command.Command):
"will override the other(s)")
)
extra_vars_group.add_argument(
'--static-inventory',
action='store',
default='',
help=_(
"Provide your own static inventory file. You can generate "
"such an inventory calling tripleo-ansible-inventory command. "
"Especially useful when heat service isn't available."
)
)
ex_group = parser.add_mutually_exclusive_group(required=True)
ex_group.add_argument(