dnsservice/ansible/tasks/lbsite.yml

27 lines
620 B
YAML

- name: ensure /var/www/site exists
file:
path: /var/www/site
state: directory
mode: '0755'
owner: caddy
group: caddy
- name: ensure /var/www/data exists
file:
path: /var/www/data
state: directory
mode: '0755'
owner: caddy
group: caddy
- name: copy static assets
copy:
src: "{{ playbook_dir }}/assets/static/"
dest: "/var/www/site/static/"
- name: copy api assets
copy:
src: "{{ playbook_dir }}/assets/api/"
dest: "/var/www/site/api/"
- name: copy index.html
template:
src: "{{ playbook_dir }}/assets/index.html"
dest: "/var/www/site/index.html"