From 94154098d7b4ffedd63c52927a8053f2a0cd6426 Mon Sep 17 00:00:00 2001 From: Marios Andreou Date: Tue, 12 Nov 2019 11:22:27 +0200 Subject: [PATCH] Move vars/common.yaml to main.yaml for buildimages and containers These are used as roles with include_role so having common.yaml brings no benefit since vars_from defaults to main.yaml. So we can remove the explicit include_vars for common. First noticed it working in [1] and then split this change as the parent into its own review [1] https://review.opendev.org/692985 Change-Id: Ia5c83f1bafc23d149bcc67d4af697f3af7aa976c --- roles/build-containers/tasks/main.yaml | 4 ---- roles/build-containers/tasks/post.yaml | 4 ---- roles/build-containers/tasks/pre.yaml | 4 ---- roles/build-containers/vars/{common.yaml => main.yaml} | 0 roles/oooci-build-images/tasks/main.yaml | 4 ---- roles/oooci-build-images/tasks/pre.yaml | 4 ---- roles/oooci-build-images/vars/{common.yaml => main.yaml} | 0 7 files changed, 20 deletions(-) rename roles/build-containers/vars/{common.yaml => main.yaml} (100%) rename roles/oooci-build-images/vars/{common.yaml => main.yaml} (100%) diff --git a/roles/build-containers/tasks/main.yaml b/roles/build-containers/tasks/main.yaml index be4669a06..6bd6ad8a6 100644 --- a/roles/build-containers/tasks/main.yaml +++ b/roles/build-containers/tasks/main.yaml @@ -1,8 +1,4 @@ --- -- name: Include common vars - include_vars: - dir: "vars" - - name: Set branch for building containers check jobs set_fact: ci_branch: "{{ zuul.branch | replace('stable/','') }}" diff --git a/roles/build-containers/tasks/post.yaml b/roles/build-containers/tasks/post.yaml index 24b230cfe..a9f1a3ddf 100644 --- a/roles/build-containers/tasks/post.yaml +++ b/roles/build-containers/tasks/post.yaml @@ -1,8 +1,4 @@ --- -- name: Include common vars - include_vars: - dir: "vars" - - name: Grab job artifacts become: true args: diff --git a/roles/build-containers/tasks/pre.yaml b/roles/build-containers/tasks/pre.yaml index 071c05a4d..8cfb9c6b8 100644 --- a/roles/build-containers/tasks/pre.yaml +++ b/roles/build-containers/tasks/pre.yaml @@ -1,8 +1,4 @@ --- -- name: Include common vars - include_vars: - dir: "vars" - - name: Ensure legacy workspace directory file: path: '{{ workspace }}' diff --git a/roles/build-containers/vars/common.yaml b/roles/build-containers/vars/main.yaml similarity index 100% rename from roles/build-containers/vars/common.yaml rename to roles/build-containers/vars/main.yaml diff --git a/roles/oooci-build-images/tasks/main.yaml b/roles/oooci-build-images/tasks/main.yaml index abc2ecea5..c835e5bce 100644 --- a/roles/oooci-build-images/tasks/main.yaml +++ b/roles/oooci-build-images/tasks/main.yaml @@ -1,8 +1,4 @@ --- -- name: Include common buildimage vars - include_vars: - file: "common.yaml" - # The python_v fact is used with vars/common.yaml to set the right # overcloud-images file in the build-images.sh.j2 template - name: Get python_v fact for py2 or py3 common vars diff --git a/roles/oooci-build-images/tasks/pre.yaml b/roles/oooci-build-images/tasks/pre.yaml index 531bb89b7..0e8fb9cb2 100644 --- a/roles/oooci-build-images/tasks/pre.yaml +++ b/roles/oooci-build-images/tasks/pre.yaml @@ -1,8 +1,4 @@ --- -- name: Include common buildimage vars - include_vars: - file: "common.yaml" - - when: rhel_image_source is defined block: - name: Set dib_local_image and other facts used by tripleo-ci build-image role build template diff --git a/roles/oooci-build-images/vars/common.yaml b/roles/oooci-build-images/vars/main.yaml similarity index 100% rename from roles/oooci-build-images/vars/common.yaml rename to roles/oooci-build-images/vars/main.yaml