Skip to content

Commit cf33337

Browse files
committed
CHANGELOG++
2 parents 4aa2749 + ad1d753 commit cf33337

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## v1.9.2
22

33
- Nomad v0.10.1
4+
- Production hardening of systemd unit (thanks @bdossantos)
45
- Update documentation
56

67
## v1.9.1

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ Thank you to all these fine folk for helping with ansible-nomad!
2121
- [@pxsloot](https://github.com/pxsloot)
2222
- [@rbjorklin](https://github.com/rbjorklin)
2323
- [@camskkz](https://github.com/camskkz)
24+
- [@bdossantos](https://github.com/bdossantos)

tasks/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,21 @@
119119
mode: 0755
120120
when: not ansible_service_mgr == "systemd" and ansible_os_family == "Debian"
121121

122+
- name: extract systemd version
123+
shell: |
124+
set -o pipefail
125+
systemctl --version systemd | head -n 1 | cut -d' ' -f2
126+
args:
127+
executable: /bin/bash
128+
changed_when: false
129+
check_mode: false
130+
register: systemd_version
131+
when:
132+
- ansible_service_mgr == "systemd"
133+
- not ansible_os_family == "FreeBSD"
134+
- not ansible_os_family == "Solaris"
135+
tags: skip_ansible_lint
136+
122137
- name: systemd script
123138
template:
124139
src: nomad_systemd.service.j2

templates/nomad_systemd.service.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
[Unit]
1212
Description=nomad agent
13+
Documentation=https://nomadproject.io/docs/
1314
Wants=basic.target
1415
After=basic.target network.target
1516

@@ -20,8 +21,16 @@ ExecStart={{ nomad_bin_dir }}/nomad agent -config={{ nomad_config_dir }}
2021

2122
ExecReload=/bin/kill -HUP $MAINPID
2223
KillMode=process
24+
KillSignal=SIGINT
25+
LimitNOFILE=infinity
26+
LimitNPROC=infinity
2327
Restart=on-failure
2428
RestartSec=42s
29+
StartLimitBurst=3
30+
StartLimitIntervalSec=10
31+
{% if systemd_version.stdout is version('226', '>=') %}
32+
TasksMax=infinity
33+
{% endif %}
2534

2635
[Install]
2736
WantedBy=multi-user.target

0 commit comments

Comments
 (0)