25 lines
620 B
YAML
25 lines
620 B
YAML
|
# vi: ft=yaml.ansible
|
||
|
- name: install caddy
|
||
|
apt:
|
||
|
deb: https://github.com/caddyserver/caddy/releases/download/v2.8.4/caddy_2.8.4_linux_amd64.deb
|
||
|
- name: ensure /run/caddy exists
|
||
|
file:
|
||
|
path: /run/caddy
|
||
|
state: directory
|
||
|
mode: '0755'
|
||
|
owner: caddy
|
||
|
group: caddy
|
||
|
- name: ensure /var/www exists
|
||
|
file:
|
||
|
path: /var/www/site
|
||
|
state: directory
|
||
|
mode: '0755'
|
||
|
owner: caddy
|
||
|
group: caddy
|
||
|
- name: copy index.html
|
||
|
template:
|
||
|
src: "{{ playbook_dir }}/assets/index.html"
|
||
|
dest: "/var/www/site/index.html"
|
||
|
- name: ensure caddy is running
|
||
|
service: name=caddy state=started enabled=yes
|