Enable preemption on nomad scheduler
This commit is contained in:
parent
9d739eef7e
commit
a80927e5b0
@ -360,10 +360,6 @@
|
||||
state: started
|
||||
name: nomad
|
||||
|
||||
- name: Bootstrap Nomad ACLs
|
||||
hosts: nomad_instances
|
||||
|
||||
tasks:
|
||||
- name: Nomad API reachable?
|
||||
uri:
|
||||
url: "http://127.0.0.1:4646/v1/status/leader"
|
||||
@ -376,6 +372,11 @@
|
||||
changed_when: false
|
||||
run_once: true
|
||||
|
||||
|
||||
- name: Bootstrap Nomad ACLs and scheduler
|
||||
hosts: nomad_instances
|
||||
|
||||
tasks:
|
||||
- name: Bootstrap ACLs
|
||||
command:
|
||||
argv:
|
||||
@ -408,6 +409,20 @@
|
||||
changed_when: false
|
||||
register: read_secretid
|
||||
|
||||
- name: Enable service scheduler preemption
|
||||
command:
|
||||
argv:
|
||||
- nomad
|
||||
- operator
|
||||
- scheduler
|
||||
- set-config
|
||||
- -preempt-system-scheduler=true
|
||||
- -preempt-service-scheduler=true
|
||||
environment:
|
||||
NOMAD_TOKEN: "{{ read_secretid.stdout }}"
|
||||
delegate_to: "{{ play_hosts[0] }}"
|
||||
run_once: true
|
||||
|
||||
- name: Look for policy
|
||||
command:
|
||||
argv:
|
||||
|
Loading…
Reference in New Issue
Block a user