Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORE-363 Support specification of default_scheduler_config #30

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ nomad_client_host_networks: []
nomad_client_max_kill_timeout: 5m
nomad_docker_auth_enabled: false
nomad_docker_auth_file: /root/.docker/config.json

nomad_batch_scheduler_enabled: true
nomad_scheduler_enabled: true
nomad_service_scheduler_enabled: true
nomad_sysbatch_scheduler_enabled: true
28 changes: 28 additions & 0 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,34 @@
- nomad_client is boolean
quiet: true

- name: assert | Test if nomad_sysbatch_scheduler_enabled is set correctly
ansible.builtin.assert:
that:
- nomad_sysbatch_scheduler_enabled is defined
- nomad_sysbatch_scheduler_enabled is boolean
quiet: true

- name: assert | Test if nomad_service_scheduler_enabled is set correctly
ansible.builtin.assert:
that:
- nomad_service_scheduler_enabled is defined
- nomad_service_scheduler_enabled is boolean
quiet: true

- name: assert | Test if nomad_scheduler_enabled is set correctly
ansible.builtin.assert:
that:
- nomad_scheduler_enabled is defined
- nomad_scheduler_enabled is boolean
quiet: true

- name: assert | Test if nomad_batch_scheduler_enabled is set correctly
ansible.builtin.assert:
that:
- nomad_batch_scheduler_enabled is defined
- nomad_batch_scheduler_enabled is boolean
quiet: true

- name: assert | Test if nomad_client_node_class is set correctly
ansible.builtin.assert:
that:
Expand Down
9 changes: 9 additions & 0 deletions templates/server.hcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@
server {
enabled = true
bootstrap_expect = {{ nomad_server_bootstrap_expect }}

default_scheduler_config {
preemption_config {
batch_scheduler_enabled = {{ nomad_batch_scheduler_enabled }}
system_scheduler_enabled = {{ nomad_scheduler_enabled }}
service_scheduler_enabled = {{ nomad_service_scheduler_enabled }}
sysbatch_scheduler_enabled = {{ nomad_sysbatch_scheduler_enabled }}
}
}
}