Skip to content
Snippets Groups Projects
Commit 4f71e137 authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

trying different syntax

Former-commit-id: 7a34a2a8
parent 2cf152c0
No related branches found
No related tags found
No related merge requests found
...@@ -66,11 +66,22 @@ ...@@ -66,11 +66,22 @@
when: start_slurmdbd is defined when: start_slurmdbd is defined
- name: "create cluster in slurm db" #- name: "create cluster in slurm db"
shell: # shell:
cmd: ./sacctmgr show assoc format=Cluster -Pn | grep -q {{ clustername }} && ./sacctmgr -i create cluster {{ clustername }} # cmd: ./sacctmgr show assoc format=Cluster -Pn | grep -q {{ clustername }} && ./sacctmgr -i create cluster {{ clustername }}
chdir: "{{ slurm_dir }}/bin/" # chdir: "{{ slurm_dir }}/bin/"
# become: true
- name: "see if cluster exists"
command: "{{ slurm_dir }}/bin/sacctmgr show assoc format=Cluster -Pn"
always_run: yes
become: true become: true
register: sacctmgr_clusterlist
- name: "create cluster in slurm db"
command: "{{ slurm_dir }}/bin/acctmgr -i create cluster {{ clustername }}"
become: true
when: sacctmgr_clusterlist.stdout.find({{ clustername }})==-1
- name: start slurmctl - name: start slurmctl
service: name=slurmctld state=restarted enabled=no service: name=slurmctld state=restarted enabled=no
......
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