-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.yml
More file actions
143 lines (123 loc) · 4.2 KB
/
main.yml
File metadata and controls
143 lines (123 loc) · 4.2 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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
# defines the type of host
pgbackrest_is_pg_host: true
pgbackrest_is_repository_host: true
pgbackrest_working_directory: /tmp/build
pgbackrest_version: 2.53
pgbackrest_git_repo_release_artifact_url: "https://github.com/pgbackrest/pgbackrest/archive/release/{{ pgbackrest_version }}.tar.gz"
pgbackrest_release_file: "pgbackrest-release-{{ pgbackrest_version }}.tar.gz"
pgbackrest_release_extract_directory: "{{ pgbackrest_working_directory }}/pgbackrest-release-{{ pgbackrest_version }}"
pgbackrest_conf_template: "etc/pgbackrest/pgbackrest.conf.j2"
pgbackrest_config_path: "{{ pgbackrest_config_dir }}/pgbackrest.conf"
pgbackrest_config_dir: "/etc/pgbackrest"
pgbackrest_cert_directory: "{{ pgbackrest_config_dir }}/cert"
# pgbackrest.service created only when pgbackrest_setup_certificate is true
pgbackrest_service_template: "etc/systemd/system/pgbackrest.service.j2"
pgbackrest_service_path: "/etc/systemd/system/pgbackrest.service"
# tls configurations
pgbackrest_setup_certificate: false
pgbackrest_certificate_ca: # "inventory/files/tls/ca.crt"
pgbackrest_certificate_files: []
# - "inventory/files/tls/pg1.key"
# - "inventory/files/tls/pg1.crt"
# - "inventory/files/tls/repo1.key"
# - "inventory/files/tls/repo1.crt"
pgbackrest_pre_install_packages:
- wget
- tar
pgbackrest_install_packages:
- python3-distutils
- meson
- gcc
- libpq-dev
- libssl-dev
- libxml2-dev
- pkg-config
- liblz4-dev
- libzstd-dev
- libbz2-dev
- libz-dev
- libyaml-dev
- libssh2-1-dev
# apt packages to remove when pgbackrest_cleanup_after_setup is true
pgbackrest_cleanup_packages:
- python3-distutils
- meson
- gcc
- libpq-dev
- libssl-dev
- libxml2-dev
- pkg-config
- liblz4-dev
- libzstd-dev
- libbz2-dev
- libz-dev
- libyaml-dev
- libssh2-1-dev
# directories to remove when pgbackrest_cleanup_after_setup is true
pgbackrest_cleanup_directories:
- "{{ pgbackrest_working_directory }}"
pgbackrest_binary_dir: /usr/bin
pgbackrest_log_directory: /var/log/pgbackrest
# user configuration
pgbackrest_create_user: true
pgbackrest_user: pgbackrest
pgbackrest_user_group: pgbackrest
pgbackrest_user_password: ""
pgbackrest_user_create_home: true
pgbackrest_user_home: "/home/{{ pgbackrest_user }}"
pgbackrest_user_ssh_key_type: ed25519
pgbackrest_user_ssh_key_size:
# pgbackrest_user_ssh_key_passphrase: ""
pgbackrest_user_generate_ssh_key: true
# pgbackrest_user_ssh_key_file pair path "{{ pgbackrest_user_home }}/{{ pgbackrest_user_ssh_key_file }}"
pgbackrest_user_ssh_key_file: ".ssh/id_{{ pgbackrest_user_ssh_key_type }}"
pgbackrest_user_ssh_pub_key_file: ".ssh/id_{{ pgbackrest_user_ssh_key_type }}.pub"
# creates .pgpass on home directory used when pg-host-user is different from 'postgres'
pgbackrest_pgpass_entries: []
# - "hostname:port:database:username:password"
pgbackrest_pgpass_path: "{{ pgbackrest_user_home }}/.pgpass"
pgbackrest_pgpass_template: "postgresql/.pgpass"
# removes unneeded packages and directories used during installation process
pgbackrest_cleanup_after_setup: true
# creates the repo(n)-path (e.g. repo1-path) directory
pgbackrest_repo_directory: /var/lib/pgbackrest
# used by ssh host-type
pgbackrest_temp_ssh_pub_key_export_directory: "/tmp/ansible-pgbackrest-ssh-keys"
pgbackrest_ssh_pub_keys_to_import: []
# - src_host: 192.168.15.21
# authorized_keys_path: "{{ pgbackrest_user_home }}/.ssh/authorized_keys"
# owner: "{{ pgbackrest_user }}"
# group: "{{ pgbackrest_user_group }}"
# holds the stanza configuration on pgbackrest.conf
pgbackrest_stanza_conf: []
# - name: main
# content:
# pg1-path: /var/lib/postgresql/13/main
# holds the global configuration for pgbackrest.conf
pgbackrest_conf:
- name: global
content:
compress-level: 3
- name: global:archive-push
content:
compress-level: 3
pgbackrest_cronjob: []
# - name: pgbackrest_full_backup
# minute: "10"
# hour: "06"
# day: "*"
# month: "*"
# weekday: "0"
# user: pgbackrest
# job: "pgbackrest --type=full --stanza=main backup"
# cron_file: pgbackrest
# - name: pgbackrest_diff_backup
# minute: "10"
# hour: "06"
# day: "*"
# month: "*"
# weekday: "1-6"
# user: pgbackrest
# job: "pgbackrest --type=diff --stanza=main backup"
# cron_file: pgbackrest