File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1010
1111[Unit]
1212Description=nomad agent
13+ Documentation=https://nomadproject.io/docs/
1314Wants=basic.target
1415After=basic.target network.target
1516
@@ -20,8 +21,16 @@ ExecStart={{ nomad_bin_dir }}/nomad agent -config={{ nomad_config_dir }}
2021
2122ExecReload=/bin/kill -HUP $MAINPID
2223KillMode=process
24+ KillSignal=SIGINT
25+ LimitNOFILE=infinity
26+ LimitNPROC=infinity
2327Restart=on-failure
2428RestartSec=42s
29+ StartLimitBurst=3
30+ StartLimitIntervalSec=10
31+ {% if systemd_version .stdout is version ('226' , '>=' ) %}
32+ TasksMax=infinity
33+ {% endif %}
2534
2635[Install]
2736WantedBy=multi-user.target
You can’t perform that action at this time.
0 commit comments