forked from AFPy/infra
28 lines
499 B
YAML
28 lines
499 B
YAML
---
|
|
|
|
- name: Install nginx and dependencies
|
|
apt:
|
|
name: [nginx, git]
|
|
|
|
- name: Create user
|
|
user:
|
|
name: "{{ static_user }}"
|
|
shell: /bin/false
|
|
system: yes
|
|
home: "{{ static_home }}"
|
|
|
|
- name: Clone repo
|
|
git:
|
|
repo: "{{ static_repo }}"
|
|
dest: "{{ static_home }}/www/"
|
|
register: clone_repo
|
|
|
|
- name: Configure nginx
|
|
template:
|
|
src: nginx-vhost
|
|
dest: "/etc/nginx/conf.d/{{ static_domain }}.conf"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: reload nginx
|