Skip to content

Commit

Permalink
Add runtime directory for caddy where admin socket can be stored
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmoguy committed Dec 23, 2024
1 parent f6102c2 commit 51d8c4b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
- name: systemd daemon-reload

Check failure on line 2 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.systemd:
daemon_reload: true

- name: restart caddy

Check failure on line 6 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

name[casing]

All names should start with an uppercase letter.
listen: systemd daemon-reload
ansible.builtin.service:
name: caddy
state: restarted
Expand Down
17 changes: 17 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,20 @@
name: "{{ caddy_apt_packages }}"
install_recommends: false
state: present

- name: Add caddy service overrides directory
ansible.builtin.file:
path: /etc/systemd/system/caddy.service.d
state: directory
owner: root
group: root
mode: u=rwx,g=rx,o=rx

- name: Add caddy service overrides
ansible.builtin.template:
src: service-overrides.conf
dest: /etc/systemd/system/caddy.service.d/service-overrides.conf
owner: root
group: root
mode: u=rw,g=r,o=r
notify: systemd daemon-reload
4 changes: 4 additions & 0 deletions templates/service-overrides.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# {{ ansible_managed }}

[Service]
RuntimeDirectory=caddy

0 comments on commit 51d8c4b

Please sign in to comment.