Add molecule jobs for undercloud and minion roles

Change-Id: Id1256d014c74a576fd67e268a59b5e5d2d4e3d96
This commit is contained in:
Alex Schultz
2020-01-28 13:55:36 -07:00
committed by Sagi Shnaidman
parent bdc685e34d
commit cc7f8988e7
31 changed files with 574 additions and 20 deletions

View File

@@ -17,7 +17,8 @@ Role Variables
* `tripleo_undercloud_backup_home_dir`: (String) Home directory for the undercloud user. Default: "{{ ansible_env.HOME }}"
* `tripleo_undercloud_backup_log_combine`: (Boolean) Flag to combine stdout and stderr in the logfile. Default: true
* `tripleo_undercloud_backup_log_output`: (Boolean) Flag to log the output to a file rather than show it in the ansible output. Default: true
* `tripleo_undercloud_backup_timeout`: (Number) Timeout for the backup command. Default: 7200
* `tripleo_undercloud_backup_poll`: (Integer) Number of seconds to wait between checks to see if the backup command has completed. This should be set to a value greater or equal to 1. Default: 10
* `tripleo_undercloud_backup_timeout`: (Integer) Timeout for the backup command. Default: 7200
* `tripleo_undercloud_backup_log`: (String) Backup log file path. Default: "{{ tripleo_undercloud_backup_home_dir }}/undercloud_backup.log"
Output Variables

View File

@@ -1,10 +1,12 @@
---
# defaults file for tripleo_undercloud_backup
openstack_bin: openstack
tripleo_undercloud_backup_add_path: []
tripleo_undercloud_backup_debug: false
tripleo_undercloud_backup_exclude_path: []
tripleo_undercloud_backup_home_dir: "{{ ansible_env.HOME }}"
tripleo_undercloud_backup_log_combine: true
tripleo_undercloud_backup_log_output: true
tripleo_undercloud_backup_poll: 10
tripleo_undercloud_backup_timeout: 7200
tripleo_undercloud_backup_log: "{{ tripleo_undercloud_backup_home_dir }}/undercloud_backup.log"

View File

@@ -0,0 +1,22 @@
---
driver:
name: delegated
options:
managed: false
ansible_connection_options:
ansible_connection: local
log: true
lint:
name: yamllint
enabled: false
platforms:
- name: instance
provisioner:
name: ansible
scenario:
name: default
test_sequence:
- prepare
- syntax
- converge
- verify

View File

@@ -0,0 +1,48 @@
---
- name: Converge
hosts: all
collections:
- tripleo.operator
vars:
openstack_bin: echo
tripleo_os_cloud: undercloud
tripleo_undercloud_backup_debug: true
tripleo_undercloud_backup_log_output: false
tripleo_undercloud_backup_log_combine: false
tripleo_undercloud_backup_poll: 1
tasks:
- name: "Include tripleo_undercloud_backup"
include_role:
name: "tripleo_undercloud_backup"
- name: Check role
assert:
that:
- tripleo_undercloud_backup_result.stdout == "undercloud backup"
- name: Check parameter "tripleo_undercloud_backup_add_path"
include_role:
name: "tripleo_undercloud_backup"
vars:
tripleo_undercloud_backup_add_path:
- /foo
- /bar
- name: Assert "tripleo_undercloud_backup_add_path"
assert:
that:
- tripleo_undercloud_backup_result.stdout == "undercloud backup --add-path /foo --add-path /bar"
- name: Check parameter "tripleo_undercloud_backup_exclude_path"
include_role:
name: "tripleo_undercloud_backup"
vars:
tripleo_undercloud_backup_exclude_path:
- /home
- /usr
- name: Assert "tripleo_undercloud_backup_exclude_path"
assert:
that:
- tripleo_undercloud_backup_result.stdout == "undercloud backup --exclude-path /home --exclude-path /usr"

View File

@@ -0,0 +1,8 @@
---
- name: Prepare
hosts: all
tasks:
- name: Include molecule prep
include_role:
name: test_molecule_prep

View File

@@ -2,7 +2,7 @@
- name: Setup undercloud backup facts
set_fact:
_backup_cmd: >-
openstack undercloud backup
{{ openstack_bin }} undercloud backup
{{ tripleo_undercloud_backup_add_path | tripleo.operator.shell_arg_list(parameter='--add-path') }}
{{ tripleo_undercloud_backup_exclude_path | tripleo.operator.shell_arg_list(parameter='--exclude-path') }}
{{ tripleo_undercloud_backup_log_output | ternary((">" ~ tripleo_undercloud_backup_log), '') }}
@@ -11,6 +11,7 @@
- name: Preserve existing log file if exists
timestamp_file:
path: "{{ tripleo_undercloud_backup_log }}"
when: tripleo_undercloud_backup_log_output|bool
- name: Show the underclound backup command
debug:
@@ -23,6 +24,6 @@
chdir: "{{ tripleo_undercloud_backup_home_dir }}"
warn: false
async: "{{ tripleo_undercloud_backup_timeout }}"
poll: 10
poll: "{{ tripleo_undercloud_backup_poll }}"
register: tripleo_undercloud_backup_result
changed_when: true

View File

@@ -19,7 +19,8 @@ Role Variables
* `tripleo_undercloud_install_log_combine`: (Boolean) Flag to combine stdout and stderr in the logfile. Default: true
* `tripleo_undercloud_install_log_output`: (Boolean) Flag to log the output to a file rather than show it in the ansible output. Default: true
* `tripleo_undercloud_install_no_validations`: (Boolean) Flag to add --no-validations to the install. Default: false
* `tripleo_undercloud_install_timeout`: (Number) Timeout for the install command. Default: 7200
* `tripleo_undercloud_install_poll`: (Integer) Number of seconds to wait between checks to see if the install command has completed. This should be set to a value greater or equal to 1. Default: 10
* `tripleo_undercloud_install_timeout`: (Integer) Timeout for the install command. Default: 7200
* `tripleo_undercloud_install_yes`: (Boolean) Flag to add --yes to the install. Default: false
* `tripleo_undercloud_install_log`: (String) Install log file path. Default: "{{ tripleo_undercloud_install_home_dir }}/undercloud_install.log"

View File

@@ -1,5 +1,6 @@
---
# defaults file for tripleo_undercloud_install
openstack_bin: openstack
tripleo_undercloud_install_debug: false
tripleo_undercloud_install_dry_run: false
tripleo_undercloud_install_force_stack_update: false
@@ -8,6 +9,7 @@ tripleo_undercloud_install_inflight_validations: false
tripleo_undercloud_install_log_combine: true
tripleo_undercloud_install_log_output: true
tripleo_undercloud_install_no_validations: false
tripleo_undercloud_install_poll: 10
tripleo_undercloud_install_timeout: 7200
tripleo_undercloud_install_yes: false
tripleo_undercloud_install_log: "{{ tripleo_undercloud_install_home_dir }}/undercloud_install.log"

View File

@@ -0,0 +1,22 @@
---
driver:
name: delegated
options:
managed: false
ansible_connection_options:
ansible_connection: local
log: true
lint:
name: yamllint
enabled: false
platforms:
- name: instance
provisioner:
name: ansible
scenario:
name: default
test_sequence:
- prepare
- syntax
- converge
- verify

View File

@@ -0,0 +1,77 @@
---
- name: Converge
hosts: all
collections:
- tripleo.operator
vars:
openstack_bin: echo
tripleo_os_cloud: undercloud
tripleo_undercloud_install_debug: true
tripleo_undercloud_install_log_output: false
tripleo_undercloud_install_log_combine: false
tripleo_undercloud_install_poll: 1
tasks:
- name: "Include tripleo_undercloud_install"
include_role:
name: "tripleo_undercloud_install"
- name: Check role
assert:
that:
- tripleo_undercloud_install_result.stdout == "undercloud install"
- name: Check parameter "tripleo_undercloud_install_force_stack_update"
include_role:
name: "tripleo_undercloud_install"
vars:
tripleo_undercloud_install_force_stack_update: true
- name: Assert "tripleo_undercloud_install_force_stack_update"
assert:
that:
- tripleo_undercloud_install_result.stdout == "undercloud install --force-stack-update"
- name: Check parameter "tripleo_undercloud_install_no_validations"
include_role:
name: "tripleo_undercloud_install"
vars:
tripleo_undercloud_install_no_validations: true
- name: Assert "tripleo_undercloud_install_no_validations"
assert:
that:
- tripleo_undercloud_install_result.stdout == "undercloud install --no-validations"
- name: Check parameter "tripleo_undercloud_install_inflight_validations"
include_role:
name: "tripleo_undercloud_install"
vars:
tripleo_undercloud_install_inflight_validations: true
- name: Assert "tripleo_undercloud_install_inflight_validations"
assert:
that:
- tripleo_undercloud_install_result.stdout == "undercloud install --inflight-validations"
- name: Check parameter "tripleo_undercloud_install_dry_run"
include_role:
name: "tripleo_undercloud_install"
vars:
tripleo_undercloud_install_dry_run: true
- name: Assert "tripleo_undercloud_install_dry_run"
assert:
that:
- tripleo_undercloud_install_result.stdout == "undercloud install --dry-run"
- name: Check parameter "tripleo_undercloud_install_yes"
include_role:
name: "tripleo_undercloud_install"
vars:
tripleo_undercloud_install_yes: true
- name: Assert "tripleo_undercloud_install_yes"
assert:
that:
- tripleo_undercloud_install_result.stdout == "undercloud install --yes"

View File

@@ -0,0 +1,8 @@
---
- name: Prepare
hosts: all
tasks:
- name: Include molecule prep
include_role:
name: test_molecule_prep

View File

@@ -2,7 +2,7 @@
- name: Setup undercloud install facts
set_fact:
_install_cmd: >-
openstack undercloud install
{{ openstack_bin }} undercloud install
{{ tripleo_undercloud_install_force_stack_update | ternary("--force-stack-update", '') }}
{{ tripleo_undercloud_install_no_validations | ternary("--no-validations", '') }}
{{ tripleo_undercloud_install_inflight_validations | ternary("--inflight-validations", '') }}
@@ -14,6 +14,7 @@
- name: Preserve existing log file if exists
timestamp_file:
path: "{{ tripleo_undercloud_install_log }}"
when: tripleo_undercloud_install_log_output|bool
- name: Show the underclound install command
debug:
@@ -26,6 +27,6 @@
chdir: "{{ tripleo_undercloud_install_home_dir }}"
warn: false
async: "{{ tripleo_undercloud_install_timeout }}"
poll: 10
poll: "{{ tripleo_undercloud_install_poll }}"
register: tripleo_undercloud_install_result
changed_when: true

View File

@@ -16,7 +16,8 @@ Role Variables
* `tripleo_undercloud_minion_install_dry_run`: (Boolean) Flag to add --dry-run to the install. Default: false
* `tripleo_undercloud_minion_install_force_stack_update`: (Boolean) Flag to add --force-stack-update to the install. Default: false
* `tripleo_undercloud_minion_install_no_validations`: (Boolean) Flag to add --no-validations to the install. Default: false
* `tripleo_undercloud_minion_install_timeout`: (Number) Timeout for the install command. Default: 7200
* `tripleo_undercloud_minion_install_poll`: (Integer) Number of seconds to wait between checks to see if the install command has completed. This should be set to a value greater or equal to 1. Default: 10
* `tripleo_undercloud_minion_install_timeout`: (Integer) Timeout for the install command. Default: 7200
* `tripleo_undercloud_minion_install_yes`: (Boolean) Flag to add --yes to the install. Default: false
* `tripleo_undercloud_minion_install_log_combine`: (Boolean) Flag to combine stdout and stderr in the logfile. Default: true
* `tripleo_undercloud_minion_install_log_output`: (Boolean) Flag to log the output to a file rather than show it in the ansible output. Default: true

View File

@@ -1,10 +1,12 @@
---
# defaults file for tripleo_undercloud_minion_install
openstack_bin: openstack
tripleo_undercloud_minion_install_debug: false
tripleo_undercloud_minion_install_home_dir: "{{ ansible_env.HOME }}"
tripleo_undercloud_minion_install_dry_run: false
tripleo_undercloud_minion_install_force_stack_update: false
tripleo_undercloud_minion_install_no_validations: false
tripleo_undercloud_minion_install_poll: 10
tripleo_undercloud_minion_install_timeout: 7200
tripleo_undercloud_minion_install_yes: false
tripleo_undercloud_minion_install_log_combine: true

View File

@@ -0,0 +1,22 @@
---
driver:
name: delegated
options:
managed: false
ansible_connection_options:
ansible_connection: local
log: true
lint:
name: yamllint
enabled: false
platforms:
- name: instance
provisioner:
name: ansible
scenario:
name: default
test_sequence:
- prepare
- syntax
- converge
- verify

View File

@@ -0,0 +1,66 @@
---
- name: Converge
hosts: all
collections:
- tripleo.operator
vars:
openstack_bin: echo
tripleo_os_cloud: undercloud
tripleo_undercloud_minion_install_debug: true
tripleo_undercloud_minion_install_log_output: false
tripleo_undercloud_minion_install_log_combine: false
tripleo_undercloud_minion_install_poll: 1
tasks:
- name: "Include tripleo_undercloud_minion_install"
include_role:
name: "tripleo_undercloud_minion_install"
- name: Check role
assert:
that:
- tripleo_undercloud_minion_install_result.stdout == "undercloud minion install"
- name: Check parameter "tripleo_undercloud_minion_install_force_stack_update"
include_role:
name: "tripleo_undercloud_minion_install"
vars:
tripleo_undercloud_minion_install_force_stack_update: true
- name: Assert "tripleo_undercloud_minion_install_force_stack_update"
assert:
that:
- tripleo_undercloud_minion_install_result.stdout == "undercloud minion install --force-stack-update"
- name: Check parameter "tripleo_undercloud_minion_install_no_validations"
include_role:
name: "tripleo_undercloud_minion_install"
vars:
tripleo_undercloud_minion_install_no_validations: true
- name: Assert "tripleo_undercloud_minion_install_no_validations"
assert:
that:
- tripleo_undercloud_minion_install_result.stdout == "undercloud minion install --no-validations"
- name: Check parameter "tripleo_undercloud_minion_install_dry_run"
include_role:
name: "tripleo_undercloud_minion_install"
vars:
tripleo_undercloud_minion_install_dry_run: true
- name: Assert "tripleo_undercloud_minion_install_dry_run"
assert:
that:
- tripleo_undercloud_minion_install_result.stdout == "undercloud minion install --dry-run"
- name: Check parameter "tripleo_undercloud_minion_install_yes"
include_role:
name: "tripleo_undercloud_minion_install"
vars:
tripleo_undercloud_minion_install_yes: true
- name: Assert "tripleo_undercloud_minion_install_yes"
assert:
that:
- tripleo_undercloud_minion_install_result.stdout == "undercloud minion install --yes"

View File

@@ -0,0 +1,8 @@
---
- name: Prepare
hosts: all
tasks:
- name: Include molecule prep
include_role:
name: test_molecule_prep

View File

@@ -2,7 +2,7 @@
- name: Setup undercloud minion install facts
set_fact:
_install_cmd: >-
openstack undercloud minion install
{{ openstack_bin }} undercloud minion install
{{ tripleo_undercloud_minion_install_force_stack_update | ternary("--force-stack-update", '') }}
{{ tripleo_undercloud_minion_install_no_validations | ternary("--no-validations", '') }}
{{ tripleo_undercloud_minion_install_dry_run | ternary("--dry-run", '') }}
@@ -13,6 +13,7 @@
- name: Preserve existing log file if exists
timestamp_file:
path: "{{ tripleo_undercloud_minion_install_log }}"
when: tripleo_undercloud_minion_install_log_output|bool
- name: Show the underclound minion install command
debug:
@@ -24,6 +25,6 @@
args:
chdir: "{{ tripleo_undercloud_minion_install_home_dir }}"
async: "{{ tripleo_undercloud_minion_install_timeout }}"
poll: 10
poll: "{{ tripleo_undercloud_minion_install_poll }}"
register: tripleo_undercloud_minion_install_result
changed_when: true

View File

@@ -19,7 +19,8 @@ Role Variables
* `tripleo_undercloud_minion_upgrade_log_combine`: (Boolean) Flag to combine stdout and stderr in the logfile. Default: true
* `tripleo_undercloud_minion_upgrade_log_output`: (Boolean) Flag to log the output to a file rather than show it in the ansible output. Default: true
* `tripleo_undercloud_minion_upgrade_no_validations`: (Boolean) Flag to add --no-validations to the upgrade. Default: false
* `tripleo_undercloud_minion_upgrade_timeout`: (Number) Timeout for the upgrade command. Default: 7200
* `tripleo_undercloud_minion_upgrade_poll`: (Integer) Number of seconds to wait between checks to see if the upgrade command has completed. This should be set to a value greater or equal to 1. Default: 10
* `tripleo_undercloud_minion_upgrade_timeout`: (Integer) Timeout for the upgrade command. Default: 7200
* `tripleo_undercloud_minion_upgrade_yes`: (Boolean) Flag to add --yes to the upgrade. Default: false
* `tripleo_undercloud_minion_upgrade_log`: (String) Upgrade log file path. Default: "{{ tripleo_undercloud_minion_upgrade_home_dir }}/undercloud_minion_upgrade.log"

View File

@@ -1,5 +1,6 @@
---
# defaults file for tripleo_undercloud_minion_upgrade
openstack_bin: openstack
tripleo_undercloud_minion_upgrade_debug: false
tripleo_undercloud_minion_upgrade_dry_run: false
tripleo_undercloud_minion_upgrade_force_stack_update: false
@@ -7,6 +8,7 @@ tripleo_undercloud_minion_upgrade_home_dir: "{{ ansible_env.HOME }}"
tripleo_undercloud_minion_upgrade_log_combine: true
tripleo_undercloud_minion_upgrade_log_output: true
tripleo_undercloud_minion_upgrade_no_validations: false
tripleo_undercloud_minion_upgrade_poll: 10
tripleo_undercloud_minion_upgrade_timeout: 7200
tripleo_undercloud_minion_upgrade_yes: false
tripleo_undercloud_minion_upgrade_log: "{{ tripleo_undercloud_minion_home_dir }}/undercloud_minion_upgrade.log"
tripleo_undercloud_minion_upgrade_log: "{{ tripleo_undercloud_minion_upgrade_home_dir }}/undercloud_minion_upgrade.log"

View File

@@ -0,0 +1,22 @@
---
driver:
name: delegated
options:
managed: false
ansible_connection_options:
ansible_connection: local
log: true
lint:
name: yamllint
enabled: false
platforms:
- name: instance
provisioner:
name: ansible
scenario:
name: default
test_sequence:
- prepare
- syntax
- converge
- verify

View File

@@ -0,0 +1,66 @@
---
- name: Converge
hosts: all
collections:
- tripleo.operator
vars:
openstack_bin: echo
tripleo_os_cloud: undercloud
tripleo_undercloud_minion_upgrade_debug: true
tripleo_undercloud_minion_upgrade_log_output: false
tripleo_undercloud_minion_upgrade_log_combine: false
tripleo_undercloud_minion_upgrade_poll: 1
tasks:
- name: "Include tripleo_undercloud_minion_upgrade"
include_role:
name: "tripleo_undercloud_minion_upgrade"
- name: Check role
assert:
that:
- tripleo_undercloud_minion_upgrade_result.stdout == "undercloud minion upgrade"
- name: Check parameter "tripleo_undercloud_minion_upgrade_force_stack_update"
include_role:
name: "tripleo_undercloud_minion_upgrade"
vars:
tripleo_undercloud_minion_upgrade_force_stack_update: true
- name: Assert "tripleo_undercloud_minion_upgrade_force_stack_update"
assert:
that:
- tripleo_undercloud_minion_upgrade_result.stdout == "undercloud minion upgrade --force-stack-update"
- name: Check parameter "tripleo_undercloud_minion_upgrade_no_validations"
include_role:
name: "tripleo_undercloud_minion_upgrade"
vars:
tripleo_undercloud_minion_upgrade_no_validations: true
- name: Assert "tripleo_undercloud_minion_upgrade_no_validations"
assert:
that:
- tripleo_undercloud_minion_upgrade_result.stdout == "undercloud minion upgrade --no-validations"
- name: Check parameter "tripleo_undercloud_minion_upgrade_dry_run"
include_role:
name: "tripleo_undercloud_minion_upgrade"
vars:
tripleo_undercloud_minion_upgrade_dry_run: true
- name: Assert "tripleo_undercloud_minion_upgrade_dry_run"
assert:
that:
- tripleo_undercloud_minion_upgrade_result.stdout == "undercloud minion upgrade --dry-run"
- name: Check parameter "tripleo_undercloud_minion_upgrade_yes"
include_role:
name: "tripleo_undercloud_minion_upgrade"
vars:
tripleo_undercloud_minion_upgrade_yes: true
- name: Assert "tripleo_undercloud_minion_upgrade_yes"
assert:
that:
- tripleo_undercloud_minion_upgrade_result.stdout == "undercloud minion upgrade --yes"

View File

@@ -0,0 +1,8 @@
---
- name: Prepare
hosts: all
tasks:
- name: Include molecule prep
include_role:
name: test_molecule_prep

View File

@@ -2,7 +2,7 @@
- name: Setup undercloud minion upgrade facts
set_fact:
_upgrade_cmd: >-
openstack undercloud minion upgrade
{{ openstack_bin }} undercloud minion upgrade
{{ tripleo_undercloud_minion_upgrade_force_stack_update | ternary("--force-stack-update", '') }}
{{ tripleo_undercloud_minion_upgrade_no_validations | ternary("--no-validations", '') }}
{{ tripleo_undercloud_minion_upgrade_dry_run | ternary("--dry-run", '') }}
@@ -13,6 +13,7 @@
- name: Preserve existing log file if exists
timestamp_file:
path: "{{ tripleo_undercloud_minion_upgrade_log }}"
when: tripleo_undercloud_minion_upgrade_log_output|bool
- name: Show the underclound minion upgrade command
debug:
@@ -24,6 +25,6 @@
args:
chdir: "{{ tripleo_undercloud_minion_upgrade_home_dir }}"
async: "{{ tripleo_undercloud_minion_upgrade_timeout }}"
poll: 10
poll: "{{ tripleo_undercloud_minion_upgrade_poll }}"
register: tripleo_undercloud_minion_upgrade_result
changed_when: true

View File

@@ -19,7 +19,8 @@ Role Variables
* `tripleo_undercloud_upgrade_log_combine`: (Boolean) Flag to combine stdout and stderr in the logfile. Default: true
* `tripleo_undercloud_upgrade_log_output`: (Boolean) Flag to log the output to a file rather than show it in the ansible output. Default: true
* `tripleo_undercloud_upgrade_no_validations`: (Boolean) Flag to add --no-validations to the upgrade. Default: false
* `tripleo_undercloud_upgrade_timeout`: (Number) Timeout for the upgrade command. Default: 7200
* `tripleo_undercloud_upgrade_poll`: (Integer) Number of seconds to wait between checks to see if the upgrade command has completed. This should be set to a value greater or equal to 1. Default: 10
* `tripleo_undercloud_upgrade_timeout`: (Integer) Timeout for the upgrade command. Default: 7200
* `tripleo_undercloud_upgrade_yes`: (Boolean) Flag to add --yes to the upgrade. Default: false
* `tripleo_undercloud_upgrade_log`: (String) Upgrade log file path. Default: "{{ tripleo_undercloud_upgrade_home_dir }}/undercloud_upgrade.log"

View File

@@ -1,5 +1,6 @@
---
# defaults file for tripleo-undercloud
openstack_bin: openstack
tripleo_undercloud_upgrade_debug: false
tripleo_undercloud_upgrade_dry_run: false
tripleo_undercloud_upgrade_force_stack_update: false
@@ -8,6 +9,7 @@ tripleo_undercloud_upgrade_inflight_validations: false
tripleo_undercloud_upgrade_log_combine: true
tripleo_undercloud_upgrade_log_output: true
tripleo_undercloud_upgrade_no_validations: false
tripleo_undercloud_upgrade_poll: 10
tripleo_undercloud_upgrade_timeout: 7200
tripleo_undercloud_upgrade_yes: false
tripleo_undercloud_upgrade_log: "{{ tripleo_undercloud_upgrade_home_dir }}/undercloud_upgrade.log"

View File

@@ -0,0 +1,22 @@
---
driver:
name: delegated
options:
managed: false
ansible_connection_options:
ansible_connection: local
log: true
lint:
name: yamllint
enabled: false
platforms:
- name: instance
provisioner:
name: ansible
scenario:
name: default
test_sequence:
- prepare
- syntax
- converge
- verify

View File

@@ -0,0 +1,77 @@
---
- name: Converge
hosts: all
collections:
- tripleo.operator
vars:
openstack_bin: echo
tripleo_os_cloud: undercloud
tripleo_undercloud_upgrade_debug: true
tripleo_undercloud_upgrade_log_output: false
tripleo_undercloud_upgrade_log_combine: false
tripleo_undercloud_upgrade_poll: 1
tasks:
- name: "Include tripleo_undercloud_upgrade"
include_role:
name: "tripleo_undercloud_upgrade"
- name: Check role
assert:
that:
- tripleo_undercloud_upgrade_result.stdout == "undercloud upgrade"
- name: Check parameter "tripleo_undercloud_upgrade_force_stack_update"
include_role:
name: "tripleo_undercloud_upgrade"
vars:
tripleo_undercloud_upgrade_force_stack_update: true
- name: Assert "tripleo_undercloud_upgrade_force_stack_update"
assert:
that:
- tripleo_undercloud_upgrade_result.stdout == "undercloud upgrade --force-stack-update"
- name: Check parameter "tripleo_undercloud_upgrade_no_validations"
include_role:
name: "tripleo_undercloud_upgrade"
vars:
tripleo_undercloud_upgrade_no_validations: true
- name: Assert "tripleo_undercloud_upgrade_no_validations"
assert:
that:
- tripleo_undercloud_upgrade_result.stdout == "undercloud upgrade --no-validations"
- name: Check parameter "tripleo_undercloud_upgrade_inflight_validations"
include_role:
name: "tripleo_undercloud_upgrade"
vars:
tripleo_undercloud_upgrade_inflight_validations: true
- name: Assert "tripleo_undercloud_upgrade_inflight_validations"
assert:
that:
- tripleo_undercloud_upgrade_result.stdout == "undercloud upgrade --inflight-validations"
- name: Check parameter "tripleo_undercloud_upgrade_dry_run"
include_role:
name: "tripleo_undercloud_upgrade"
vars:
tripleo_undercloud_upgrade_dry_run: true
- name: Assert "tripleo_undercloud_upgrade_dry_run"
assert:
that:
- tripleo_undercloud_upgrade_result.stdout == "undercloud upgrade --dry-run"
- name: Check parameter "tripleo_undercloud_upgrade_yes"
include_role:
name: "tripleo_undercloud_upgrade"
vars:
tripleo_undercloud_upgrade_yes: true
- name: Assert "tripleo_undercloud_upgrade_yes"
assert:
that:
- tripleo_undercloud_upgrade_result.stdout == "undercloud upgrade --yes"

View File

@@ -0,0 +1,8 @@
---
- name: Prepare
hosts: all
tasks:
- name: Include molecule prep
include_role:
name: test_molecule_prep

View File

@@ -2,7 +2,7 @@
- name: Setup undercloud upgrade facts
set_fact:
_upgrade_cmd: >-
openstack undercloud upgrade
{{ openstack_bin }} undercloud upgrade
{{ tripleo_undercloud_upgrade_force_stack_update | ternary("--force-stack-update", '') }}
{{ tripleo_undercloud_upgrade_no_validations | ternary("--no-validations", '') }}
{{ tripleo_undercloud_upgrade_inflight_validations | ternary("--inflight-validations", '') }}
@@ -14,6 +14,7 @@
- name: Preserve existing log file if exists
timestamp_file:
path: "{{ tripleo_undercloud_upgrade_log }}"
when: tripleo_undercloud_upgrade_log_output|bool
- name: Show the underclound upgrade command
debug:
@@ -26,6 +27,6 @@
chdir: "{{ tripleo_undercloud_upgrade_home_dir }}"
warn: false
async: "{{ tripleo_undercloud_upgrade_timeout }}"
poll: 10
poll: "{{ tripleo_undercloud_upgrade_poll }}"
register: tripleo_undercloud_upgrade_result
changed_when: true

View File

@@ -11,9 +11,14 @@
- tripleo-operator-molecule-tripleo_overcloud_deploy
- tripleo-operator-molecule-tripleo_overcloud_export
- tripleo-operator-molecule-tripleo_overcloud_failures
- tripleo-operator-molecule-tripleo_overcloud_node_introspect
- tripleo-operator-molecule-tripleo_overcloud_node_configure
- tripleo-operator-molecule-tripleo_overcloud_node_clean
- tripleo-operator-molecule-tripleo_overcloud_node_configure
- tripleo-operator-molecule-tripleo_overcloud_node_introspect
- tripleo-operator-molecule-tripleo_undercloud_backup
- tripleo-operator-molecule-tripleo_undercloud_install
- tripleo-operator-molecule-tripleo_undercloud_minion_install
- tripleo-operator-molecule-tripleo_undercloud_minion_upgrade
- tripleo-operator-molecule-tripleo_undercloud_upgrade
gate:
jobs:
@@ -26,10 +31,15 @@
- tripleo-operator-molecule-tripleo_overcloud_deploy
- tripleo-operator-molecule-tripleo_overcloud_export
- tripleo-operator-molecule-tripleo_overcloud_failures
- tripleo-operator-molecule-tripleo_overcloud_node_introspect
- tripleo-operator-molecule-tripleo_overcloud_node_configure
- tripleo-operator-molecule-tripleo_overcloud_node_clean
- tripleo-operator-molecule-tripleo_container_image_prepare
- tripleo-operator-molecule-tripleo_overcloud_node_configure
- tripleo-operator-molecule-tripleo_overcloud_node_introspect
- tripleo-operator-molecule-tripleo_undercloud_backup
- tripleo-operator-molecule-tripleo_undercloud_install
- tripleo-operator-molecule-tripleo_undercloud_minion_install
- tripleo-operator-molecule-tripleo_undercloud_minion_upgrade
- tripleo-operator-molecule-tripleo_undercloud_upgrade
- job:
files:
@@ -134,3 +144,43 @@
parent: tripleo-operator-molecule-base
vars:
tox_extra_args: tripleo_container_image_prepare
- job:
files:
- ^roles/tripleo_undercloud_backup/.*
name: tripleo-operator-molecule-tripleo_undercloud_backup
parent: tripleo-operator-molecule-base
vars:
tox_extra_args: tripleo_undercloud_backup
- job:
files:
- ^roles/tripleo_undercloud_install/.*
name: tripleo-operator-molecule-tripleo_undercloud_install
parent: tripleo-operator-molecule-base
vars:
tox_extra_args: tripleo_undercloud_install
- job:
files:
- ^roles/tripleo_undercloud_minion_install/.*
name: tripleo-operator-molecule-tripleo_undercloud_minion_install
parent: tripleo-operator-molecule-base
vars:
tox_extra_args: tripleo_undercloud_minion_install
- job:
files:
- ^roles/tripleo_undercloud_minion_upgrade/.*
name: tripleo-operator-molecule-tripleo_undercloud_minion_upgrade
parent: tripleo-operator-molecule-base
vars:
tox_extra_args: tripleo_undercloud_minion_upgrade
- job:
files:
- ^roles/tripleo_undercloud_upgrade/.*
name: tripleo-operator-molecule-tripleo_undercloud_upgrade
parent: tripleo-operator-molecule-base
vars:
tox_extra_args: tripleo_undercloud_upgrade