-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx_reverse_proxy.yml
47 lines (43 loc) · 1.06 KB
/
nginx_reverse_proxy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
- name: Create nginx directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: "0755"
loop:
- /etc/nginx/sites-enabled
- /etc/nginx/ssl
- name: Install Passlib
ansible.builtin.package:
name: python3-passlib
- name: Install dummy tls certificate
ansible.builtin.copy:
src: dummy-tls-{{ item }}.pem
dest: /etc/nginx/ssl/{{ opencast_opensearch_remote_host }}.{{ item }}
owner: root
group: root
mode: '0400'
force: false
notify: Reload nginx
loop:
- key
- crt
- name: Create opensearch htpasswd
community.general.htpasswd:
path: /etc/nginx/opensearch_htpasswd
owner: root
group: "root"
mode: "0640"
name: "{{ opencast_opensearch_remote_user }}"
password: "{{ opencast_opensearch_remote_password }}"
notify: Reload nginx
- name: Create Nginx virtual host
ansible.builtin.template:
src: nginx-vhost.conf
dest: /etc/nginx/sites-enabled/opensearch.conf
owner: root
group: root
mode: "0644"
notify: Reload nginx