Files
tripleo-operator-ansible/roles/tripleo-undercloud-upgrade/tasks/main.yml
Alex Schultz 8c937edbae Add basic role for undercloud function
This change adds basic wrapper roles for the undercloud install,
backup and upgrade actions.

Change-Id: I20284d57689cbbd244a324076ad95b4df535aa8c
2020-01-14 07:58:22 -07:00

31 lines
1.2 KiB
YAML

---
- name: Setup undercloud upgrade facts
set_fact:
_upgrade_cmd: >-
openstack 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", '') }}
{{ tripleo_undercloud_upgrade_dry_run | ternary("--dry-run", '') }}
{{ tripleo_undercloud_upgrade_yes | ternary("--yes", '') }}
{{ tripleo_undercloud_upgrade_log_output | ternary((">" ~ tripleo_undercloud_upgrade_log), '') }}
{{ tripleo_undercloud_upgrade_log_combine | ternary("2>&1", '') }}
- name: Preserve existing log file if exists
timestamp_file:
path: "{{ tripleo_undercloud_upgrade_log }}"
- name: Show the underclound upgrade command
debug:
var: _upgrade_cmd
when: tripleo_undercloud_upgrade_debug|bool
- name: undercloud upgrade
shell: "{{ _upgrade_cmd }}" # noqa 305
args:
chdir: "{{ tripleo_undercloud_upgrade_home_dir }}"
warn: false
async: "{{ tripleo_undercloud_upgrade_timeout }}"
poll: 10
changed_when: true