diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-16 18:30:31 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-16 18:30:58 -0400 |
commit | 656e440054f43fc09050ba13e29d4eaaf355fcf5 (patch) | |
tree | e88274f567b89c0f1438521063c0f5550a67ac79 /roles/pad-proxy | |
parent | 12c465a8f6e127a599b0477094552fc90c7e2ce0 (diff) | |
download | emacsconf-ansible-656e440054f43fc09050ba13e29d4eaaf355fcf5.tar.xz emacsconf-ansible-656e440054f43fc09050ba13e29d4eaaf355fcf5.zip |
Add ansible_managed token to templates
Diffstat (limited to '')
-rw-r--r-- | roles/pad-proxy/tasks/main.yml | 3 | ||||
-rw-r--r-- | roles/pad-proxy/templates/etherpad.nginx.conf | 2 | ||||
-rw-r--r-- | roles/pad-proxy/templates/wikimedia.etherpad.nginx.conf | 33 |
3 files changed, 5 insertions, 33 deletions
diff --git a/roles/pad-proxy/tasks/main.yml b/roles/pad-proxy/tasks/main.yml index 8de72df..b8cfdf3 100644 --- a/roles/pad-proxy/tasks/main.yml +++ b/roles/pad-proxy/tasks/main.yml @@ -6,6 +6,9 @@ apt: name: nginx state: present + - debug: + var: ansible_managed + tags: wip - name: Add proxy configuration template: src: etherpad.nginx.conf diff --git a/roles/pad-proxy/templates/etherpad.nginx.conf b/roles/pad-proxy/templates/etherpad.nginx.conf index 90a7c1c..95838be 100644 --- a/roles/pad-proxy/templates/etherpad.nginx.conf +++ b/roles/pad-proxy/templates/etherpad.nginx.conf @@ -1,3 +1,5 @@ +# {{ ansible_managed }} + upstream etherpad_upstream { server 127.0.0.1:9001; } diff --git a/roles/pad-proxy/templates/wikimedia.etherpad.nginx.conf b/roles/pad-proxy/templates/wikimedia.etherpad.nginx.conf deleted file mode 100644 index 2288c65..0000000 --- a/roles/pad-proxy/templates/wikimedia.etherpad.nginx.conf +++ /dev/null @@ -1,33 +0,0 @@ -upstream etherpad_upstream { - server 127.0.0.1:9001; -} -server { - listen 80; - server_name {{ etherpad_server_name }}; - access_log /var/log/nginx/{{ etherpad_server_name }}.access.log; - location /p/ { - rewrite ^/p/(.*) /$1 redirect; - } - location ~ ^/$ { - return 302 https://etherpad.wikimedia.org/p/emacsconf-2022; - } - location ~ ^/(locales/|locales.json|admin/|static/|pluginfw/|javascripts/|socket.io/|ep/|minified/|api/|ro/|error/|jserror/|favicon.ico|robots.txt) { - proxy_buffering off; - proxy_pass http://etherpad_upstream; - } - location ~ ^/pad-lister($|\/.*) { - proxy_buffering off; - proxy_pass http://etherpad_upstream; - } - location /direct/ { - rewrite /direct/(.*) /$1 break; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://etherpad_upstream/p/; - } - location / { - rewrite /(.*) https://etherpad.wikimedia.org/p/emacsconf-$1 redirect; - } -} |