summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-08-31 13:33:40 +0100
committerMarkos Chandras <mchandras@suse.de>2018-09-04 07:26:40 +0000
commited993a6fec64934283984c08bd4e99e8d9298d9c (patch)
tree4b415744b404a710d20126dfe44e92c4a9e32197
parent933c7a0f36c970d24954b9ba1552a29a75b43976 (diff)
playbooks: configure-opnfvhost: Ensure we copy only the tracked files
This prevents rsync spending time copying temporary files which may have been created during a CI run. deploy-scenario:os-nosdn-nofeature installer-type:osa Change-Id: Ie02e0dbfc06b8fac40d6b90c4c99e361ecf1c0b2 Signed-off-by: Markos Chandras <mchandras@suse.de>
-rw-r--r--xci/installer/kubespray/playbooks/configure-opnfvhost.yml19
-rw-r--r--xci/installer/osa/playbooks/configure-opnfvhost.yml19
2 files changed, 36 insertions, 2 deletions
diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
index 36104b6c..82ece961 100644
--- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
+++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
@@ -28,12 +28,29 @@
configure_network: xci_flavor != 'aio'
tasks:
+ - name: Create list of files to copy
+ shell: |
+ git ls-tree -r --name-only HEAD > {{ xci_cache }}/releng-xci.files
+ echo ".git/" >> {{ xci_cache }}/releng-xci.files
+ echo ".cache/repos/" >> {{ xci_cache }}/releng-xci.files
+ echo ".cache/xci.env" >> {{ xci_cache }}/releng-xci.files
+ args:
+ executable: /bin/bash
+ chdir: "{{ xci_path }}"
+ changed_when: False
+ delegate_to: 127.0.0.1
+ tags:
+ - skip_ansible_lint
+
- name: Copy releng-xci to remote host
synchronize:
+ archive: yes
src: "{{ xci_path }}/"
dest: "{{ remote_xci_path }}"
- recursive: yes
delete: yes
+ rsync_opts:
+ - "--recursive"
+ - "--files-from={{ xci_cache }}/releng-xci.files"
- name: delete the opnfv_inventory directory
file:
diff --git a/xci/installer/osa/playbooks/configure-opnfvhost.yml b/xci/installer/osa/playbooks/configure-opnfvhost.yml
index 768b6564..4fc966a3 100644
--- a/xci/installer/osa/playbooks/configure-opnfvhost.yml
+++ b/xci/installer/osa/playbooks/configure-opnfvhost.yml
@@ -42,12 +42,29 @@
proxy_settings_no_proxy: "{{ lookup('env','no_proxy') }}"
tasks:
+ - name: Create list of files to copy
+ shell: |
+ git ls-tree -r --name-only HEAD > {{ xci_cache }}/releng-xci.files
+ echo ".git/" >> {{ xci_cache }}/releng-xci.files
+ echo ".cache/repos/" >> {{ xci_cache }}/releng-xci.files
+ echo ".cache/xci.env" >> {{ xci_cache }}/releng-xci.files
+ args:
+ executable: /bin/bash
+ chdir: "{{ xci_path }}"
+ changed_when: False
+ delegate_to: 127.0.0.1
+ tags:
+ - skip_ansible_lint
+
- name: Copy releng-xci to remote host
synchronize:
+ archive: yes
src: "{{ xci_path }}/"
dest: "{{ remote_xci_path }}"
- recursive: yes
delete: yes
+ rsync_opts:
+ - "--recursive"
+ - "--files-from={{ xci_cache }}/releng-xci.files"
- name: Re-create OpenStack-Ansible /etc directory
file: