|
@@ -29,7 +29,7 @@
|
|
|
mode: "{{ tmp_mode }}"
|
|
|
state: touch
|
|
|
|
|
|
-- name: Create slurmctld log file on master
|
|
|
+- name: Create slurmctld log file on manager
|
|
|
file:
|
|
|
path: "{{ slurm_logpth }}"
|
|
|
owner: slurm
|
|
@@ -38,14 +38,14 @@
|
|
|
with_items:
|
|
|
- slurmctld.log
|
|
|
|
|
|
-- name: Create log files on master
|
|
|
+- name: Create log files on manager
|
|
|
file:
|
|
|
path: "{{ slurm_logpth }}"
|
|
|
owner: slurm
|
|
|
mode: "{{ tmp_mode }}"
|
|
|
state: touch
|
|
|
with_items:
|
|
|
- - "{{ log_files_master }}"
|
|
|
+ - "{{ log_files_manager }}"
|
|
|
|
|
|
- name: Install packages for slurm
|
|
|
package:
|
|
@@ -86,7 +86,7 @@
|
|
|
warn: no
|
|
|
|
|
|
- name: Verify package md5
|
|
|
- command: rpm -qa
|
|
|
+ shell: rpm -qa | grep slurm
|
|
|
ignore_errors: true
|
|
|
register: verify_result
|
|
|
changed_when: no
|
|
@@ -100,9 +100,10 @@
|
|
|
chdir: "{{ rpm_path }}"
|
|
|
warn: no
|
|
|
changed_when: true
|
|
|
+ when: verify_result.rc != 0
|
|
|
|
|
|
- name: Get the hostname
|
|
|
- command: hostname -s
|
|
|
+ command: hostname
|
|
|
register: machine_name
|
|
|
changed_when: true
|
|
|
|
|
@@ -147,13 +148,13 @@
|
|
|
when: "'manager' in group_names"
|
|
|
tags: firewalld
|
|
|
|
|
|
-- name: Get network address/subnet mask through ipaddr
|
|
|
+- name: Get network address/subnet mask
|
|
|
set_fact:
|
|
|
network_address: "{{ (ansible_default_ipv4.network + '/' + ansible_default_ipv4.netmask) | ipaddr('network/prefix') }}"
|
|
|
|
|
|
- name: Firewall rule slurm - allow all incoming traffic on internal network
|
|
|
firewalld:
|
|
|
- zone: internal
|
|
|
+ zone: public
|
|
|
rich_rule: 'rule family="{{ family }}" source address="{{ network_address }}" accept'
|
|
|
permanent: true
|
|
|
state: enabled
|
|
@@ -172,7 +173,10 @@
|
|
|
tags: install
|
|
|
|
|
|
- name: Grant permissions for slurm db
|
|
|
- command: mysql -u root -e "GRANT ALL ON slurm_acct_db.* TO '{{ db_user }}'@'{{ db_host }}' identified by '{{ db_password[0] }}'with grant option;"
|
|
|
+ command: >-
|
|
|
+ mysql -u root -e "GRANT ALL ON slurm_acct_db.* TO '{{ db_user }}'@'{{
|
|
|
+ db_host }}' identified by '{{ hostvars['127.0.0.1']['db_password'] }}'with
|
|
|
+ grant option;"
|
|
|
tags: install
|
|
|
changed_when: true
|
|
|
|
|
@@ -206,7 +210,7 @@
|
|
|
lineinfile:
|
|
|
path: "{{ slurmdbd_path }}"
|
|
|
regexp: "StoragePass="
|
|
|
- line: "StoragePass={{ db_password[0] }}"
|
|
|
+ line: "StoragePass={{ hostvars['127.0.0.1']['db_password'] }}"
|
|
|
|
|
|
- name: Add storage user
|
|
|
lineinfile:
|
|
@@ -230,4 +234,4 @@
|
|
|
fetch:
|
|
|
src: "{{ slurm_confpth }}"
|
|
|
dest: "{{ buffer_path }}"
|
|
|
- flat: true
|
|
|
+ flat: true
|