| - name: Check for presence of auxiliary resources tar file |
| - name: Store auxiliary resources tar file info into variable |
| path: "{{ hostvars[groups.resources.0].resources_dir }}/{{ hostvars[groups.resources.0].aux_resources_filename }}" |
| register: aux_file_presence |
| - name: Check infrastructure server for presence of resources and requirements |
| - name: Check if nfs-utils is installed |
| register: nfs_utils_check |
| - name: Check if the resources are already unpacked |
| path: "{{ app_data_path }}" |
| register: resources_data_check |
| - name: Check if the auxilliary resources are already unpacked |
| path: "{{ aux_data_path }}" |
| register: aux_resources_data_check |
| when: aux_data_path is defined and aux_data_path is not none |
| - name: Ensure the existence of data directory/ies on infrastructure server |
| - name: Create data directory |
| path: "{{ app_data_path }}" |
| - name: Create auxiliary data directory |
| path: "{{ aux_data_path }}" |
| when: aux_data_path is defined and aux_data_path is not none |
| - name: Upload resources to infrastructure server |
| # use nfs or ssh and unpack resources into data directory/ies |
| transport: "{{ 'nfs' if resources_on_nfs and (nfs_utils_check.results|selectattr('yumstate', 'match', 'installed')|list|length != 0) else 'ssh' }}" |