only rebuild xos base image when xos_container_rebuild is set
Change-Id: Iba2a5d5a743626ad392f111488e3da040e53b38f
diff --git a/cord-head-playbook.yml b/cord-head-playbook.yml
index 52cca82..7e8c221 100644
--- a/cord-head-playbook.yml
+++ b/cord-head-playbook.yml
@@ -51,7 +51,7 @@
- name: XOS setup
hosts: head
roles:
- - xos-build
+ - { role: xos-build, when: xos_container_rebuild }
- xos-install
- name: Finish OpenStack install
diff --git a/roles/xos-install/defaults/main.yml b/roles/xos-install/defaults/main.yml
index 3e08263..7efc55e 100644
--- a/roles/xos-install/defaults/main.yml
+++ b/roles/xos-install/defaults/main.yml
@@ -7,8 +7,6 @@
xos_configuration: "devel"
-xos_container_rebuild: False
-
service_profile_repo_url: "https://gerrit.opencord.org/p/service-profile.git"
service_profile_repo_dest: "{{ ansible_user_dir }}/service-profile"
service_profile_repo_branch: "HEAD"
diff --git a/roles/xos-install/tasks/main.yml b/roles/xos-install/tasks/main.yml
index 5d5ac49..7f70790 100644
--- a/roles/xos-install/tasks/main.yml
+++ b/roles/xos-install/tasks/main.yml
@@ -129,14 +129,6 @@
- redis
when: docker_registry_check|succeeded
-# ---- optional: rebuild base container ----
-
-- name: Rebuild XOS containers
- when: xos_container_rebuild
- command: make {{ item }}
- chdir="{{ xos_repo_dest }}/containers/xos/"
- with_items:
- - base