Adds support for leaping from Mitaka
Adds a few tweaks to get Mitaka to function as a leapfrog source. - Adds Mitaka as option - Adjusts detection to include eol branches - Creates file if user_variables.yml doesn't exist - Checks if osa_secrets_file_name exists Change-Id: Id0bce1441456bc545deca67710004b750901e81b
This commit is contained in:
parent
582e5199f3
commit
851d22e4d5
@ -172,8 +172,8 @@ function validate_upgrade_input {
|
||||
|
||||
echo
|
||||
warning "Please enter the source series to upgrade from."
|
||||
notice "JUNO, KILO or LIBERTY"
|
||||
read -p 'Enter "JUNO", "KILO", or "LIBERTY" to continue: ' UPGRADE_FROM
|
||||
notice "JUNO, KILO, LIBERTY or MITAKA"
|
||||
read -p 'Enter "JUNO", "KILO", "LIBERTY" or "MITAKA" to continue: ' UPGRADE_FROM
|
||||
export INPUT_UPGRADE_FROM=${UPGRADE_FROM}
|
||||
|
||||
if [[ ${INPUT_UPGRADE_FROM} == ${CODE_UPGRADE_FROM} ]]; then
|
||||
@ -206,19 +206,19 @@ function discover_code_version {
|
||||
else
|
||||
source /etc/openstack-release
|
||||
case "${DISTRIB_RELEASE%%.*}" in
|
||||
*11)
|
||||
*11|eol-kilo)
|
||||
export CODE_UPGRADE_FROM="KILO"
|
||||
notice "You seem to be running Kilo"
|
||||
;;
|
||||
*12)
|
||||
*12|liberty-eol)
|
||||
export CODE_UPGRADE_FROM="LIBERTY"
|
||||
notice "You seem to be running Liberty"
|
||||
;;
|
||||
*13)
|
||||
*13|mitaka-eol)
|
||||
export CODE_UPGRADE_FROM="MITAKA"
|
||||
notice "You seem to be running Mitaka"
|
||||
;;
|
||||
*14)
|
||||
*14|newton-eol)
|
||||
export CODE_UPGRADE_FROM="NEWTON"
|
||||
notice "You seem to be running Newton"
|
||||
;;
|
||||
|
@ -56,6 +56,7 @@
|
||||
regexp: "^{{ item.key }}"
|
||||
line: "{{ item.key }}: {{ item.value }}"
|
||||
state: present
|
||||
create: yes
|
||||
with_items:
|
||||
- key: "default_bind_mount_logs"
|
||||
value: false
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
# Copyright 2015, Rackspace US, Inc.
|
||||
# Copyright 2018, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -24,20 +24,22 @@
|
||||
register: secrets
|
||||
- name: Rename changed secrets
|
||||
lineinfile:
|
||||
dest: "/etc/openstack_deploy/user_secrets.yml"
|
||||
dest: "/etc/openstack_deploy/{{ _osa_secrets_file_name }}"
|
||||
regexp: "^{{ item.old_name }}: (.*)$"
|
||||
line: "{{ item.new_name }}: \\1"
|
||||
backrefs: yes
|
||||
with_items:
|
||||
- { old_name: "ironic_galera_password", new_name: "ironic_container_mysql_password" }
|
||||
- name: Read user secrets file
|
||||
shell: "grep '^[a-zA-Z]' /etc/openstack_deploy/user_secrets.yml"
|
||||
shell: "grep '^[a-zA-Z]' /etc/openstack_deploy/{{ _osa_secrets_file_name }}"
|
||||
register: user_secrets
|
||||
- name: Add missing secrets
|
||||
lineinfile:
|
||||
dest: "/etc/openstack_deploy/user_secrets.yml"
|
||||
dest: "/etc/openstack_deploy/{{ _osa_secrets_file_name }}"
|
||||
line: "{{ item }}"
|
||||
with_items: "{{ secrets.stdout_lines }}"
|
||||
when: user_secrets.stdout.find("{{ item }}") == -1
|
||||
- name: Generate new secrets
|
||||
shell: "{{ osa_playbook_dir }}/scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml"
|
||||
shell: "{{ osa_playbook_dir }}/scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ _osa_secrets_file_name }}"
|
||||
vars:
|
||||
_osa_secrets_file_name: "{{ osa_secrets_file_name | default('user_secrets.yml') }}"
|
||||
|
Loading…
Reference in New Issue
Block a user