diff --git a/ansible/roles/cheaha.node/tasks/main.yml b/ansible/roles/cheaha.node/tasks/main.yml index a2a48ddabf393600e0b09c3e3d35e5a33ccc41cf..4c36a5532bdbb4ee84164f03a846d5a7c89efb0d 100644 --- a/ansible/roles/cheaha.node/tasks/main.yml +++ b/ansible/roles/cheaha.node/tasks/main.yml @@ -64,6 +64,16 @@ - group - netgroup - automount +- name: Create base directories + ansible.builtin.file: + path: "{{ item.dir }}" + state: directory + mode: "{{ item.mode }}" + loop: + - { dir: /local, mode: '0777' } + - { dir: /scratch, mode: '0755' } + - { dir: /share, mode: '0755' } + - { dir: /data/rc/apps, mode: '0755' } # this is only required for the symlink to be happy - name: Set up NFS GPFS mount point(s) ansible.posix.mount: path: "{{ item.path }}" @@ -77,6 +87,17 @@ - { path: /data/project, src: "gpfs.rc.uab.edu:/data/project", fstype: nfs, opts: _netdev,defaults } - { path: /data/user, src: "gpfs.rc.uab.edu:/data/user", fstype: nfs, opts: _netdev,defaults } - { path: /data/rc/apps, src: "gpfs.rc.uab.edu:/data/rc/apps", fstype: nfs, opts: _netdev,defaults } +- name: Create symbolic links + ansible.builtin.file: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + owner: root + group: root + force: yes + state: link + loop: + - { src: /local, dest: /scratch/local } + - { src: /data/rc/apps, dest: /share/apps } - name: Add ssh key for root access ansible.posix.authorized_key: user: root @@ -115,24 +136,3 @@ - munge - slurmd - nslcd -- name: Create base directories - ansible.builtin.file: - path: "{{ item.dir }}" - state: directory - mode: "{{ item.mode }}" - loop: - - { dir: /local, mode: '0777' } - - { dir: /scratch, mode: '0755' } - - { dir: /share, mode: '0755' } - - { dir: /data/rc/apps, mode: '0755' } # this is only required for the symlink to be happy -- name: Create symbolic links - ansible.builtin.file: - src: "{{ item.src }}" - dest: "{{ item.dest }}" - owner: root - group: root - force: yes - state: link - loop: - - { src: /local, dest: /scratch/local } - - { src: /share/apps, dest: /data/rc/apps }