Browse Source

Merge "Make python interpreter option for ansible validation run" into stable/train

changes/71/751071/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
72161e0a60
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      tripleoclient/v1/tripleo_validator.py

+ 10
- 0
tripleoclient/v1/tripleo_validator.py View File

@@ -16,6 +16,7 @@
import argparse
import json
import logging
import sys
import yaml

from osc_lib import exceptions
@@ -238,6 +239,7 @@ class TripleOValidatorRun(command.Command):
" run invocation. For example: --limit \"compute-0,"
" compute-1, compute-5\".")
)

parser.add_argument('--playbook',
nargs="*",
default=None,
@@ -246,6 +248,13 @@ class TripleOValidatorRun(command.Command):
"or a list of playbook.")
)

parser.add_argument(
'--python-interpreter',
action='store',
default="/usr/bin/python{}".format(sys.version_info[0]),
help=_("Python interpreter for Ansible execution. ")
)

extra_vars_group = parser.add_mutually_exclusive_group(required=False)

extra_vars_group.add_argument(
@@ -358,6 +367,7 @@ class TripleOValidatorRun(command.Command):
validations_dir=constants.ANSIBLE_VALIDATION_DIR,
validation_name=parsed_args.validation_name,
extra_env_vars=parsed_args.extra_env_vars,
python_interpreter=parsed_args.python_interpreter,
quiet=parsed_args.quiet)

# Build output


Loading…
Cancel
Save