blob: 7a83c08d6c6cad75315a80b1ebac87298a089680 [file] [log] [blame]
Zack Williams70996442020-10-01 22:09:49 -07001---
2# timeesheets molecule/default/prepare.yml
3#
4# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
7- name: Prepare for Timesheets by installing dependency roles
8 hosts: all
9
10 vars:
11 pgsql_users:
12 - name: "timesheets_db_user"
13 password: "timesheets_db_pass"
14 pgsql_databases:
15 - name: "timesheets"
16 owner: "timesheets_db_user"
17
18 acme_username: "www-data" # make independent of the acme role
19 vhosts:
20 - name: "timesheets.example.com"
21 default_server: true
22 custom_root: "/opt/timesheets/ui/dist/timesheetsui"
23 extra_config: |
Zack Williamscb334032020-11-29 22:46:32 -070024 location /rest/ {
25 proxy_pass http://localhost:3000/;
Zack Williams70996442020-10-01 22:09:49 -070026 proxy_buffering off;
27 proxy_http_version 1.1;
28 proxy_read_timeout 60;
29 proxy_connect_timeout 90;
30
31 proxy_set_header Host $host;
32 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
33 proxy_set_header X-Forwarded-Proto $scheme;
34 proxy_set_header X-Real-IP $remote_addr;
35 proxy_set_header Accept-Encoding "";
36 }
37
38
39 pre_tasks:
40 - name: Install GPG to support adding apt repo keys
41 apt:
42 name: "gpg"
43 state: "present"
44 update_cache: true
45
46 roles:
47 - nodejs
48 - nginx
49 - postgresql