Skip to content
Snippets Groups Projects
Commit afec640c authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Merge branch 'fix-misconfgured-symlink-ansible' into 'main'

Create dirs before mounting NFS share on them.

See merge request rc/packer-openstack-hpc-image!2
parents b7e9ac67 c6d769ac
No related branches found
No related tags found
No related merge requests found
......@@ -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 }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment