blob: 9f9d92d05101e62bc7422be047c7603b11f26602 [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
19 - name: "Unarchive resource {{ resources_dir }}/{{ resource_source_filename }} to {{ resource_destination_directory }} dir on infrastructure servers over nfs"
20 unarchive:
21 src: "/tmp/resource_data/{{ resource_source_filename }}"
22 dest: "{{ resource_destination_directory }}"
23 remote_src: yes
Samuli Silvius29886f02019-02-19 16:00:37 +020024 always:
25 - name: Unmount resource dir
26 mount:
27 path: /tmp/resource_data
28 src: "{{ resources_source_host }}:{{ resources_dir }}"
29 fstype: nfs
30 state: absent