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 state: started
name: nomad name: nomad
- name: Bootstrap Nomad ACLs
hosts: nomad_instances
tasks:
- name: Nomad API reachable? - name: Nomad API reachable?
uri: uri:
url: "http://127.0.0.1:4646/v1/status/leader" url: "http://127.0.0.1:4646/v1/status/leader"
@ -376,6 +372,11 @@
changed_when: false changed_when: false
run_once: true run_once: true
- name: Bootstrap Nomad ACLs and scheduler
hosts: nomad_instances
tasks:
- name: Bootstrap ACLs - name: Bootstrap ACLs
command: command:
argv: argv:
@ -408,6 +409,20 @@
changed_when: false changed_when: false
register: read_secretid 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 - name: Look for policy
command: command:
argv: argv: