Samuli Silvius | 29886f0 | 2019-02-19 16:00:37 +0200 | [diff] [blame] | 1 | --- |
| 2 | - name: Query package facts to check nfs-utils existence |
| 3 | package_facts: |
| 4 | manager: auto |
| 5 | |
| 6 | - name: Set transport fact to nfs or ssh |
| 7 | set_fact: |
| 8 | transport: "{{ 'nfs' if resources_on_nfs and 'nfs-utils' in ansible_facts.packages else 'ssh' }}" |
| 9 | |
| 10 | - name: "Upload resources to infrastructure servers over {{ transport }}" |
| 11 | include_tasks: unarchive-resource.yml |
| 12 | vars: |
| 13 | resource_source_filename: "{{ item.file }}" |
| 14 | resource_destination_directory: "{{ item.destination_dir }}" |
| 15 | loop: "{{ resources_list_of_dicts }}" |