copy repos from dev machine to head node
copy repos from head node to xos VM
Change-Id: Iea85bffa1aa34f3da52dadb08e69ad2ac6e93df2
diff --git a/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml b/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
index 5b646a5..cc5b955 100644
--- a/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
+++ b/roles/xos-vm-install/files/xos-setup-cord-pod-playbook.yml
@@ -21,12 +21,32 @@
- python-keystoneclient
- python-glanceclient
+ - name: Check to see if xos_install/orchestration directory exists
+ local_action: stat path="{{ playbook_dir }}/xos_install/orchestration"
+ register: orchestration
+
+ # Two methods to install:
+ # 1) If running from cord-in-a-box, then xos_install/orchestration will
+ # be populated with the checked-out xos repositories, and we can
+ # now copy them to the XOS VM.
+ # 2) If not running from cord-in-a-box, then xos_install will not
+ # exist, and we will check out the repos using git.
+
+ - name: Copy repositories to the XOS VM
+ synchronize:
+ src: "{{ playbook_dir }}/xos_install/orchestration/"
+ dest: "{{ orchestration_dest }}"
+ when:
+ orchestration.stat.exists == True
+
- name: Clone XOS repo
git:
repo={{ xos_repo_url }}
dest={{ xos_repo_dest }}
version={{ xos_repo_branch }}
force=yes
+ when:
+ orchestration.stat.exists == False
- name: Clone service-profile repo
git:
@@ -34,6 +54,8 @@
dest={{ service_profile_repo_dest }}
version={{ service_profile_repo_branch }}
force=yes
+ when:
+ orchestration.stat.exists == False
- name: Copy over SSH keys
copy: