xci: get-opnfv-scenario-requirements: Use checksum for rsync updates 95/54495/1
authorMarkos Chandras <mchandras@suse.de>
Mon, 26 Mar 2018 20:27:15 +0000 (21:27 +0100)
committerMarkos Chandras <mchandras@suse.de>
Mon, 26 Mar 2018 20:38:38 +0000 (21:38 +0100)
Rsync will update modification times on transferred files so Ansible
marks the task as 'changed' all the time even though the source and
destination files are the same. This is confusing for XCI developers
because they may think that there are local changes to the scenarios
which is not always the case. As such, compare the 'checksums' of the
actual files to determine if there are any changes that need to be
copied over. This requires us to turn off the 'archive' option and
use the individual options directly.

This fixes the following problem where in a typical XCI job, all
inbound scenarios appear to have changes which is not true.

Mar 26 15:10:24 TASK [Synchronize local changes to scenarios' master branch] *******************
Mar 26 15:10:24 ok: [localhost] => (item=os-odl-sfc)
Mar 26 15:10:25 changed: [localhost] => (item=os-nosdn-nofeature)
Mar 26 15:10:25 changed: [localhost] => (item=os-odl-nofeature)
Mar 26 15:10:25 changed: [localhost] => (item=k8-nosdn-nofeature)
Mar 26 15:10:26 ok: [localhost] => (item=os-odl-bgpvpn)

Change-Id: I14f446c341a675b286e971f0b5c0be14d04abb9d
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/playbooks/get-opnfv-scenario-requirements.yml

index 3c29138..e99c47b 100644 (file)
       synchronize:
         src: "{{ xci_path }}/xci/scenarios/{{ item.item.scenario }}/{{ item.item.role | replace('xci/scenarios/' ~ item.item.scenario ~ '/', '') }}/"
         dest: "{{ role_path_default }}/{{ item.item.role | basename }}"
+        archive: no
+        times: no
+        recurse: yes
+        checksum: yes
+        owner: yes
+        group: yes
+        perms: yes
+        links: yes
       failed_when: false
       when:
         - item.stat.exists