| --- |
| # timeesheets molecule/default/prepare.yml |
| # |
| # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| - name: Prepare for Timesheets by installing dependency roles |
| hosts: all |
| |
| vars: |
| pgsql_users: |
| - name: "timesheets_db_user" |
| password: "timesheets_db_pass" |
| pgsql_databases: |
| - name: "timesheets" |
| owner: "timesheets_db_user" |
| |
| acme_username: "www-data" # make independent of the acme role |
| vhosts: |
| - name: "timesheets.example.com" |
| default_server: true |
| custom_root: "/opt/timesheets/ui/dist/timesheetsui" |
| extra_config: | |
| location /rest/ { |
| proxy_pass http://localhost:3000/; |
| proxy_buffering off; |
| proxy_http_version 1.1; |
| proxy_read_timeout 60; |
| proxy_connect_timeout 90; |
| |
| proxy_set_header Host $host; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Forwarded-Proto $scheme; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_set_header Accept-Encoding ""; |
| } |
| |
| |
| pre_tasks: |
| - name: Install GPG to support adding apt repo keys |
| apt: |
| name: "gpg" |
| state: "present" |
| update_cache: true |
| |
| roles: |
| - nodejs |
| - nginx |
| - postgresql |