feat: basic routing to caddy
This commit is contained in:
19
playbooks/route.yml
Normal file
19
playbooks/route.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
- name: "Create route to instance."
|
||||
hosts: router
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Modify base Caddyfile.
|
||||
ansible.builtin.blockinfile:
|
||||
dest: ~/app/caddy/etc/Caddyfile
|
||||
marker: '# GITEA {mark}'
|
||||
content: "{{ lookup('file', '../router/Caddyfile') }}"
|
||||
notify:
|
||||
- Restart Caddy.
|
||||
|
||||
handlers:
|
||||
- name: Restart Caddy.
|
||||
ansible.builtin.systemd_service:
|
||||
name: container-caddy
|
||||
state: restarted
|
||||
enabled: true
|
||||
scope: user
|
||||
Reference in New Issue
Block a user