--- # tasks file for netcdf - name: Make sure source dir exists file: args: path: "{{ builddir }}/src" state: directory - name: Download HDF5 get_url: args: url: http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-{{ hdf5_version }}.tar.bz2 dest: "{{ builddir }}/src/hdf5-{{ hdf5_version }}.tar.bz2" - name: Untar hdf5 command: tar -xjf hdf5-{{ hdf5_version }}.tar.bz2 args: chdir: "{{ builddir }}/src" - name: make build scripts template: args: src: build.sh dest: "{{ builddir }}/src/hdf5-{{ hdf5_version }}/build_{{ item.compiler }}-{{ item.version }}.sh" with_items: compilers - name: make env scripts template: args: src: env.sh dest: "{{ builddir }}/src/hdf5-{{ hdf5_version }}/env_{{ item.compiler }}-{{ item.version }}.sh" with_items: compilers - name: Make executable file: path: "{{ builddir }}/src/hdf5-{{ hdf5_version }}/build_{{ item.compiler }}-{{ item.version }}.sh" mode: 0755 with_items: compilers - name: Build hdf5 command: ./build_{{ item.compiler }}-{{ item.version }}.sh args: chdir: "{{ builddir }}/src/hdf5-{{ hdf5_version }}" with_items: compilers - name: Build module shell: /usr/share/Modules/bin/createmodule.py ./env_{{ item.compiler }}-{{ item.version }}.sh > /opt/modules/hdf5/{{ hdf5_path }} args: chdir: "{{ builddir }}/src/hdf5-{{ hdf5_version }}" with_items: compilers