blob: bbf99321f8bfba2802ef2cd26e4983d112b45fbc [file] [log] [blame]
Samuli Silvius29886f02019-02-19 16:00:37 +02001---
2#
3# Expected variables
4# resources_source_host
5# resources_dir
6# resource_source_filename
7# resource_destination_directory
8# Output is upload_failed true/false
9#
10- name: "Upload resource {{ resources_dir }}/{{ resource_source_filename }} to infrastructure servers over nfs"
11 block:
12 - name: Mount resource dir
13 mount:
14 path: /tmp/resource_data
15 src: "{{ resources_source_host }}:{{ resources_dir }}"
16 fstype: nfs
17 state: mounted
18
Michal Ptacek200ae722019-03-21 12:32:20 +000019 - name: "Unarchive resource {{ resources_dir }}/{{ resource_source_filename }} \
20 to {{ resource_destination_directory }} dir on infrastructure servers over nfs"
Samuli Silvius29886f02019-02-19 16:00:37 +020021 unarchive:
22 src: "/tmp/resource_data/{{ resource_source_filename }}"
23 dest: "{{ resource_destination_directory }}"
24 remote_src: yes
Samuli Silvius29886f02019-02-19 16:00:37 +020025 always:
26 - name: Unmount resource dir
27 mount:
28 path: /tmp/resource_data
29 src: "{{ resources_source_host }}:{{ resources_dir }}"
30 fstype: nfs
31 state: absent