Skip to content
Snippets Groups Projects
installSlurmFromSource.yml 1.67 KiB
Newer Older
- name: remove all install
  shell: rm -rf /tmp/slurm-{{ slurm_version }}
  sudo: true 
  when: force_slurm_recompile is defined

- name: remove all install
  shell: rm -rf {{ slurm_dir }}
  sudo: true 
  when: force_slurm_recompile is defined

    src: "http://consistency0/src/slurm-{{ slurm_version }}.tar.bz2"
    copy: no
    dest: /tmp
    creates: "{{ slurm_dir }}/bin/srun"

- name: stat srun
  stat: path="{{ slurm_dir }}/bin/srun"
  register: stat_srun


- name: configure slurm
  command: /tmp/slurm-{{ slurm_version }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam 
  args:
    creates: "{{ slurm_dir }}/bin/srun"
    chdir: /tmp/slurm-{{ slurm_version }}
  when: force_slurm_recompile is defined or not stat_srun.stat.exists
  command: make
    creates: "{{ slurm_dir }}/bin/srun"
  when: force_slurm_recompile is defined or not stat_srun.stat.exists

- name: install slurm
  shell: make install
  sudo: true
  args:
    chdir: /tmp/slurm-{{ slurm_version }}
Jupiter Hu's avatar
Jupiter Hu committed
    creates: "{{ slurm_dir }}/bin/srun"
  when: force_slurm_recompile is defined or not stat_srun.stat.exists

- name: build pam_slurm
  command: make
  args:
    chdir: /tmp/slurm-{{ slurm_version }}/contribs/pam
  when: force_slurm_recompile is defined or not stat_srun.stat.exists

- name: install pam_slurm
  shell: make install
  sudo: true
  args:
    chdir: /tmp/slurm-{{ slurm_version }}/contribs/pam
  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