From 5a878af6b92d2875ae35b7c0bef6000058720488 Mon Sep 17 00:00:00 2001 From: Shashank Tavildar Date: Tue, 6 Sep 2016 15:09:16 +0000 Subject: [PATCH] Added the option to copy changes between stock env.d and repo env.d[M->N] The location of the env.d files for the Newton release has been changed to the inventory folder and needs to be updated in the existing upgrade playbook. This issue is fixed in the current patch. Also the playbook only copies changes between the stock env.d and files in /etc/openstack_deploy/env.d located in the root repo. Change-Id: I9b368617565931306bd075a0f5626466ad924493 Closes-Bug: #1620691 --- .../playbooks/deploy-config-changes.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml b/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml index cb0ff39079..a69ff3f8a6 100644 --- a/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml +++ b/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml @@ -25,14 +25,24 @@ dest: "/etc/openstack_deploy.NEWTON/" force: no + - name: Retrieve differences + shell: rsync -avun "{{ repo_root_dir }}/playbooks/inventory/env.d/" "/etc/openstack_deploy/env.d/" | grep "yml$" + ignore_errors: yes + register: diff_result + - name: Copy new env.d files into place copy: - src: "{{ repo_root_dir }}/etc/openstack_deploy/env.d/{{ item }}.yml" - dest: "/etc/openstack_deploy/env.d/{{ item }}.yml" + src: "{{ repo_root_dir }}/playbooks/inventory/env.d/{{ item }}" + dest: "/etc/openstack_deploy/env.d/{{ item }}" force: no with_items: - - ironic - + - "{{ diff_result.stdout_lines }}" + when: diff_result.stdout != "" + + - name: Check result for emptiness + debug: msg="All new env.d files are placed in the stock repo. No new changes" + when: diff_result.stdout == "" + - name: Update OpenStack variable names command: "{{ upgrade_scripts }}/migrate_openstack_vars.py {{ item }} {{ (item | basename)[:-4] }}" args: