summaryrefslogtreecommitdiffstats
path: root/pad-proxy/tasks/main.yml
blob: d47573ad54fb967882bad0e1823a5b28d9577377 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
- name: Set up Nginx as root
  become: true
  block:
  - name: Install Nginx
    apt:
      name: nginx
      state: present
  - name: Add proxy configuration
    template:
      src: etherpad.nginx.conf
      dest: /etc/nginx/sites-available/etherpad.conf
    when: not use_wikimedia
  - name: Add rewrite configuration
    template:
      src: wikimedia.etherpad.nginx.conf
      dest: /etc/nginx/sites-available/etherpad.conf
    when: use_wikimedia
  - name: Enable site
    file:
      src: /etc/nginx/sites-available/etherpad.conf
      dest: /etc/nginx/sites-enabled/etherpad.conf
      state: link
  - name: Restart nginx
    service:
      name: nginx
      state: restarted