Skip to content

Commit 6a97baa

Browse files
committed
Add webhook to Ansible config
1 parent 98c2578 commit 6a97baa

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

matplotlib.org.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,38 @@
9898
enabled: true
9999
state: started
100100

101+
# Webhook setup
102+
# #############
103+
- name: Install webhook
104+
ansible.builtin.copy:
105+
src: "{{playbook_dir}}/webhook/webhook.py"
106+
dest: /usr/bin/webhook.py
107+
mode: 0755
108+
notify: Restart webhook
109+
110+
- name: Configure webhook system service
111+
ansible.builtin.copy:
112+
src: "{{playbook_dir}}/webhook/webhook.service"
113+
dest: /etc/systemd/system/webhook.service
114+
mode: 0644
115+
notify:
116+
- Reload systemd
117+
- Restart webhook
118+
119+
- name: Configure webhook secrets
120+
ansible.builtin.copy:
121+
content: "SITE_DIR=/usr/share/caddy"
122+
dest: /etc/caddy/webhook.env
123+
mode: 0644
124+
notify:
125+
- Restart webhook
126+
127+
- name: Enable webhook service
128+
ansible.builtin.systemd:
129+
name: webhook.service
130+
enabled: true
131+
state: started
132+
101133
# Handlers restart/reload services at playbook completion
102134
# #######################################################
103135
handlers:
@@ -114,3 +146,8 @@
114146
ansible.builtin.systemd:
115147
name: caddy
116148
state: restarted
149+
150+
- name: Restart webhook
151+
ansible.builtin.systemd:
152+
name: webhook
153+
state: restarted

0 commit comments

Comments
 (0)