homelab_flarum/roles/flarum/tasks/setup_nginx.yml

39 lines
822 B
YAML
Raw Permalink Normal View History

2024-03-05 08:32:15 -06:00
---
- name: Create cert dir
become: yes
file:
path: /etc/nginx/flarum.bubblesthebunny.com
state: directory
- name: Copy chain
become: yes
copy:
src: fullchain.pem
dest: /etc/nginx/flarum.bubblesthebunny.com/fullchain.pem
owner: nginx
group: nginx
mode: 0640
- name: Copy key
become: yes
copy:
src: privkey.pem
dest: /etc/nginx/flarum.bubblesthebunny.com/privkey.pem
owner: nginx
group: nginx
mode: 0640
2024-03-06 11:39:48 -06:00
- name: Add Nginx user to Flarum group
become: yes
user:
name: nginx
groups: flarum
2024-03-05 08:32:15 -06:00
- name: Copy nginx.conf
become: yes
copy:
src: nginx.conf
dest: /etc/nginx/sites-available/flarum
- name: Link to sites-enabled
become: yes
file:
src: /etc/nginx/sites-available/flarum
path: /etc/nginx/sites-enabled/flarum
state: link