deploy_inital_postgresql.yml
2.41 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
- hosts: deploy-wdchat-postgresql-302
become: true
tasks:
- name: Create Database WDCHAT & WDAUTHEN & USER
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=postgres -f /tmp/configuration/0_Create.User.sql
responses:
'Password for user postgres': 'password'
- name: Create WDCHAT Table
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdchat -d WDCHAT -f /tmp/configuration/1_Create.WDCHAT.Table.sql
responses:
'Password for user wdchat': 'BBRyAPNh6g4H9qte'
- name: Initial WDCHAT
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdchat -d WDCHAT -f /tmp/configuration/2_Initial.WDCHAT.sql
responses:
'Password for user wdchat': 'BBRyAPNh6g4H9qte'
- name: Create WDAUTHEN Table
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdauthen -d WDAUTHEN -f /tmp/configuration/3_Create.WDAUTHEN.Table.sql
responses:
'Password for user wdauthen': 'BBEcLWu5Cdzy3aeH'
- name: Initial WDAUTHEN
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdauthen -d WDAUTHEN -f /tmp/configuration/4_Initial.WDAUTHEN.sql
responses:
'Password for user wdauthen': 'BBEcLWu5Cdzy3aeH'
- hosts: deploy-dma-postgresql-302, deploy-dma-postgresql-312
become: true
tasks:
- name: Create Database WDCHAT
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=postgres -f /tmp/configuration/0_Create.User.sql
responses:
'Password for user postgres': 'password'
- name: Create DMA Table
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdchat -d WDCHAT -f /tmp/configuration/Create.DMA.Table.sql
responses:
'Password for user wdchat': 'BBRyAPNh6g4H9qte'
- name: Initial WDCHAT
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdchat -d WDCHAT -f /tmp/configuration/2_Initial.WDCHAT.sql
responses:
'Password for user wdchat': 'BBRyAPNh6g4H9qte'