diff options
| author | 2023-08-12 19:01:01 +0100 | |
|---|---|---|
| committer | 2023-08-12 19:01:01 +0100 | |
| commit | aa96ceb9f5481a4da9f4a16dff92d05acc48687d (patch) | |
| tree | 69c6ec1455ddf717f52576d3278485d66bdc81d3 /roles/nginx/tasks | |
| parent | Add meeting notes for today (diff) | |
Serve static files from Turing (#116)
* Redirect http requests to https
* Remove default NGINX site
* Remove trailing whitespace from old meeting note
* Mount static files
* Correct capitalisation of notify directives
* Add missing children key to inventory
Diffstat (limited to 'roles/nginx/tasks')
| -rw-r--r-- | roles/nginx/tasks/main.yml | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/roles/nginx/tasks/main.yml b/roles/nginx/tasks/main.yml index 266e916..85fe7ec 100644 --- a/roles/nginx/tasks/main.yml +++ b/roles/nginx/tasks/main.yml @@ -19,4 +19,27 @@ tags: - role::nginx notify: - - reload the nginx service + - Reload the nginx service + +- name: Remove default nginx site + file: + path: /etc/nginx/sites-enabled/default + state: absent + +- name: Copy file server config + copy: + src: files.pydis.wtf + dest: /etc/nginx/sites-available/files.pydis.wtf + group: root + owner: root + mode: "0644" + tags: + - role::nginx + notify: + - Reload the nginx service + +- name: Enable file server + file: + src: /etc/nginx/sites-available/files.pydis.wtf + dest: /etc/nginx/sites-enabled/files.pydis.wtf + state: link |