diff --git a/roles/slurm-common/tasks/installSlurmFromSource.yml b/roles/slurm-common/tasks/installSlurmFromSource.yml
index 8785c3692b1d6e26e6b6a0caed85f92942e185c1..c1c7794f6d26dc78413edf578e0007a83d2ae116 100644
--- a/roles/slurm-common/tasks/installSlurmFromSource.yml
+++ b/roles/slurm-common/tasks/installSlurmFromSource.yml
@@ -24,7 +24,7 @@
   register: stat_pam_slurm_adopt
 
 - name: configure slurm
-  command: /tmp/slurm-{{ slurm_version }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam 
+  command: /tmp/slurm-{{ slurm_version }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix=/usr/local/pmix/latest
   args:
     creates: "{{ slurm_dir }}/bin/srun"
     chdir: /tmp/slurm-{{ slurm_version }}
@@ -58,6 +58,19 @@
     chdir: /tmp/slurm-{{ slurm_version }}/contribs/pmi
   when: force_slurm_recompile is defined or not stat_srun.stat.exists
 
+- name: build pmi2
+  command: make
+  args:
+    chdir: /tmp/slurm-{{ slurm_version }}/contribs/pmi2
+  when: force_slurm_recompile is defined or not stat_srun.stat.exists
+
+- name: install pmi2
+  shell: make install
+  sudo: true
+  args:
+    chdir: /tmp/slurm-{{ slurm_version }}/contribs/pmi2
+  when: force_slurm_recompile is defined or not stat_srun.stat.exists
+
 - name: build pam_slurm
   command: make
   args:
@@ -83,6 +96,16 @@
   when: force_slurm_recompile is defined or not stat_pam_slurm_adopt.stat.exists
   sudo: true
 
+- name: remove exist-slurm-latest-link
+  shell: rm -f  /opt/slurm-latest
+  sudo: true
+  when: force_slurm_recompile is defined or not stat_srun.stat.exists
+
+- name: put slurm-latest-link
+  shell: ln -s  {{ slurm_dir }}  /opt/slurm-latest
+  sudo: true
+  when: force_slurm_recompile is defined or not stat_srun.stat.exists
+
 - name: add slurm log rotate config
   template: src=slurmlog.j2 dest=/etc/logrotate.d/slurm mode=644
   sudo: true