diff --git a/playbooks/kayobe-base/pre.yml b/playbooks/kayobe-base/pre.yml index f90db4a1c..df5db3b6b 100644 --- a/playbooks/kayobe-base/pre.yml +++ b/playbooks/kayobe-base/pre.yml @@ -15,3 +15,35 @@ dest: "/tmp" mode: 0644 remote_src: true + + - name: Ensure kayobe is executed in verbose mode + lineinfile: + path: "{{ kayobe_src_dir }}/dev/config.sh" + line: "export KAYOBE_EXTRA_ARGS=-vvv" + regexp: "^#export KAYOBE_EXTRA_ARGS=$" + + - block: + - name: Ensure previous kayobe directory exists + file: + path: "{{ previous_kayobe_src_dir }}" + state: directory + + - name: Ensure previous kayobe repository is cloned + command: >- + git clone {{ kayobe_src_dir }} {{ previous_kayobe_src_dir }} -b stable/{{ previous_release | lower }} + + - name: Ensure previous kayobe-config directory exists + file: + path: "{{ previous_kayobe_config_src_dir }}" + state: directory + + - name: Ensure kayobe-config repository is cloned + command: >- + git clone {{ kayobe_config_src_dir }} {{ previous_kayobe_config_src_dir }} -b stable/{{ previous_release | lower }} + + - name: Ensure previous kayobe is executed in verbose mode + lineinfile: + path: "{{ previous_kayobe_src_dir }}/dev/config.sh" + line: "export KAYOBE_EXTRA_ARGS=-vvv" + regexp: "^#export KAYOBE_EXTRA_ARGS=$" + when: is_upgrade diff --git a/playbooks/kayobe-overcloud-upgrade-base/pre.yml b/playbooks/kayobe-overcloud-upgrade-base/pre.yml index 8370ae461..7809b50bc 100644 --- a/playbooks/kayobe-overcloud-upgrade-base/pre.yml +++ b/playbooks/kayobe-overcloud-upgrade-base/pre.yml @@ -1,24 +1,6 @@ --- - hosts: primary tasks: - - name: Ensure previous kayobe directory exists - file: - path: "{{ previous_kayobe_src_dir }}" - state: directory - - - name: Ensure previous kayobe repository is cloned - command: >- - git clone {{ kayobe_src_dir }} {{ previous_kayobe_src_dir }} -b stable/{{ previous_release | lower }} - - - name: Ensure previous kayobe-config directory exists - file: - path: "{{ previous_kayobe_config_src_dir }}" - state: directory - - - name: Ensure kayobe-config repository is cloned - command: >- - git clone {{ kayobe_config_src_dir }} {{ previous_kayobe_config_src_dir }} -b stable/{{ previous_release | lower }} - # NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes # precedence over the standard config files. - name: Ensure kayobe-config override config file exists diff --git a/playbooks/kayobe-seed-upgrade-base/pre.yml b/playbooks/kayobe-seed-upgrade-base/pre.yml index c21aac0cd..c38f7beb3 100644 --- a/playbooks/kayobe-seed-upgrade-base/pre.yml +++ b/playbooks/kayobe-seed-upgrade-base/pre.yml @@ -1,24 +1,6 @@ --- - hosts: primary tasks: - - name: Ensure previous kayobe directory exists - file: - path: "{{ previous_kayobe_src_dir }}" - state: directory - - - name: Ensure previous kayobe repository is cloned - command: >- - git clone {{ kayobe_src_dir }} {{ previous_kayobe_src_dir }} -b stable/{{ previous_release | lower }} - - - name: Ensure previous kayobe-config directory exists - file: - path: "{{ previous_kayobe_config_src_dir }}" - state: directory - - - name: Ensure kayobe-config repository is cloned - command: >- - git clone {{ kayobe_config_src_dir }} {{ previous_kayobe_config_src_dir }} -b stable/{{ previous_release | lower }} - # NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes # precedence over the standard config files. - name: Ensure kayobe-config override config file exists diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 2c3141a63..ebdc8bc85 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -84,6 +84,7 @@ previous_kayobe_config_src_dir: "{{ ansible_env.PWD ~ '/previous/kayobe-config' }}" requirements_src_dir: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/requirements'].src_dir }}" tenks_src_dir: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/tenks'].src_dir }}" + is_upgrade: "{{ 'upgrade' in zuul.job }}" - job: name: kayobe-overcloud-base