diff options
author | Sacha Chua <sacha@sachachua.com> | 2025-09-19 14:10:17 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2025-09-19 14:10:17 -0400 |
commit | a0fa0103497434808ceabfb1ef443726224060f6 (patch) | |
tree | 26a23c8b79f3621da9a56a00c11b3e962af315e8 | |
parent | e09651348ef9a21a52c434e65745535478051a85 (diff) | |
download | emacsconf-ansible-a0fa0103497434808ceabfb1ef443726224060f6.tar.xz emacsconf-ansible-a0fa0103497434808ceabfb1ef443726224060f6.zip |
tweak pad and pad proxy so I can replicate it in a vagrant VM
-rw-r--r-- | common-playbook.yml | 10 | ||||
-rw-r--r-- | roles/pad-proxy/tasks/main.yml | 4 | ||||
-rw-r--r-- | roles/pad-proxy/templates/etherpad.nginx.conf | 2 | ||||
-rw-r--r-- | roles/pad/tasks/main.yml | 5 |
4 files changed, 13 insertions, 8 deletions
diff --git a/common-playbook.yml b/common-playbook.yml index ed0f552..a4c41e8 100644 --- a/common-playbook.yml +++ b/common-playbook.yml @@ -13,16 +13,16 @@ tags: edit roles: - edit -- name: Set up pad - hosts: pad - tags: pad - roles: - - pad - name: Set up proxy hosts: pad tags: proxy roles: - pad-proxy +- name: Set up pad + hosts: pad + tags: pad + roles: + - pad - name: Set up upload container hosts: upload tags: upload diff --git a/roles/pad-proxy/tasks/main.yml b/roles/pad-proxy/tasks/main.yml index 8de72df..1e4518a 100644 --- a/roles/pad-proxy/tasks/main.yml +++ b/roles/pad-proxy/tasks/main.yml @@ -2,6 +2,10 @@ - name: Set up Nginx as root become: true block: + - name: Remove apache + apt: + name: apache2 + state: absent - name: Install Nginx apt: name: nginx diff --git a/roles/pad-proxy/templates/etherpad.nginx.conf b/roles/pad-proxy/templates/etherpad.nginx.conf index 144185f..dc2879d 100644 --- a/roles/pad-proxy/templates/etherpad.nginx.conf +++ b/roles/pad-proxy/templates/etherpad.nginx.conf @@ -49,7 +49,7 @@ server { proxy_pass http://etherpad_upstream; } location / { - rewrite ^/?$ https://pad.emacsconf.org/{{ emacsconf_year }} redirect; + rewrite ^/?$ {{ etherpad_url }}/{{ emacsconf_year }} redirect; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/roles/pad/tasks/main.yml b/roles/pad/tasks/main.yml index b720b40..5fcd2a3 100644 --- a/roles/pad/tasks/main.yml +++ b/roles/pad/tasks/main.yml @@ -1,6 +1,7 @@ --- # tasks file for pad - name: Set up packages as root + become: true block: - name: Add GPG apt: @@ -105,7 +106,7 @@ - name: Wait for OK tags: create-pads uri: - url: "https://{{ etherpad_server_name }}/api/1/createPad?apikey={{ etherpad_api_key }}&padID={{etherpad_year}}" + url: "{{ etherpad_url }}/api/1/createPad?apikey={{ etherpad_api_key }}&padID={{etherpad_year}}" register: _result until: _result.status == 200 retries: 720 @@ -116,5 +117,5 @@ - name: Create pads tags: create-pads uri: - url: "https://{{ etherpad_server_name }}/api/1/createPad?apikey={{ etherpad_api_key }}&padID={{etherpad_year}}-{{ item.slug }}" + url: "{{ etherpad_url }}/api/1/createPad?apikey={{ etherpad_api_key }}&padID={{etherpad_year}}-{{ item.slug }}" loop: "{{ talks | json_query('talks[*]') }}" |