summaryrefslogblamecommitdiffstats
path: root/pad-proxy/tasks/main.yml
blob: d47573ad54fb967882bad0e1823a5b28d9577377 (plain) (tree)


























                                                    
---
- 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