Skip to content

Commit 6182a5b

Browse files
ahjohannessenbbaassssiiee
authored andcommitted
distro: add support for Flatcar Linux
- make systemd unit path / template configurable. - add `Flatcar` to `os_supported_matrix`. - add Flatcar.yml to vars folder with appropriate distro settings.
1 parent a1853f1 commit 6182a5b

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

defaults/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
os_supported_matrix:
66
Archlinux:
77
min_version: ''
8+
Flatcar:
9+
min_version: ''
810
# RHEL-based
911
RedHat:
1012
min_version: '6'
@@ -57,6 +59,10 @@ nomad_plugin_dir: "{{ nomad_data_dir }}/plugins"
5759
nomad_lockfile: "/var/lock/subsys/nomad"
5860
nomad_run_dir: "/var/run/nomad"
5961

62+
### Initialization and startup script templates
63+
nomad_systemd_template: nomad_systemd.service.j2
64+
nomad_systemd_unit_path: /lib/systemd/system
65+
6066
### System user and group
6167
nomad_manage_user: true
6268
nomad_user: "root"

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@
182182
- block:
183183
- name: systemd script
184184
template:
185-
src: nomad_systemd.service.j2
186-
dest: /lib/systemd/system/nomad.service
185+
src: "{{ nomad_systemd_template }}"
186+
dest: "{{ nomad_systemd_unit_path }}/nomad.service"
187187
owner: root
188188
group: root
189189
mode: 0644

vars/Flatcar.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
# File: Flatcar.yml - Flatcar variables for Nomad
3+
4+
nomad_os_packages: []
5+
6+
nomad_systemd_unit_path: /etc/systemd/system

0 commit comments

Comments
 (0)