Enable preemption on nomad scheduler

This commit is contained in:
IamTheFij 2022-09-16 16:45:26 -07:00
parent 845ea4d391
commit ff49e039da

View File

@ -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: