Skip to content

Commit

Permalink
buildbot: Configuration systemd pour redémarrage automatique
Browse files Browse the repository at this point in the history
  • Loading branch information
jocelynj committed Jul 8, 2024
1 parent 1374a83 commit aa7e730
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/buildbot-slave/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
- name: systemd daemon-reload
systemd:
daemon_reload: yes

- name: restart buildslave
service: name=buildslave state=restarted

Expand Down
14 changes: 14 additions & 0 deletions roles/buildbot-slave/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@
- {regexp: "WorkingDirectory=", line: "WorkingDirectory=/data/work/buildbot-slave"}
notify: restart buildbot-worker

- name: create systemd override for buildbot-worker
file:
path: /etc/systemd/system/[email protected]/
state: directory

- name: add systemd override for postgresql
template:
dest: "/etc/systemd/system/[email protected]/override.conf"
src: "systemd-buildbot-worker-override.conf"
owner: root
notify:
- systemd daemon-reload
- restart buildbot-worker

- name: enable systemd service
systemd:
name: "{{ item }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# {{ ansible_managed }}
[Service]
Restart=always
RestartSec=30s

0 comments on commit aa7e730

Please sign in to comment.