summaryrefslogtreecommitdiffstats
path: root/roles/pad-proxy/tasks/main.yml
diff options
context:
space:
mode:
authorOpal <847966@proton.me>2022-10-15 15:27:41 -0700
committerOpal <847966@proton.me>2022-10-15 15:27:41 -0700
commita287e741842f67d0a04c48276221d85f16079d55 (patch)
tree2db596b4ba6709fe10168942bcd0fc5ed2850d02 /roles/pad-proxy/tasks/main.yml
parentd86946ec21f2175d3a5aad58c1ae236291c74b7a (diff)
downloademacsconf-ansible-a287e741842f67d0a04c48276221d85f16079d55.tar.xz
emacsconf-ansible-a287e741842f67d0a04c48276221d85f16079d55.zip
merging code between old emacsconf repo, to sachac's emacsconf repo
Diffstat (limited to 'roles/pad-proxy/tasks/main.yml')
-rw-r--r--roles/pad-proxy/tasks/main.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/pad-proxy/tasks/main.yml b/roles/pad-proxy/tasks/main.yml
new file mode 100644
index 0000000..d47573a
--- /dev/null
+++ b/roles/pad-proxy/tasks/main.yml
@@ -0,0 +1,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