Publish validations-extra-args parameter in infrared plugin.

Allowing to pass a specific string with extra arguments when invoking
the validations for a group.
The patch adds a new parameter at role and infrared's plugin level called
--validations-extra-args (infrared) and validations_extra_args (role). This
string will be appended to the 'openstack tripleo validator run' call and it
allows to pass some other arguments, as --extra-vars, or --extra-vars-file.
By defaults it is set to empty string.

Change-Id: Ie2acc014f51dc679e4e77ff87f62cfeff7422296
This commit is contained in:
Jose Luis Franco Arza 2021-05-12 17:54:25 +02:00 committed by Sergii Golovatiuk
parent be2a296ded
commit f5bd46347b
5 changed files with 17 additions and 2 deletions

View File

@ -52,6 +52,11 @@ run_validations: false
# comma separated list of skipped validations
skiplist_validations: ''
# extra arguments to pass in the validations group
# execution.
# Example: validations_extra_args: "--extra-vars min_undercloud_ram_gb=5"
validations_extra_args: ''
# validations groups for updates to be
# executed if updates_validations is true.
updates_validations_groups:

View File

@ -236,6 +236,10 @@
set_fact:
skiplist_validations: "{{ install.skiplist.validations }}"
- name: Extra arguments to be passed in the validations run
set_fact:
validations_extra_args: "{{ install.validations.extra.args }}"
tags:
- always
roles:

View File

@ -194,6 +194,13 @@ subparsers:
help: |
Comma separated string of validations names to be skipped.
default: ''
validations-extra-args:
type: Value
help: |
String containing some extra arguments to be passed in
the validations group execution.
Example: validations-extra-args: "--extra-vars min_undercloud_ram_gb=5"
default: ''
- title: TripleO Options
options:

View File

@ -15,7 +15,7 @@
set -o pipefail
source {{ undercloud_rc }}
openstack tripleo validator run --validation {{ validations_filtered | join(',') }} --stack {{ overcloud_stack_name }} \
{{ validation_args|default('') }} 2>&1 {{ timestamper_cmd }} >> validation-{{ validation_group }}.log
{{ validations_extra_args }} 2>&1 {{ timestamper_cmd }} >> validation-{{ validation_group }}.log
args:
executable: /usr/bin/bash
rescue:

View File

@ -157,7 +157,6 @@
vars:
validation_group: "pre-upgrade"
validation_allowed_groups: "{{ upgrades_validations_groups }}"
validation_args: "--python-interpreter /usr/libexec/platform-python"
when: run_validations|bool
tags:
- overcloud_upgrade_prepare