From ed993a6fec64934283984c08bd4e99e8d9298d9c Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Fri, 31 Aug 2018 13:33:40 +0100 Subject: 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 --- .../kubespray/playbooks/configure-opnfvhost.yml | 19 ++++++++++++++++++- xci/installer/osa/playbooks/configure-opnfvhost.yml | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) (limited to 'xci/installer') 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: -- cgit 1.2.3-korg