ansible-role-web_mastodon/tasks/nginx.yml

21 lines
452 B
YAML
Raw Normal View History

2022-10-11 09:19:16 +02:00
---
- name: Copy nginx config
template:
src: ../files/nginx/mastodon.conf.j2
dest: /etc/nginx/sites-available/mastodon.conf
when:
- mastodon_host is defined
- name: Symlink enabled site
file:
src: "/etc/nginx/sites-available/mastodon.conf"
dest: "/etc/nginx/sites-enabled/mastodon.conf"
state: link
when:
- mastodon_host is defined
- name: Reload nginx
command: "systemctl reload nginx"
tags:
- systemd