summaryrefslogtreecommitdiffstats
path: root/ansible/roles/resource-data/tasks/unarchive-ssh-resource.yml
diff options
context:
space:
mode:
authorMilan Verespej <m.verespej@partner.samsung.com>2019-03-01 14:49:25 +0100
committerMichal Ptacek <m.ptacek@partner.samsung.com>2019-03-07 08:03:48 +0000
commitad41e6df9debcf5f8706eb362783bb565397a8d3 (patch)
tree542cf90c9a759e77e7f46014cde6c090f3bd333d /ansible/roles/resource-data/tasks/unarchive-ssh-resource.yml
parent29886f09d53bee1ecdc1bc8612e8edb4a130a270 (diff)
Fix wrong detection of uploaded resources
Issue-ID: OOM-1596 Change-Id: I091cd558f7574f49dddf4380df24e11141a4b78d Signed-off-by: Milan Verespej <m.verespej@partner.samsung.com>
Diffstat (limited to 'ansible/roles/resource-data/tasks/unarchive-ssh-resource.yml')
-rw-r--r--ansible/roles/resource-data/tasks/unarchive-ssh-resource.yml12
1 files changed, 3 insertions, 9 deletions
diff --git a/ansible/roles/resource-data/tasks/unarchive-ssh-resource.yml b/ansible/roles/resource-data/tasks/unarchive-ssh-resource.yml
index 4b1b7d75..1385ba55 100644
--- a/ansible/roles/resource-data/tasks/unarchive-ssh-resource.yml
+++ b/ansible/roles/resource-data/tasks/unarchive-ssh-resource.yml
@@ -16,16 +16,14 @@
mode: 0600
owner: root
group: root
- remote_src: no
- name: Detect if archive is compressed
shell: >
- ssh -o StrictHostKeyChecking=no
- -i /root/.ssh/infra_to_resource.privkey
- {{ resources_source_host }}
- 'file "{{ resources_dir }}/{{ resource_source_filename }}"'
+ file "{{ resources_dir }}/{{ resource_source_filename }}"
| grep "compressed"
register: compressed
+ failed_when: compressed.rc > 1
+ delegate_to: "{{ resources_source_host }}"
- name: Set tar extract options
set_fact:
@@ -40,10 +38,6 @@
| tar -C "{{ resource_destination_directory }}" "{{ tar_extract_options }}" -
args:
warn: false
- rescue:
- - name: Upload failed
- set_fact:
- upload_failed: true
always:
- name: Remove the ssh private key
file: