-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpgcluster1.yml
105 lines (84 loc) · 3.9 KB
/
pgcluster1.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
- hosts: [dcs_cluster,postgresql_cluster]
become: yes
any_errors_fatal: true
vars:
# ansible_python_interpreter: /usr/bin/python3
installation: online
cgroups: true
cgroups_version: "v2"
DCS: etcd3 # may be : etcd, etcd3, consul, zookeeper, exhibitor, kubernetes, raft
# DCS: zookeeper # may be : etcd, etcd3, consul, zookeeper, exhibitor, kubernetes, raft
dcs_on_mounted_disk: true
zookeeper_version: '3.6.3'
zookeeper_src: "/root/packages/zookeeper/apache-zookeeper-{{ zookeeper_version }}-bin.tar.gz"
zookeeper_service: zookeeper
zookeeper_cgroups: true
# see: zoo
etcd3_version: '3.3.25'
etcd3_src: "/root/packages/etcd3/etcd-v{{ etcd3_version }}-linux-amd64.tar.gz"
etcd3_cgroups: true
# see: etcdctl cluster-health
postgresql_version: "14"
postgresql_src: "/root/packages/postgres/PG{{ postgresql_version }}"
postgresql_port: 5434
postgresql_cgroups: true
# see: systemd-cgls --no-pager
postgresql_packages:
## ALT Linux (не понятно как указать конкретную версию)
- postgresql14
- postgresql14-server
- postgresql14-contrib
- postgresql14-perl
install_pgagent: true
install_pgbouncer: true
install_pgpool: true
postgresql_addendum_version:
- pgagent
- pgpool-II
postgresql_addendum_common:
- pgbouncer
postgresql_on_mounted_disk: true
postgresql_pgpool_password: P@ssw0rd
postgresql_hba:
- { type: '#host', database: all, user: foo, address: '0.0.0.0/0', method: reject }
- { type: host, database: all, user: foo, address: '0.0.0.0/0', method: md5 }
# - { type: host, database: all, user: pgpool, address: '0.0.0.0/0', method: md5 }
# - { type: host, database: all, user: pgagent, address: '127.0.0.1/32', method: md5 }
- { type: local, database: all, user: all, address: '', method: peer, tag: 'unix socket' }
- { type: host, database: all, user: all, address: '127.0.0.1/32', method: ident }
- { type: host, database: all, user: all, address: '::1/128', method: ident, tag: 'IPv6' }
- { type: local, database: replication, user: all, address: '', method: peer, tag: 'unix socket' }
- { type: host, database: replication, user: all, address: '127.0.0.1/32', method: ident }
- { type: host, database: replication, user: all, address: '::1/128', method: ident, tag: 'IPv6' }
- { type: host, database: all, user: all, address: 'all', method: md5 }
# - { type: host, database: all, user: all, address: '0.0.0.0/0', method: 'ldap ldapserver="lab-dc.lab.local lab-dc.lab.local" ldapprefix="" ldapsuffix="@LAB.LOCAL"', tag: 'LDAP Authentification' }
psycopg_version: 3
# patroni_version: 2.1.2
patroni_version: 2.1.4
patroni_src: "/root/packages/patroni/{{ patroni_version }}"
patroni_namespace: "/patroni"
patroni_scope: "alt-cls"
patroni_fqdn: "alt-cls.lab.local"
patroni_cluster_ip: "172.27.172.200"
patroni_admin_login: "clsadmin"
patroni_admin_password: "P@ssw0rd"
patroni_replica_login: "clsreplica"
patroni_replica_password: "P@ssw0rd"
patroni_log: /var/log/patroni/patroni.log
patroni_packages:
# - patroni-*
pg_profile_package:
- pg_profile--4.1.tar.gz
# - pg_profile--0.3.4.tar.gz
roles:
- install-cgroups
- install-ipsec
- install-zookeeper
- install-etcd3
- install-postgres
- install-pgpool
- install-pgbouncer
- install-patroni
- install-pg_profile
- install-ipsec