Skip to content
Snippets Groups Projects
Commit ade8f30f authored by Chris Hines's avatar Chris Hines
Browse files

only install munge if it isn't already installed

Former-commit-id: 554bf7f7
parent 4268beb4
No related branches found
No related tags found
No related merge requests found
- name: test if munge is already isntalled
stat: path="{{ munge_dir }}/bin/munge"
register: munge_binary
- name: unarchive munge
unarchive:
......@@ -6,6 +9,7 @@
copy: no
dest: /tmp
creates: /tmp/munge-{{ munge_version }}/configure
when: not munge_binary.stat.exists
- name: build munge
......@@ -13,6 +17,7 @@
args:
chdir: /tmp/munge-{{ munge_version }}
creates: /tmp/munge-{{ munge_version }}/src/munge/munge
when: not munge_binary.stat.exists
- name: install munge
shell: make install
......@@ -20,15 +25,17 @@
args:
chdir: /tmp/munge-{{ munge_version }}
creates: "{{ munge_dir }}/bin/munge"
when: not munge_binary.stat.exists
- name: set use_systemd
set_fact:
use_systemd: True
when: (ansible_distribution == "CentOS" or ansible_distribution == "RedHat") and ( ansible_distribution_major_version == "7")
when: (ansible_distribution == "CentOS" or ansible_distribution == "RedHat") and ( ansible_distribution_major_version == "7") and not munge_binary.stat.exists
- name: copy init script
template: dest=/etc/init.d/munge src=munge.initd.j2 mode=755
sudo: true
register: systemd_script_installed
when: use_systemd is not defined
- name: copy slurm init script if OS contains systemd
......@@ -39,4 +46,4 @@
- name: reload systemd
shell: systemctl daemon-reload
sudo: true
when: use_systemd is defined
when: use_systemd is defined and systemd_script_installed|changed
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