You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python3 -m venv env # Create a virtual environnement
48
48
source env/bin/activate # Activate the environnement
49
-
pip3 install ansible ansible-lint molecule[docker] # Install the python packages in the virutal environnement
49
+
pip3 install ansible ansible-lint molecule-plugins[docker] # Install the python packages in the virutal environnement
50
50
```
51
51
52
52
After setting up the environnement you can use molecule to test the role as you wish. If you are not very familiar with molecule, checkout the following table for some basic commands you can run against this role.
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,10 +181,16 @@ postgresql_hba_raw: |
181
181
postgresql_config_change_allow_restart: true
182
182
# Controls running tasks handling: configuration
183
183
postgresql_configure: true
184
+
# Enable SSL
185
+
postgresql_ca_enabled: true
186
+
# Certificate file subject used during generation
187
+
postgresql_ssl_cert_subj: /C=FR/ST=FR
184
188
```
185
189
186
190
_Notes:_
187
191
192
+
SSL configuration (introduced in `v3.0.0`) is enabled by default. The associated key and cert files are only regenerated if they are missing on the remote host.
193
+
188
194
By default, this role restarts the PostgreSQL service during subsequent configuration changes after the initial engine installation, ensuring all changes are applied immediately. However, this behavior can cause potential service outages.
189
195
190
196
To prevent automatic restarts, you can set the variable `postgresql_config_change_allow_restart` (introduced in `v2.1.0`) to `false`. Starting with (`v3.0.0`), the default value of this variable will change to `false`, meaning the role will avoid restarting PostgreSQL by default. If you rely on the current behavior, you will need to explicitly set this variable to true in your configuration.
value: "{{ 'on' if postgresql_ca_enabled else 'off' }}"
75
+
- option: ssl_cert_file
76
+
value: '{{ postgresql_ssl_cert_file }}'
77
+
- option: ssl_key_file
78
+
value: '{{ postgresql_ssl_key_file }}'
79
+
64
80
# Extra configuration options that are always inserted inside postgresql.conf
65
81
postgresql_global_config_options_extra: []
66
82
# Actual postgresql log directory
@@ -370,7 +386,8 @@ postgresql_uninstall_1: false
370
386
postgresql_uninstall_2: false
371
387
372
388
373
-
# Tells the role that the PostgreSQL instance is managed by Patroni therefore automatically disabling some features initialization,auto tuning,regular configuration, actual replication configuration
389
+
# Tells the role that the PostgreSQL instance is managed by Patroni therefore automatically
390
+
# disabling some features initialization,auto tuning,regular configuration, actual replication configuration
374
391
postgresql_is_patroni: false
375
392
# When combined with postgresql_install:true, this essentially skips all remaining tasks after packages installation
0 commit comments