--- # tasks file for netcdf - name: Download fortran sources git: repo=https://github.com/Unidata/netcdf-fortran args: version: "{{ netcdf_fortran_version }}" dest: "{{ builddir }}/src/netcdf-fortran" - name: Download c sources git: repo=https://github.com/Unidata/netcdf-c args: version: "{{ netcdf_c_version }}" dest: "{{ builddir }}/src/netcdf-c" - name: make build scripts template: args: src: build-c.sh dest: "{{ builddir }}/src/netcdf-c/build_{{ item.compiler }}-{{ item.version }}.sh" with_items: compilers - name: make env scripts template: args: src: env.sh dest: "{{ builddir }}/src/netcdf-c/env_{{ item.compiler }}-{{ item.version }}.sh" with_items: compilers - name: Make executable file: path: "{{ builddir }}/src/netcdf-c/build_{{ item.compiler }}-{{ item.version }}.sh" mode: 0755 with_items: compilers - name: Build netcdf-c command: ./build_{{ item.compiler }}-{{ item.version }}.sh args: chdir: "{{ builddir }}/src/netcdf-c" with_items: compilers - name: Build module shell: /usr/share/Modules/bin/createmodule.py ./env_{{ item.compiler }}-{{ item.version }}.sh > /opt/modules/netcdf/{{ netcdf_path }} args: chdir: "{{ builddir }}/src/netcdf-c" with_items: compilers - name: make build scripts template: args: src: build-fortran.sh dest: "{{ builddir }}/src/netcdf-fortran/build_{{ item.compiler }}-{{ item.version }}.sh" with_items: compilers - name: Make executable file: path: "{{ builddir }}/src/netcdf-fortran/build_{{ item.compiler }}-{{ item.version }}.sh" mode: 0755 with_items: compilers - name: Build netcdf-fortran command: ./build_{{ item.compiler }}-{{ item.version }}.sh args: chdir: "{{ builddir }}/src/netcdf-fortran" with_items: compilers