-
Notifications
You must be signed in to change notification settings - Fork 2
/
config_odbc.yml
61 lines (57 loc) · 1.8 KB
/
config_odbc.yml
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
55
56
57
58
59
60
61
# Purpose: Setup ODBC connection on programming environment server.
# Key Dependencies:
# - Become SAS user to update config
# - SAS Viya deployment inventory file
# - Setup database connection parameters within text blocks defined below (REPLACEME).
---
- name: Setup ODBC connection on programming environment server
hosts: programming
gather_facts: no
become: yes
become_user: sas
tasks:
- name: Touch odbc.ini file
file:
path: /opt/sas/viya/home/odbc.ini
state: touch
- name: Touch odbcinst.ini file
file:
path: /opt/sas/viya/home/odbcinst.ini
state: touch
- blockinfile:
path: /opt/sas/viya/home/odbc.ini
state: present
block: |
[REPLACEME]
Driver=/opt/sas/spre/home/lib64/psqlodbcw.so
Servername=REPLACEME
SSLmode=require
Database=REPLACEME
Username=REPLACEME
Password=REPLACEME
Port=5432
UseServerSidePrepare=1
UseDeclareFetch=1
Fetch=10000
[REPLACEME]
Driver=/opt/sas/spre/home/lib64/psqlodbcw.so
Servername=REPLACEME
SSLmode=require
Database=REPLACEME
Username=REPLACEME
Password=REPLACEME
Port=5432
UseServerSidePrepare=1
UseDeclareFetch=1
Fetch=10000
marker: "#---- {mark} ODBC connection details ----"
- blockinfile:
path: /opt/sas/viya/home/odbcinst.ini
state: present
block: |
[ODBC Drivers]
PostgreSQL=Installed
[PostgreSQL]
Description=ODBC for PostgreSQL
Driver=/opt/sas/spre/home/lib64/psqlodbcw.so
marker: "#---- {mark} ODBC connection details ----"