-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathremote-database.yaml
More file actions
36 lines (34 loc) · 1.03 KB
/
remote-database.yaml
File metadata and controls
36 lines (34 loc) · 1.03 KB
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
---
- name: Setup rootless user environment
hosts:
- database
become: true
roles:
- role: rootless_user
tasks:
- name: Map rootless_user_xdg_runtime_dir to foremanctl namespace
ansible.builtin.set_fact:
foremanctl_xdg_runtime_dir: "{{ rootless_user_xdg_runtime_dir }}"
- name: Setup remote database
hosts:
- database
become: true
vars_files:
- "../../../src/vars/database.yml"
- "../../../src/vars/base.yaml"
vars:
certificates_hostnames:
- "{{ ansible_facts['fqdn'] }}"
certificates_ca_password: "CHANGEME"
postgresql_ssl_crt: "{{ certificates_ca_directory }}/certs/{{ ansible_facts['fqdn'] }}.crt"
postgresql_ssl_key: "{{ certificates_ca_directory }}/private/{{ ansible_facts['fqdn'] }}.key"
roles:
- role: pre_install
- role: certificates
- role: postgresql
tasks:
- name: Fetch PostgreSQL SSL CA
ansible.builtin.fetch:
src: "{{ certificates_ca_directory }}/certs/ca.crt"
dest: "{{ obsah_state_path }}/db-ca.crt"
flat: true