Skip to content

Commit 14ccfbe

Browse files
committed
Add yamllint & Fix yamllint errors & Update version & Add maintainer
1 parent a923a71 commit 14ccfbe

17 files changed

+55
-65
lines changed

.yamllint

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
3+
yaml-files:
4+
- '*.yaml'
5+
- '*.yml'
6+
- '.yamllint'
7+
8+
rules:
9+
braces: disable
10+
brackets: disable
11+
colons: disable
12+
commas: disable
13+
comments: disable
14+
comments-indentation: disable
15+
document-end: disable
16+
document-start: disable
17+
empty-lines:
18+
max: 1
19+
max-start: 1
20+
max-end: 1
21+
empty-values:
22+
forbid-in-block-mappings: true
23+
forbid-in-flow-mappings: true
24+
hyphens:
25+
max-spaces-after: 1
26+
indentation: disable
27+
key-duplicates: disable
28+
key-ordering: disable
29+
line-length: disable
30+
new-line-at-end-of-file: enable
31+
new-lines: disable
32+
octal-values: disable
33+
quoted-strings: disable
34+
trailing-spaces: enable
35+
truthy: disable

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ Maintainers:
180180
- [Greg Clough](https://github.com/gclough)
181181
- [Magnus Lübeck](https://github.com/maglub)
182182
- [Leo C.](https://github.com/MrMegaNova)
183+
- [Laurent Lavaud](https://github.com/fidelio33b)
183184

184185
Top Contributors:
185186
- [David Farrington](https://github.com/farridav)

defaults/main.yml

+2-46
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,11 @@ postgresql_ssl_ca_file: "" # (>= 9.2)
179179
postgresql_ssl_crl_file: "" # (>= 9.2)
180180
postgresql_ssl_crl_dir: "" # (>= 14)
181181

182-
183182
#------------------------------------------------------------------------------
184183
# RESOURCE USAGE (except WAL)
185184
#------------------------------------------------------------------------------
186185

187186
# - Memory -
188-
189187
postgresql_shared_buffers: 128MB # min 128kB
190188
postgresql_huge_pages: "try" # on, off, or try
191189
postgresql_huge_page_size: 0 # (>= 14)
@@ -234,7 +232,7 @@ postgresql_vacuum_cost_limit: 200 # 1-10000 credits
234232
postgresql_bgwriter_delay: 200ms # 10-10000ms between rounds
235233
postgresql_bgwriter_lru_maxpages: 100 # 0-1000 max buffers written/round
236234
postgresql_bgwriter_lru_multiplier: 2.0 # 0-10.0 multiplier on buffers scanned/round
237-
postgresql_bgwriter_flush_after: 512kB # measured in pages, 0 disables
235+
postgresql_bgwriter_flush_after: 512kB # measured in pages, 0 disables
238236

239237
# - Asynchronous Behavior -
240238

@@ -249,7 +247,6 @@ postgresql_parallel_leader_participation: on # (>= 11)
249247
postgresql_old_snapshot_threshold: -1 # (>= 9.6) 1min-60d; -1 disables; 0 is immediate
250248
# (change requires restart)
251249

252-
253250
#------------------------------------------------------------------------------
254251
# WRITE-AHEAD LOG
255252
#------------------------------------------------------------------------------
@@ -276,9 +273,7 @@ postgresql_wal_skip_threshold: 2MB # (>= 13)
276273
postgresql_commit_delay: 0 # range 0-100000, in microseconds
277274
postgresql_commit_siblings: 5 # range 1-1000
278275

279-
280276
# - Checkpoints -
281-
282277
postgresql_max_wal_size: 1GB # (>= 9.5)
283278
postgresql_min_wal_size: 80MB # (>= 9.5)
284279
postgresql_checkpoint_flush_after: 0 # (>= 9.6) 0 disables,
@@ -288,12 +283,10 @@ postgresql_checkpoint_completion_target: 0.5 # checkpoint target duration, 0.0
288283
postgresql_checkpoint_warning: 30s # 0 disables
289284

290285
# - Prefetching during recovery -
291-
292286
postgresql_recovery_prefetch: try # (>= 15)
293287
postgresql_wal_decode_buffer_size: 512kB # (>= 15)
294288

295289
# - Archiving -
296-
297290
postgresql_archive_mode: "off"
298291
postgresql_archive_library: "" # (>= 15)
299292
# Command to use to archive a logfile segment.
@@ -305,17 +298,13 @@ postgresql_archive_command: ""
305298
postgresql_archive_timeout: 0
306299

307300
# - Archive Recovery -
308-
309301
# These are only used in recovery mode.
310-
311302
postgresql_restore_command: "" # (>= 12)
312303
postgresql_archive_cleanup_command: "" # (>= 12)
313304
postgresql_recovery_end_command: "" # (>= 12)
314305

315306
# - Recovery Target -
316-
317307
# Set these only when performing a targeted recovery.
318-
319308
postgresql_recovery_target: "" # (>= 12)
320309
postgresql_recovery_target_name: "" # (>= 12)
321310
postgresql_recovery_target_time: "" # (>= 12)
@@ -325,15 +314,11 @@ postgresql_recovery_target_inclusive: "" # (>= 12)
325314
postgresql_recovery_target_timeline: "latest" # (>= 12)
326315
postgresql_recovery_target_action: "pause" # (>= 12)
327316

328-
329317
#------------------------------------------------------------------------------
330318
# REPLICATION
331319
#------------------------------------------------------------------------------
332-
333320
# - Sending Servers -
334-
335321
# Set these on the primary and on any standby that will send replication data.
336-
337322
# max number of walsender processes
338323
postgresql_max_wal_senders: 10
339324
postgresql_max_replication_slots: 0 # max number of replication slots
@@ -346,9 +331,7 @@ postgresql_wal_sender_timeout: 60s # in milliseconds; 0 disables (>= 9.3)
346331
postgresql_track_commit_timestamp: off # (>= 9.5)
347332

348333
# - Primary Server -
349-
350334
# These settings are ignored on a standby server.
351-
352335
# standby servers that provide sync rep.
353336
# number of sync standbys (>= 9.6) and comma-separated list of application_name from standby(s)
354337
postgresql_synchronous_standby_names: [] # '*' means 'all'
@@ -358,9 +341,7 @@ postgresql_synchronous_standby_choose_sync: "FIRST" # >= 10
358341
postgresql_vacuum_defer_cleanup_age: 0
359342

360343
# - Standby Servers -
361-
362344
# These settings are ignored on a primary server.
363-
364345
postgresql_primary_conninfo: "" # (>= 12)
365346
postgresql_primary_slot_name: "" # (>= 12)
366347
postgresql_promote_trigger_file: "" # (>= 12)
@@ -382,20 +363,15 @@ postgresql_wal_retrieve_retry_interval: 5s # (>= 9.5)
382363
postgresql_recovery_min_apply_delay: 0 # (>= 12)
383364

384365
# - Subscribers - (>= 10)
385-
386366
# These settings are ignored on a publisher.
387-
388367
postgresql_max_logical_replication_workers: 4 # (>= 10) taken from max_worker_processes
389368
# (change requires restart)
390369
postgresql_max_sync_workers_per_subscription: 2 # (>= 10) taken from max_logical_replication_workers
391370

392-
393371
#------------------------------------------------------------------------------
394372
# QUERY TUNING
395373
#------------------------------------------------------------------------------
396-
397374
# - Planner Method Configuration -
398-
399375
postgresql_enable_async_append: on # (>= 14)
400376
postgresql_enable_bitmapscan: on
401377
postgresql_enable_gathermerge: on # (>= 14)
@@ -418,7 +394,6 @@ postgresql_enable_sort: on
418394
postgresql_enable_tidscan: on
419395

420396
# - Planner Cost Constants -
421-
422397
postgresql_seq_page_cost: 1.0 # measured on an arbitrary scale
423398
postgresql_random_page_cost: 4.0 # same scale as above
424399
postgresql_cpu_tuple_cost: 0.01 # same scale as above
@@ -436,7 +411,6 @@ postgresql_jit_inline_above_cost: 500000 # inline small functions if query
436411
postgresql_jit_optimize_above_cost: 500000 # use expensive JIT optimizations if
437412

438413
# - Genetic Query Optimizer -
439-
440414
postgresql_geqo: on
441415
postgresql_geqo_threshold: 12
442416
postgresql_geqo_effort: 5 # range 1-10
@@ -445,9 +419,7 @@ postgresql_geqo_generations: 0 # selects default based on effort
445419
postgresql_geqo_selection_bias: 2.0 # range 1.5-2.0
446420
postgresql_geqo_seed: 0.0 # range 0.0-1.0
447421

448-
449422
# - Other Planner Options -
450-
451423
postgresql_default_statistics_target: 100 # range 1-10000
452424
postgresql_constraint_exclusion: "partition" # on, off, or partition
453425
postgresql_cursor_tuple_fraction: 0.1 # range 0.0-1.0
@@ -458,13 +430,10 @@ postgresql_force_parallel_mode: off # on, off, regress (>= 9.6 <
458430
postgresql_plan_cache_mode: "auto" # (>= 12)
459431
postgresql_recursive_worktable_factor: 10.0 # (>= 15) range 0.001-1000000
460432

461-
462433
#------------------------------------------------------------------------------
463434
# REPORTING AND LOGGING
464435
#------------------------------------------------------------------------------
465-
466436
# - Where to Log -
467-
468437
# Valid values are combinations of stderr, csvlog, syslog, and eventlog.
469438
# depending on platform. Csvlog requires logging_collector to be on.
470439
postgresql_log_destination: "stderr"
@@ -498,7 +467,6 @@ postgresql_syslog_split_messages: on # (>= 9.6)
498467
# This is only relevant when logging to eventlog (win32) (>= 9.2):
499468
postgresql_event_source: "PostgreSQL"
500469

501-
502470
# - When to Log -
503471

504472
# Values in order of decreasing detail:
@@ -589,14 +557,12 @@ postgresql_log_replication_commands: off
589557
postgresql_log_temp_files: -1
590558
postgresql_log_timezone: "UTC"
591559

592-
593560
#------------------------------------------------------------------------------
594561
# PROCESS TITLE
595562
#------------------------------------------------------------------------------
596563

597564
postgresql_update_process_title: on # (>= 9.2)
598565

599-
600566
#------------------------------------------------------------------------------
601567
# STATISTICS
602568
#------------------------------------------------------------------------------
@@ -612,16 +578,13 @@ postgresql_track_functions: "none" # none, pl, all
612578
postgresql_stats_fetch_consistency: cache # (>= 15)
613579
postgresql_stats_temp_directory: "pg_stat_tmp" # (<= 14)
614580

615-
616581
# - Monitoring -
617-
618582
postgresql_compute_query_id: auto # (>= 14) auto, on, off
619583
postgresql_log_parser_stats: off
620584
postgresql_log_planner_stats: off
621585
postgresql_log_executor_stats: off
622586
postgresql_log_statement_stats: off
623587

624-
625588
#------------------------------------------------------------------------------
626589
# AUTOVACUUM
627590
#------------------------------------------------------------------------------
@@ -653,7 +616,6 @@ postgresql_autovacuum_vacuum_cost_delay: 2ms # (<= 11: 20ms, >=12 2ms)
653616
# default vacuum cost limit for autovacuum,
654617
postgresql_autovacuum_vacuum_cost_limit: -1
655618

656-
657619
#------------------------------------------------------------------------------
658620
# CLIENT CONNECTION DEFAULTS
659621
#------------------------------------------------------------------------------
@@ -746,11 +708,10 @@ postgresql_jit_provider: "llvmjit"
746708
# - Other Defaults -
747709

748710
postgresql_dynamic_library_path: "$libdir"
749-
postgresql_extension_destdir: "" # (>= 14)
711+
postgresql_extension_destdir: "" # (>= 14)
750712

751713
postgresql_gin_fuzzy_search_limit: 0 # (<= 9.2)
752714

753-
754715
#------------------------------------------------------------------------------
755716
# LOCK MANAGEMENT
756717
#------------------------------------------------------------------------------
@@ -768,7 +729,6 @@ postgresql_max_pred_locks_per_relation: -2 # (>= 10) negative values mean
768729
# / -max_pred_locks_per_relation) - 1
769730
postgresql_max_pred_locks_per_page: 2 # (>= 10) min 0
770731

771-
772732
#------------------------------------------------------------------------------
773733
# VERSION AND PLATFORM COMPATIBILITY
774734
#------------------------------------------------------------------------------
@@ -790,7 +750,6 @@ postgresql_sql_inheritance: on # (<= 9.6)
790750

791751
postgresql_transform_null_equals: off
792752

793-
794753
#------------------------------------------------------------------------------
795754
# ERROR HANDLING
796755
#------------------------------------------------------------------------------
@@ -803,7 +762,6 @@ postgresql_restart_after_crash: on
803762
postgresql_data_sync_retry: off
804763
postgresql_recovery_init_sync_method: fsync #(>= 14) fsync, syncfs (Linux 5.8+)
805764

806-
807765
#------------------------------------------------------------------------------
808766
# CONFIG FILE INCLUDES
809767
#------------------------------------------------------------------------------
@@ -816,7 +774,6 @@ postgresql_include_if_exists: false
816774
# include file
817775
postgresql_include: false
818776

819-
820777
#------------------------------------------------------------------------------
821778
# PGTUNE
822779
#------------------------------------------------------------------------------
@@ -829,7 +786,6 @@ postgresql_pgtune_type: "Mixed"
829786
# Maximum number of expected connections, if "no", default based on db type
830787
postgresql_pgtune_connections: no
831788

832-
833789
#------------------------------------------------------------------------------
834790
# INSTALL/REPO
835791
#------------------------------------------------------------------------------

tasks/extensions/dev_headers.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
- restart postgresql
1212

1313
- name: PostgreSQL | Extensions | Make sure the development headers are installed | RedHat
14-
yum:
14+
yum:
1515
name:
1616
- "postgresql{{ postgresql_version_terse }}-libs"
1717
- "postgresql{{ postgresql_version_terse }}-devel"
18-
state: present
18+
state: present
1919
update_cache: yes
2020
when: ansible_pkg_mgr == "yum" and ansible_os_family == "RedHat"
2121
notify:

tasks/extensions/extra_packages.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
repo: "{{ item.value }}"
2121
state: present
2222
loop: "{{ postgresql_ext_extra_packages.apt_repositories | default({}) | dict2items }}"
23-
when:
23+
when:
2424
- postgresql_ext_extra_packages is defined
2525
- ansible_os_family == "Debian"
2626
- name: PostgreSQL | Extensions | Add repos | RHEL
@@ -31,7 +31,7 @@
3131
gpgkey: "{{ item.value.gpgkey }}"
3232
enabled: yes
3333
loop: "{{ postgresql_ext_extra_packages.yum_repositories | default({}) | dict2items }}"
34-
when:
34+
when:
3535
- postgresql_ext_extra_packages is defined
3636
- ansible_os_family == "RedHat"
3737

@@ -42,14 +42,14 @@
4242
state: present
4343
update_cache: yes
4444
cache_valid_time: "{{ apt_cache_valid_time | default (3600) }}"
45-
when:
45+
when:
4646
- postgresql_ext_extra_packages is defined
4747
- ansible_os_family == "Debian"
4848
- name: PostgreSQL | Extensions | Add packages | RHEL
4949
yum:
5050
name: "{{ postgresql_ext_extra_packages.names }}"
5151
state: present
5252
update_cache: yes
53-
when:
53+
when:
5454
- postgresql_ext_extra_packages is defined
5555
- ansible_os_family == "RedHat"

tests/playbook.yml

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77
- ./vars.{{ ansible_distribution }}.{{ ansible_distribution_major_version }}.yml
88
roles:
99
- postgresql
10-

tests/prepare.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@
7272
retries: 30
7373
delay: 5
7474
when: (ansible_distribution == 'Fedora')
75-
changed_when: false
75+
changed_when: false

tests/vars.CentOS.7.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
#--- picking the correct python interpreter
3-
ansible_python_interpreter: "/usr/bin/python"
3+
ansible_python_interpreter: "/usr/bin/python"

tests/vars.CentOS.8.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
#--- picking the correct python interpreter
3-
ansible_python_interpreter: "/usr/bin/python3"
3+
ansible_python_interpreter: "/usr/bin/python3"

tests/vars.Debian.10.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
#--- picking the correct python interpreter
3-
ansible_python_interpreter: "/usr/bin/python3"
3+
ansible_python_interpreter: "/usr/bin/python3"

tests/vars.Debian.9.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
#--- picking the correct python interpreter
3-
ansible_python_interpreter: "/usr/bin/python"
3+
ansible_python_interpreter: "/usr/bin/python"

0 commit comments

Comments
 (0)