Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runtime directory for caddy where admin socket can be stored #4

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
---
- 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

- name: reload caddy

Check failure on line 12 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.service:
name: caddy
state: reloaded
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
Loading