diff --git a/leap-upgrades/lib/functions.sh b/leap-upgrades/lib/functions.sh index d38a2364..f6a096f9 100644 --- a/leap-upgrades/lib/functions.sh +++ b/leap-upgrades/lib/functions.sh @@ -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" ;; diff --git a/leap-upgrades/upgrade-utilities-newton/playbooks/deploy-config-changes-newton.yml b/leap-upgrades/upgrade-utilities-newton/playbooks/deploy-config-changes-newton.yml index 8cfd7f9e..a18b766d 100644 --- a/leap-upgrades/upgrade-utilities-newton/playbooks/deploy-config-changes-newton.yml +++ b/leap-upgrades/upgrade-utilities-newton/playbooks/deploy-config-changes-newton.yml @@ -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 diff --git a/leap-upgrades/upgrade-utilities-newton/playbooks/user-secrets-adjustment-newton.yml b/leap-upgrades/upgrade-utilities-newton/playbooks/user-secrets-adjustment-newton.yml index 9305801b..c7c4ba1f 100644 --- a/leap-upgrades/upgrade-utilities-newton/playbooks/user-secrets-adjustment-newton.yml +++ b/leap-upgrades/upgrade-utilities-newton/playbooks/user-secrets-adjustment-newton.yml @@ -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') }}"