Browse Source

Merge "Normalize how we run validations"

tags/1.4.0
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
e7de741702
6 changed files with 51 additions and 28 deletions
  1. +0
    -1
      tripleo_ansible/playbooks/cli-baremetal-bios-apply.yaml
  2. +0
    -1
      tripleo_ansible/playbooks/cli-baremetal-bios-reset.yaml
  3. +0
    -7
      tripleo_ansible/playbooks/cli-baremetal-clean.yaml
  4. +25
    -3
      tripleo_ansible/playbooks/cli-baremetal-introspect.yaml
  5. +0
    -1
      tripleo_ansible/playbooks/cli-baremetal-raid.yaml
  6. +26
    -15
      tripleo_ansible/playbooks/cli-deploy-deployment-plan.yaml

+ 0
- 1
tripleo_ansible/playbooks/cli-baremetal-bios-apply.yaml View File

@@ -21,7 +21,6 @@
gather_facts: "{{ (tripleo_target_host is defined) | ternary(true, false) }}"
any_errors_fatal: true
vars:
run_validations: false
concurrency: 20
max_retries: 2
node_timeout: 1200


+ 0
- 1
tripleo_ansible/playbooks/cli-baremetal-bios-reset.yaml View File

@@ -21,7 +21,6 @@
gather_facts: "{{ (tripleo_target_host is defined) | ternary(true, false) }}"
any_errors_fatal: true
vars:
run_validations: false
concurrency: 20
max_retries: 2
node_timeout: 1200


+ 0
- 7
tripleo_ansible/playbooks/cli-baremetal-clean.yaml View File

@@ -34,13 +34,6 @@
- node_uuids is undefined

tasks:
# Pre-cleaning validation
- name: Run Validations
command: >-
openstack --os-cloud undercloud tripleo validator run --group "pre-clean"
when:
- run_validations | bool

- name: Set node_uuids_clean fact
set_fact:
node_uuids_clean: "{{ node_uuids }}"


+ 25
- 3
tripleo_ansible/playbooks/cli-baremetal-introspect.yaml View File

@@ -57,11 +57,33 @@
}}"

# Pre-introspection validation
- name: Run Validations
command: >
openstack tripleo validator run --group "pre-introspection"
- name: Validations block
when:
- run_validations | bool
block:
- name: Check if validation enabled
set_fact:
validations_enabled: "{{ lookup('hiera', 'tripleo_validations_enabled') }}"
run_once: true
become: true

# Pre-introspection validation
# NOTE(cloudnull): The stackrc file is sourced because validations are not
# 100% compatible with clouds.yaml at this time.
- name: Run Validations
shell: |-
source "{{ ansible_home }}/stackrc"
openstack --os-cloud undercloud tripleo validator run --group "pre-introspection"
when:
- validations_enabled | bool

- name: Fail if validations are disabled
fail:
msg: >-
Run validations were enabled but via hiera information disabled.
Check the configuration and try again.
when:
- not (validations_enabled | bool)

# Introspect nodes
- name: Start baremetal introspection


+ 0
- 1
tripleo_ansible/playbooks/cli-baremetal-raid.yaml View File

@@ -21,7 +21,6 @@
gather_facts: "{{ (tripleo_target_host is defined) | ternary(true, false) }}"
any_errors_fatal: true
vars:
run_validations: false
concurrency: 20
max_retries: 2
node_timeout: 1200


+ 26
- 15
tripleo_ansible/playbooks/cli-deploy-deployment-plan.yaml View File

@@ -35,22 +35,33 @@
- (tripleo_target_host is defined) | ternary('ssh', 'local') == 'local'

tasks:
- name: Check if validation enabled
command: >
hiera tripleo_validations_enabled
register: validations_enabled
become: true

- name: Run Validations
# 1. tripleo-validations does not work with clouds.yaml
# 2. Ignore errors as certain validations in 'pre-deployment'
# group i.e tls-everywhere-pre-deployment.yaml would fail.
shell: |
source "{{ ansible_home }}/stackrc"
openstack tripleo validator run --group "pre-deployment"
- name: Validations block
when:
- validations_enabled.stdout | bool
ignore_errors: true
- run_validations | bool
block:
- name: Check if validation enabled
set_fact:
validations_enabled: "{{ lookup('hiera', 'tripleo_validations_enabled') }}"
run_once: true
become: true

# Pre-deployment validation
# NOTE(cloudnull): The stackrc file is sourced because validations are not
# 100% compatible with clouds.yaml at this time.
- name: Run Validations
shell: |-
source "{{ ansible_home }}/stackrc"
openstack --os-cloud undercloud tripleo validator run --group "pre-deployment"
when:
- validations_enabled | bool

- name: Fail if validations are disabled
fail:
msg: >-
Run validations were enabled but via hiera information disabled.
Check the configuration and try again.
when:
- not (validations_enabled | bool)

- name: Prepare Container images and update plan
tripleo_image_params_prepare:


Loading…
Cancel
Save