comparison tests/data/extract-new-config.yml @ 760:1514e7d2f691

FIX: add forgotten test configuration data file
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 07 Dec 2023 08:40:46 +0100
parents
children
comparison
equal deleted inserted replaced
759:bfa864ed0854 760:1514e7d2f691
1 # -*- coding: utf-8; mode: yaml; indent-tabs-mode: nil; -*-
2 #
3 %YAML 1.1
4 ---
5
6 globals:
7 var1: value1
8 var2: value2
9 datadir1: &datadir 'E:\home\fag\p\work5\pgdbmgr\_data'
10 PGBINDIR: 'E:\APPS64\PostgreSQL-9.4\all\bin'
11
12 PATH: '{{PGBINDIR}}'
13
14 user1:
15 name: &rootname 'My Username'
16 pwd: &rootpwd 'My Password'
17
18 user2:
19 name: 'myquizowner'
20 pwd: 'abcQQQ123456'
21
22 database: myquiz
23
24 dbhost: localhost
25 dbport: 5432
26
27 engine0:
28 url: 'postgresql+psycopg2://{{user1.name|urlquote}}:{{user1.pwd|urlquote}}@{{dbhost}}:{{dbport}}/postgres'
29 echo: false
30 echo_pool: false
31 encoding: utf-8
32 isolation_level: 'SERIALIZABLE'
33
34 engine1:
35 url: 'postgresql+psycopg2://{{user2.name|urlquote}}:{{user2.pwd|urlquote}}@{{dbhost}}:{{dbport}}/{{database}}'
36 echo: false
37 echo_pool: false
38 encoding: utf-8
39 isolation_level: 'SERIALIZABLE'
40
41 section: This is the Root Section
42 parts:
43 - section: This is Section 1
44 parts:
45 - section: This is Section 2, a subsection of Section 1
46 op: initcluster
47 params:
48 superuser: '{{user1.name}}'
49 superpassword: '{{user1.pwd}}'
50 # or here also: rootuser: *rootname
51 locale: C
52 encoding: UTF8
53 datadir: *datadir
54 # or here also: datadir: '{{datadir1}}'
55
56 - section: Create a User (DB Owner)
57 op: createuser
58 params:
59 name: '{{user2.name}}'
60 password: '{{user2.pwd}}'
61 login: true
62 options:
63 connstr: engine0
64
65 - section: Install
66 op: createdb
67 params:
68 name: '{{database}}'
69 owner: '{{user2.name}}'
70 connection_limit: 30
71 options:
72 connstr: engine0
73
74
75 - section: This is another section
76 depends: This is Section 1
77 # OR - if more than one dependency
78 # depends:
79 # - This is Section 1
80 # - Maybe another Section on which this section depends
81 op: the_new_operation
82 with:
83 vars:
84 a: '{{var1}}'
85 b: 'file://{{user1.name|urlquote}}:{{user1.pwd | urlquote}}@localhost/'
86 # cwd: 'E:\what{{a}}'
87
88
89 pool:
90 - section: Start Cluster
91 op: startcluster
92 params:
93 datadir: '{{datadir1}}'
94 logfile: '{{datadir1}}/_log.log'
95
96 - section: Stop Cluster
97 op: stopcluster
98 params:
99 datadir: '{{datadir1}}'
100
101 - section: Configure
102 op: amendconfig
103 args:
104 - "log_connections = on"
105 - "log_disconnections = on"
106 - "log_line_prefix = '%m %u@%d %p %r '"
107 params:
108 datadir: '{{datadir1}}'
109
110 - section: Exit
111 op: exit
112 params:
113 exitcode: 0
114
115 - section: Uninstall
116 op: deletedb
117 params:
118 name: '{{database}}'
119 options:
120 connstr: engine0