summaryrefslogtreecommitdiff
path: root/baserock_frontend/instance-config.yml
blob: 63187112fd55936ea9e6be4631f61f2c933d7b6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Instance configuration for Baserock HAProxy instance.
#
# This playbook should be run after starting an instance of the Baserock
# frontend image.
---
- hosts: frontend-haproxy
  gather_facts: false
  sudo: yes
  tasks:
  # To create the .pem file, simply concatenate
  # certs/baserock.org-ssl-certificate-temporary-dsilverstone.full.cert with
  # the private key for that certificate (which is not committed to Git, of
  # course).
  - name: install SSL certificate
    content: "{{ lookup('file', '../private/baserock.org-ssl-certificate-temporary-dsilverstone.pem') }}"
    dest: /etc/pki/tls/private/baserock.pem
    owner: haproxy
    mode: 400

  - name: HAProxy configuration
    copy:
      src: haproxy.cfg
      dest: /etc/haproxy/haproxy.cfg