taperole 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/README.md +2 -14
  4. data/lib/tape/installer.rb +0 -15
  5. data/roles/nginx/tasks/main.yml +1 -1
  6. data/roles/unicorn_activate/tasks/main.yml +9 -14
  7. data/taperole.gemspec +1 -1
  8. data/templates/base/omnibox.example.yml +1 -1
  9. data/templates/static_html/omnibox.example.yml +1 -1
  10. data/vendor/ANXS.postgresql/.gitignore +9 -0
  11. data/vendor/ANXS.postgresql/.travis.yml +18 -0
  12. data/vendor/ANXS.postgresql/LICENSE +21 -0
  13. data/vendor/ANXS.postgresql/README.md +64 -0
  14. data/vendor/ANXS.postgresql/Vagrantfile +16 -0
  15. data/vendor/ANXS.postgresql/defaults/main.yml +616 -0
  16. data/vendor/ANXS.postgresql/handlers/main.yml +6 -0
  17. data/vendor/ANXS.postgresql/meta/.galaxy_install_info +1 -0
  18. data/vendor/ANXS.postgresql/meta/main.yml +17 -0
  19. data/vendor/ANXS.postgresql/tasks/configure.yml +58 -0
  20. data/vendor/ANXS.postgresql/tasks/databases.yml +67 -0
  21. data/vendor/ANXS.postgresql/tasks/extensions/contrib.yml +11 -0
  22. data/vendor/ANXS.postgresql/tasks/extensions/dev_headers.yml +10 -0
  23. data/vendor/ANXS.postgresql/tasks/extensions/postgis.yml +14 -0
  24. data/vendor/ANXS.postgresql/tasks/extensions.yml +8 -0
  25. data/vendor/ANXS.postgresql/tasks/install.yml +34 -0
  26. data/vendor/ANXS.postgresql/tasks/main.yml +23 -0
  27. data/vendor/ANXS.postgresql/tasks/monit.yml +6 -0
  28. data/vendor/ANXS.postgresql/tasks/users.yml +18 -0
  29. data/vendor/ANXS.postgresql/tasks/users_privileges.yml +16 -0
  30. data/vendor/ANXS.postgresql/templates/etc_monit_conf.d_postgresql.j2 +6 -0
  31. data/vendor/ANXS.postgresql/templates/pg_hba.conf.j2 +39 -0
  32. data/vendor/ANXS.postgresql/templates/postgresql.conf.j2 +446 -0
  33. data/vendor/ANXS.postgresql/test.yml +8 -0
  34. data/vendor/ANXS.postgresql/vagrant-inventory +2 -0
  35. data/vendor/ANXS.postgresql/vars/test.yml +10 -0
  36. data/vendor/bennojoy.memcached/README.md +49 -0
  37. data/vendor/bennojoy.memcached/defaults/main.yml +8 -0
  38. data/vendor/bennojoy.memcached/handlers/main.yml +3 -0
  39. data/vendor/bennojoy.memcached/meta/.galaxy_install_info +1 -0
  40. data/vendor/bennojoy.memcached/meta/main.yml +26 -0
  41. data/vendor/bennojoy.memcached/tasks/main.yml +30 -0
  42. data/vendor/bennojoy.memcached/templates/memcached_debian.j2 +49 -0
  43. data/vendor/bennojoy.memcached/templates/memcached_redhat.j2 +5 -0
  44. data/vendor/bennojoy.memcached/vars/main.yml +14 -0
  45. data/vendor/jnv.unattended-upgrades/.gitignore +1 -0
  46. data/vendor/jnv.unattended-upgrades/.travis.yml +20 -0
  47. data/vendor/jnv.unattended-upgrades/LICENSE +339 -0
  48. data/vendor/jnv.unattended-upgrades/README.md +105 -0
  49. data/vendor/jnv.unattended-upgrades/Vagrantfile +22 -0
  50. data/vendor/jnv.unattended-upgrades/ansible.cfg +3 -0
  51. data/vendor/jnv.unattended-upgrades/defaults/main.yml +55 -0
  52. data/vendor/jnv.unattended-upgrades/files/auto-upgrades +4 -0
  53. data/vendor/jnv.unattended-upgrades/handlers/main.yml +2 -0
  54. data/vendor/jnv.unattended-upgrades/meta/.galaxy_install_info +1 -0
  55. data/vendor/jnv.unattended-upgrades/meta/main.yml +38 -0
  56. data/vendor/jnv.unattended-upgrades/role.yml +4 -0
  57. data/vendor/jnv.unattended-upgrades/tasks/main.yml +19 -0
  58. data/vendor/jnv.unattended-upgrades/templates/unattended-upgrades.j2 +78 -0
  59. data/vendor/jnv.unattended-upgrades/vars/Debian.yml +3 -0
  60. data/vendor/jnv.unattended-upgrades/vars/Ubuntu.yml +3 -0
  61. data/vendor/leonelgalan.node/.gitignore +2 -0
  62. data/vendor/leonelgalan.node/.travis.yml +13 -0
  63. data/vendor/leonelgalan.node/LICENSE +21 -0
  64. data/vendor/leonelgalan.node/README.md +50 -0
  65. data/vendor/leonelgalan.node/Vagrantfile +16 -0
  66. data/vendor/leonelgalan.node/defaults/main.yml +2 -0
  67. data/vendor/leonelgalan.node/handlers/main.yml +2 -0
  68. data/vendor/leonelgalan.node/meta/.galaxy_install_info +1 -0
  69. data/vendor/leonelgalan.node/meta/main.yml +21 -0
  70. data/vendor/leonelgalan.node/requirements.yml +3 -0
  71. data/vendor/leonelgalan.node/site.yml +8 -0
  72. data/vendor/leonelgalan.node/tasks/main.yml +35 -0
  73. data/vendor/leonelgalan.node/vars/main.yml +2 -0
  74. data/vendor/lxhunter.apt/.gitignore +41 -0
  75. data/vendor/lxhunter.apt/.travis.yml +12 -0
  76. data/vendor/lxhunter.apt/README.md +105 -0
  77. data/vendor/lxhunter.apt/Vagrantfile +16 -0
  78. data/vendor/lxhunter.apt/defaults/main.yml +7 -0
  79. data/vendor/lxhunter.apt/meta/.galaxy_install_info +1 -0
  80. data/vendor/lxhunter.apt/meta/main.yml +13 -0
  81. data/vendor/lxhunter.apt/tasks/main.yml +38 -0
  82. data/vendor/lxhunter.apt/templates/apt_10general.j2 +4 -0
  83. data/vendor/lxhunter.apt/test.yml +5 -0
  84. data/vendor/nodesource.node/Dockerfile +16 -0
  85. data/vendor/nodesource.node/LICENSE.md +11 -0
  86. data/vendor/nodesource.node/README.md +46 -0
  87. data/vendor/nodesource.node/defaults/main.yml +3 -0
  88. data/vendor/nodesource.node/handlers/main.yml +2 -0
  89. data/vendor/nodesource.node/meta/.galaxy_install_info +1 -0
  90. data/vendor/nodesource.node/meta/main.yml +18 -0
  91. data/vendor/nodesource.node/role.yml +6 -0
  92. data/vendor/nodesource.node/tasks/main.yml +26 -0
  93. data/vendor/nodesource.node/templates/etc/apt/preferences.d/deb_nodesource_com_node.pref.2 +5 -0
  94. data/vendor/nodesource.node/tests/localhosts +2 -0
  95. data/vendor/nodesource.node/vars/main.yml +2 -0
  96. data/vendor/zzet.rbenv/.kitchen.yml +40 -0
  97. data/vendor/zzet.rbenv/.travis.yml +12 -0
  98. data/vendor/zzet.rbenv/README.md +100 -0
  99. data/vendor/zzet.rbenv/defaults/main.yml +20 -0
  100. data/vendor/zzet.rbenv/files/default-gems +1 -0
  101. data/vendor/zzet.rbenv/files/gemrc +4 -0
  102. data/vendor/zzet.rbenv/files/vars +1 -0
  103. data/vendor/zzet.rbenv/handlers/main.yml +5 -0
  104. data/vendor/zzet.rbenv/meta/.galaxy_install_info +1 -0
  105. data/vendor/zzet.rbenv/meta/main.yml +27 -0
  106. data/vendor/zzet.rbenv/role.yml +10 -0
  107. data/vendor/zzet.rbenv/tasks/apt_build_depends.yml +15 -0
  108. data/vendor/zzet.rbenv/tasks/homebrew_build_depends.yml +10 -0
  109. data/vendor/zzet.rbenv/tasks/main.yml +192 -0
  110. data/vendor/zzet.rbenv/tasks/pacman_build_depends.yml +2 -0
  111. data/vendor/zzet.rbenv/tasks/yum_build_depends.yml +15 -0
  112. data/vendor/zzet.rbenv/templates/rbenv.sh.j2 +11 -0
  113. data/vendor/zzet.rbenv/test/integration/default/serverspec/rbenv_spec.rb +26 -0
  114. data/vendor/zzet.rbenv/test/integration/helpers/serverspec/spec_helper.rb +10 -0
  115. data/vendor/zzet.rbenv/test/integration/site.yml +8 -0
  116. data/vendor/zzet.rbenv/vars/main.yml +1 -0
  117. data/vendor/zzet.rbenv/vars/system.yml +2 -0
  118. data/vendor/zzet.rbenv/vars/user.yml +2 -0
  119. metadata +111 -2
@@ -0,0 +1,616 @@
1
+ # file: postgresql/defaults/main.yml
2
+
3
+ # Basic settings
4
+ postgresql_version: 9.3
5
+ postgresql_encoding: 'UTF-8'
6
+ postgresql_locale: 'en_US.UTF-8'
7
+
8
+ postgresql_admin_user: "postgres"
9
+ postgresql_default_auth_method: "trust"
10
+
11
+ # The user/group that will run postgresql process or service
12
+ postgresql_service_user: "{{ postgresql_admin_user }}"
13
+ postgresql_service_group: "{{ postgresql_admin_user }}"
14
+
15
+ postgresql_cluster_name: "main"
16
+ postgresql_cluster_reset: false
17
+
18
+ postgresql_database_owner: "{{ postgresql_admin_user }}"
19
+ # Extensions
20
+ postgresql_ext_install_contrib: no
21
+ postgresql_ext_install_dev_headers: no
22
+ postgresql_ext_install_postgis: no
23
+
24
+ postgresql_ext_postgis_version: "2.1" # be careful: check whether the postgresql/postgis versions work together
25
+
26
+ # List of databases to be created (optional)
27
+ postgresql_databases: []
28
+
29
+ # List of users to be created (optional)
30
+ postgresql_users: []
31
+
32
+ # List of user privileges to be applied (optional)
33
+ postgresql_user_privileges: []
34
+
35
+ # pg_hba.conf
36
+ postgresql_pg_hba_default:
37
+ - { type: local, database: all, user: '{{ postgresql_admin_user }}', address: '', method: '{{ postgresql_default_auth_method }}', comment: '' }
38
+ - { type: local, database: all, user: all, address: '', method: '{{ postgresql_default_auth_method }}', comment: '"local" is for Unix domain socket connections only' }
39
+ - { type: host, database: all, user: all, address: '127.0.0.1/32', method: '{{ postgresql_default_auth_method }}', comment: 'IPv4 local connections:' }
40
+ - { type: host, database: all, user: all, address: '::1/128', method: '{{ postgresql_default_auth_method }}', comment: 'IPv6 local connections:' }
41
+
42
+ postgresql_pg_hba_passwd_hosts: []
43
+ postgresql_pg_hba_trust_hosts: []
44
+ postgresql_pg_hba_custom: []
45
+
46
+
47
+ # postgresql.conf
48
+
49
+ #------------------------------------------------------------------------------
50
+ # FILE LOCATIONS
51
+ #------------------------------------------------------------------------------
52
+
53
+ # Location of postgres configuration files here
54
+ postgresql_conf_directory: "/etc/postgresql/{{postgresql_version}}/{{postgresql_cluster_name}}"
55
+ # HBA (Host Based Authentication) file
56
+ postgresql_hba_file: "{{postgresql_conf_directory}}/pg_hba.conf"
57
+ # Ident configuration file
58
+ postgresql_ident_file: "{{postgresql_conf_directory}}/pg_ident.conf"
59
+ # Use data in another directory
60
+ postgresql_data_directory: "/var/lib/postgresql/{{postgresql_version}}/{{postgresql_cluster_name}}"
61
+ # If external_pid_file is not explicitly set, on extra PID file is written
62
+ postgresql_external_pid_file: "/var/run/postgresql/{{postgresql_version}}-{{postgresql_cluster_name}}.pid"
63
+
64
+ #------------------------------------------------------------------------------
65
+ # CONNECTIONS AND AUTHENTICATION
66
+ #------------------------------------------------------------------------------
67
+
68
+ postgresql_listen_addresses:
69
+ - localhost
70
+ postgresql_port: 5432
71
+
72
+ postgresql_max_connections: 100
73
+ postgresql_superuser_reserved_connections: 3
74
+
75
+ postgresql_unix_socket_directories:
76
+ - /var/run/postgresql
77
+ postgresql_unix_socket_group: ''
78
+ postgresql_unix_socket_permissions: '0777' # begin with 0 to use octal notation
79
+
80
+ # Automatic pg_ctl configuration. Specify a list of options containing
81
+ # cluster specific options to be passed to pg_ctl(1).
82
+ postgresql_pg_ctl_options: []
83
+
84
+ postgresql_bonjour: off # advertise server via Bonjour
85
+ postgresql_bonjour_name: '' # defaults to the computer name
86
+
87
+
88
+ # - Security and Authentication -
89
+
90
+ postgresql_authentication_timeout: 60s
91
+ postgresql_ssl: off
92
+ postgresql_ssl_ciphers:
93
+ - 'DEFAULT'
94
+ - '!LOW'
95
+ - '!EXP'
96
+ - '!MD5'
97
+ - '@STRENGTH'
98
+ postgresql_ssl_renegotiation_limit: 512MB # amount of data between renegotiations
99
+ postgresql_ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
100
+ postgresql_ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
101
+ postgresql_ssl_ca_file: ''
102
+ postgresql_ssl_crl_file: ''
103
+ postgresql_password_encryption: on
104
+ postgresql_db_user_namespace: off
105
+
106
+ # Kerberos and GSSAPI
107
+ postgresql_krb_server_keyfile: ''
108
+ postgresql_krb_srvname: postgres
109
+ postgresql_krb_caseins_users: off
110
+
111
+ # TCP Keepalives, 0 selects the system default (in seconds)
112
+ postgresql_tcp_keepalives_idle: 0
113
+ postgresql_tcp_keepalives_interval: 0
114
+ postgresql_tcp_keepalives_count: 0
115
+
116
+
117
+ #------------------------------------------------------------------------------
118
+ # RESOURCE USAGE (except WAL)
119
+ #------------------------------------------------------------------------------
120
+
121
+ # - Memory -
122
+
123
+ postgresql_shared_buffers: 128MB # min 128kB
124
+ postgresql_temp_buffers: 8MB # min 800kB
125
+
126
+ # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
127
+ # per transaction slot, plus lock space (see max_locks_per_transaction).
128
+ # It is not advisable to set max_prepared_transactions nonzero unless you
129
+ # actively intend to use prepared transactions.
130
+ postgresql_max_prepared_transactions: 0 # zero disables the feature
131
+
132
+ postgresql_work_mem: 1MB # min 64kB
133
+ postgresql_maintenance_work_mem: 16MB # min 1MB
134
+ postgresql_max_stack_depth: 2MB # min 100kB
135
+
136
+
137
+ # - Disk -
138
+
139
+ # limits per-session temp file space in kB, or -1 for no limit
140
+ postgresql_temp_file_limit: -1
141
+
142
+
143
+ # - Kernel Resource Usage -
144
+
145
+ postgresql_max_files_per_process: 1000 # min 25
146
+ postgresql_shared_preload_libraries: []
147
+
148
+
149
+ # - Cost-Based Vacuum Delay -
150
+
151
+ postgresql_vacuum_cost_delay: 0 # 0-100 milliseconds
152
+ postgresql_vacuum_cost_page_hit: 1 # 0-10000 credits
153
+ postgresql_vacuum_cost_page_miss: 10 # 0-10000 credits
154
+ postgresql_vacuum_cost_page_dirty: 20 # 0-10000 credits
155
+ postgresql_vacuum_cost_limit: 200 # 1-10000 credits
156
+
157
+
158
+ # - Background Writer -
159
+
160
+ postgresql_bgwriter_delay: 200ms # 10-10000ms between rounds
161
+ postgresql_bgwriter_lru_maxpages: 100 # 0-1000 max buffers written/round
162
+ postgresql_bgwriter_lru_multiplier: 2.0 # 0-10.0 multipler on buffers scanned/round
163
+
164
+
165
+ # - Asynchronous Behavior -
166
+
167
+ postgresql_effective_io_concurrency: 1 # 1-1000; 0 disables prefetching
168
+
169
+
170
+ #------------------------------------------------------------------------------
171
+ # WRITE AHEAD LOG
172
+ #------------------------------------------------------------------------------
173
+
174
+ # - Settings -
175
+
176
+ postgresql_wal_level: minimal # minimal, archive, or hot_standby
177
+ postgresql_fsync: on # turns forced synchronization on or off
178
+
179
+ # Synchronization level:
180
+ # - off
181
+ # - local
182
+ # - remote_write
183
+ # - on
184
+ postgresql_synchronous_commit: on
185
+
186
+ # The default is the first option supported by the operating system:
187
+ # - open_datasync
188
+ # - fdatasync (default on Linux)
189
+ # - fsync
190
+ # - fsync_writethrough
191
+ # - open_sync
192
+ postgresql_wal_sync_method: fsync
193
+
194
+ # recover from partial page writes
195
+ postgresql_full_page_writes: on
196
+
197
+ postgresql_wal_buffers: -1 # min 32kB, -1 sets based on shared_buffers
198
+ postgresql_wal_writer_delay: 200ms # 1-10000 milliseconds
199
+ postgresql_commit_delay: 0 # range 0-100000, in microseconds
200
+ postgresql_commit_siblings: 5 # range 1-1000
201
+
202
+
203
+ # - Checkpoints -
204
+
205
+ postgresql_checkpoint_segments: 3 # in logfile segments, min 1, 16MB each
206
+ postgresql_checkpoint_timeout: 5min # range 30s-1h
207
+ postgresql_checkpoint_completion_target: 0.5 # checkpoint target duration, 0.0 - 1.0
208
+ postgresql_checkpoint_warning: 30s # 0 disables
209
+
210
+
211
+ # - Archiving -
212
+
213
+ # allows archiving to be done
214
+ postgresql_archive_mode: off
215
+
216
+ # Command to use to archive a logfile segment.
217
+ # Placeholders: %p = path of file to archive
218
+ # %f = file name only
219
+ # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
220
+ postgresql_archive_command: ''
221
+
222
+ # force a logfile segment switch after this
223
+ postgresql_archive_timeout: 0
224
+
225
+
226
+ #------------------------------------------------------------------------------
227
+ # REPLICATION
228
+ #------------------------------------------------------------------------------
229
+
230
+ # - Sending Server(s) -
231
+
232
+ # Set these on the master and on any standby that will send replication data.
233
+
234
+ # max number of walsender processes
235
+ postgresql_max_wal_senders: 0
236
+
237
+ postgresql_wal_keep_segments: 0 # in logfile segments, 16MB each; 0 disables
238
+ postgresql_wal_sender_timeout: 60s # in milliseconds; 0 disables
239
+
240
+
241
+ # - Master Server -
242
+
243
+ # These settings are ignored on a standby server.
244
+
245
+ # Standby servers that provide sync rep.
246
+ # Comma-separated list of application_name from standby(s)
247
+ postgresql_synchronous_standby_names: [] # '*' means 'all'
248
+
249
+ # number of xacts by which cleanup is delayed
250
+ postgresql_vacuum_defer_cleanup_age: 0
251
+
252
+
253
+ # - Standby Servers -
254
+
255
+ # "on" allows queries during recovery
256
+ postgresql_hot_standby: off
257
+ # max delay before canceling queries when reading WAL from archive
258
+ postgresql_max_standby_archive_delay: 30s # -1 allows indefinite delay
259
+ # max delay before canceling queries when reading streaming WAL;
260
+ postgresql_max_standby_streaming_delay: 30s # -1 allows indefinite delay
261
+ # send replies at least this often
262
+ postgresql_wal_receiver_status_interval: 10s # 0 disables
263
+ # send info from standby to prevent query conflicts
264
+ postgresql_hot_standby_feedback: off
265
+ #time that receiver waits for communication from master in milliseconds
266
+ postgresql_wal_receiver_timeout: 60s
267
+
268
+
269
+ #------------------------------------------------------------------------------
270
+ # QUERY TUNING
271
+ #------------------------------------------------------------------------------
272
+
273
+ # - Planner Method Configuration -
274
+
275
+ postgresql_enable_bitmapscan: on
276
+ postgresql_enable_hashagg: on
277
+ postgresql_enable_hashjoin: on
278
+ postgresql_enable_indexscan: on
279
+ postgresql_enable_indexonlyscan: on
280
+ postgresql_enable_material: on
281
+ postgresql_enable_mergejoin: on
282
+ postgresql_enable_nestloop: on
283
+ postgresql_enable_seqscan: on
284
+ postgresql_enable_sort: on
285
+ postgresql_enable_tidscan: on
286
+
287
+
288
+ # - Planner Cost Constants -
289
+
290
+ postgresql_seq_page_cost: 1.0 # measured on an arbitrary scale
291
+ postgresql_random_page_cost: 4.0 # same scale as above
292
+ postgresql_cpu_tuple_cost: 0.01 # same scale as above
293
+ postgresql_cpu_index_tuple_cost: 0.005 # same scale as above
294
+ postgresql_cpu_operator_cost: 0.0025 # same scale as above
295
+ postgresql_effective_cache_size: 128MB
296
+
297
+
298
+ # - Genetic Query Optimizer -
299
+
300
+ postgresql_geqo: on
301
+ postgresql_geqo_threshold: 12
302
+ postgresql_geqo_effort: 5 # range 1-10
303
+ postgresql_geqo_pool_size: 0 # selects default based on effort
304
+ postgresql_geqo_generations: 0 # selects default based on effort
305
+ postgresql_geqo_selection_bias: 2.0 # range 1.5-2.0
306
+ postgresql_geqo_seed: 0.0 # range 0.0-1.0
307
+
308
+
309
+ # - Other Planner Options -
310
+
311
+ postgresql_default_statistics_target: 100 # range 1-10000
312
+ postgresql_constraint_exclusion: partition # on, off, or partition
313
+ postgresql_cursor_tuple_fraction: 0.1 # range 0.0-1.0
314
+ postgresql_from_collapse_limit: 8
315
+ postgresql_join_collapse_limit: 8 # 1 disables collapsing of explicit
316
+
317
+
318
+ #------------------------------------------------------------------------------
319
+ # ERROR REPORTING AND LOGGING
320
+ #------------------------------------------------------------------------------
321
+
322
+ # - Where to Log -
323
+
324
+ # Valid values are combinations of stderr, csvlog, syslog, and eventlog.
325
+ # depending on platform. Csvlog requires logging_collector to be on.
326
+ postgresql_log_destination: stderr
327
+
328
+ # Enable capturing of stderr and csvlog into log files.
329
+ # Required to be on for csvlogs.
330
+ postgresql_logging_collector: off
331
+
332
+ # These are only used if logging_collector is on:
333
+
334
+ # Directory where log files are written, can be absolute or relative to PGDATA
335
+ postgresql_log_directory: pg_log
336
+ # Log file name pattern, can include strftime() escapes
337
+ postgresql_log_filename: postgresql-%Y-%m-%d_%H%M%S.log
338
+ postgresql_log_file_mode: '0600' # begin with 0 to use octal notation
339
+ # If on, an existing log file with the same name as the new log file will be
340
+ # truncated rather than appended to. But such truncation only occurs on
341
+ # time-driven rotation, not on restarts or size-driven rotation. Default is
342
+ # off, meaning append to existing files in all cases.
343
+ postgresql_log_truncate_on_rotation: off
344
+ # Automatic rotation of logfiles will happen after that time.
345
+ postgresql_log_rotation_age: 1d
346
+ # Automatic rotation of logfiles will happen after that much log output.
347
+ postgresql_log_rotation_size: 10MB
348
+
349
+ # These are relevant when logging to syslog:
350
+ postgresql_syslog_facility: LOCAL0
351
+ postgresql_syslog_ident: postgres
352
+ # This is only relevant when logging to eventlog (win32):
353
+ postgresql_event_source: PostgreSQL
354
+
355
+
356
+ # - When to Log -
357
+
358
+ # Values in order of decreasing detail:
359
+ # - debug5
360
+ # - debug4
361
+ # - debug3
362
+ # - debug2
363
+ # - debug1
364
+ # - log
365
+ # - notice
366
+ # - warning
367
+ # - error
368
+ postgresql_client_min_messages: notice
369
+
370
+ # Values in order of decreasing detail:
371
+ # - debug5
372
+ # - debug4
373
+ # - debug3
374
+ # - debug2
375
+ # - debug1
376
+ # - info
377
+ # - notice
378
+ # - warning
379
+ # - error
380
+ # - log
381
+ # - fatal
382
+ # - panic
383
+ postgresql_log_min_messages: warning
384
+
385
+ # Values in order of decreasing detail:
386
+ # - debug5
387
+ # - debug4
388
+ # - debug3
389
+ # - debug2
390
+ # - debug1
391
+ # - info
392
+ # - notice
393
+ # - warning
394
+ # - error
395
+ # - log
396
+ # - fatal
397
+ # - panic (effectively off)
398
+ postgresql_log_min_error_statement: error
399
+
400
+ # -1 is disabled, 0 logs all statements and their durations, > 0 logs only
401
+ # statements running at least this number of milliseconds
402
+ postgresql_log_min_duration_statement: -1
403
+
404
+
405
+ # - What to Log -
406
+
407
+ postgresql_debug_print_parse: off
408
+ postgresql_debug_print_rewritten: off
409
+ postgresql_debug_print_plan: off
410
+ postgresql_debug_pretty_print: on
411
+ postgresql_log_checkpoints: off
412
+ postgresql_log_connections: off
413
+ postgresql_log_disconnections: off
414
+ postgresql_log_duration: off
415
+ postgresql_log_error_verbosity: default # terse, default, or verbose messages
416
+ postgresql_log_hostname: off
417
+
418
+ # Special values:
419
+ # %a = application name
420
+ # %u = user name
421
+ # %d = database name
422
+ # %r = remote host and port
423
+ # %h = remote host
424
+ # %p = process ID
425
+ # %t = timestamp without milliseconds
426
+ # %m = timestamp with milliseconds
427
+ # %i = command tag
428
+ # %e = SQL state
429
+ # %c = session ID
430
+ # %l = session line number
431
+ # %s = sessioan start timestamp
432
+ # %v = virtual transaction ID
433
+ # %x = transaction ID (0 if none)
434
+ # %q = stop here in non-session
435
+ # processes
436
+ # %% = '%'
437
+ postgresql_log_line_prefix: '%t '
438
+
439
+ # log lock waits >= deadlock_timeout
440
+ postgresql_log_lock_waits: off
441
+ postgresql_log_statement: none # none, ddl, mod, all
442
+ # log temporary files equal or larger
443
+ postgresql_log_temp_files: -1
444
+ postgresql_log_timezone: UTC
445
+
446
+
447
+ #------------------------------------------------------------------------------
448
+ # RUNTIME STATISTICS
449
+ #------------------------------------------------------------------------------
450
+
451
+ # - Query/Index Statistics Collector -
452
+
453
+ postgresql_track_activities: on
454
+ postgresql_track_counts: on
455
+ postgresql_track_io_timing: off
456
+ postgresql_track_functions: none # none, pl, all
457
+ postgresql_track_activity_query_size: 1024
458
+ postgresql_update_process_title: on
459
+ postgresql_stats_temp_directory: pg_stat_tmp
460
+
461
+
462
+ # - Statistics Monitoring -
463
+
464
+ postgresql_log_parser_stats: off
465
+ postgresql_log_planner_stats: off
466
+ postgresql_log_executor_stats: off
467
+ postgresql_log_statement_stats: off
468
+
469
+
470
+ #------------------------------------------------------------------------------
471
+ # AUTOVACUUM PARAMETERS
472
+ #------------------------------------------------------------------------------
473
+
474
+ # Enable autovacuum subprocess? 'on' requires track_counts to also be on.
475
+ postgresql_autovacuum: on
476
+ # -1 disables, 0 logs all actions and their durations, > 0 logs only
477
+ # actions running at least this number of milliseconds.
478
+ postgresql_log_autovacuum_min_duration: -1
479
+ # max number of autovacuum subprocesses
480
+ postgresql_autovacuum_max_workers: 3
481
+ # time between autovacuum runs
482
+ postgresql_autovacuum_naptime: 1min
483
+ # min number of row updates before vacuum
484
+ postgresql_autovacuum_vacuum_threshold: 50
485
+ # min number of row updates before analyze
486
+ postgresql_autovacuum_analyze_threshold: 50
487
+ # fraction of table size before vacuum
488
+ postgresql_autovacuum_vacuum_scale_factor: 0.2
489
+ # fraction of table size before analyze
490
+ postgresql_autovacuum_analyze_scale_factor: 0.1
491
+ # maximum XID age before forced vacuum
492
+ postgresql_autovacuum_freeze_max_age: 200000000
493
+ # default vacuum cost delay for autovacuum, in milliseconds
494
+ postgresql_autovacuum_vacuum_cost_delay: 20ms
495
+ # default vacuum cost limit for autovacuum,
496
+ postgresql_autovacuum_vacuum_cost_limit: -1
497
+
498
+
499
+ #------------------------------------------------------------------------------
500
+ # CLIENT CONNECTION DEFAULTS
501
+ #------------------------------------------------------------------------------
502
+
503
+ # - Statement Behavior -
504
+
505
+ postgresql_search_path: # schema names
506
+ - '"$user"'
507
+ - public
508
+ postgresql_default_tablespace: '' # a tablespace name, '' uses the default
509
+ postgresql_temp_tablespaces: [] # a list of tablespace names
510
+
511
+ postgresql_check_function_bodies: on
512
+ postgresql_default_transaction_isolation: read committed
513
+ postgresql_default_transaction_read_only: off
514
+ postgresql_default_transaction_deferrable: off
515
+ postgresql_session_replication_role: origin
516
+
517
+ postgresql_statement_timeout: 0 # in milliseconds, 0 is disabled
518
+ postgresql_lock_timeout: 0 # in milliseconds, 0 is disabled
519
+ postgresql_vacuum_freeze_min_age: 50000000
520
+ postgresql_vacuum_freeze_table_age: 150000000
521
+
522
+ postgresql_bytea_output: hex # hex, escape
523
+ postgresql_xmlbinary: base64
524
+ postgresql_xmloption: content
525
+
526
+
527
+ # - Locale and Formatting -
528
+
529
+ postgresql_datestyle:
530
+ - iso
531
+ - mdy
532
+ postgresql_intervalstyle: postgres
533
+ postgresql_timezone: UTC
534
+
535
+ # Select the set of available time zone abbreviations. Currently, there are:
536
+ # Default
537
+ # Australia
538
+ # India
539
+ # You can create your own file in `share/timezonesets/`.
540
+ postgresql_timezone_abbreviations: Default
541
+
542
+ postgresql_extra_float_digits: 0 # min -15, max 3
543
+ postgresql_client_encoding: sql_ascii # 'sql_ascii' actually defaults to database encoding
544
+
545
+ # These settings are initialized by initdb, but they can be changed.
546
+
547
+ # locale for system error message
548
+ postgresql_lc_messages: en_US.UTF-8
549
+ # locale for monetary formatting
550
+ postgresql_lc_monetary: en_US.UTF-8
551
+ # locale for number formatting
552
+ postgresql_lc_numeric: en_US.UTF-8
553
+ # locale for time formatting
554
+ postgresql_lc_time: en_US.UTF-8
555
+
556
+ postgresql_default_text_search_config: pg_catalog.english
557
+
558
+ postgresql_dynamic_library_path: '$libdir'
559
+ postgresql_local_preload_libraries: []
560
+
561
+
562
+ #------------------------------------------------------------------------------
563
+ # LOCK MANAGEMENT
564
+ #------------------------------------------------------------------------------
565
+
566
+ postgresql_deadlock_timeout: 1s
567
+ postgresql_max_locks_per_transaction: 64 # min 10
568
+
569
+ # Note: Each lock table slot uses ~270 bytes of shared memory, and there are
570
+ # max_locks_per_transaction * (max_connections + max_prepared_transactions)
571
+ # lock table slots.
572
+ postgresql_max_pred_locks_per_transaction: 64 # min 10
573
+
574
+
575
+ #------------------------------------------------------------------------------
576
+ # VERSION/PLATFORM COMPATIBILITY
577
+ #------------------------------------------------------------------------------
578
+
579
+ # - Previous PostgreSQL Versions -
580
+
581
+ postgresql_array_nulls: on
582
+ postgresql_backslash_quote: safe_encoding # on, off, or safe_encoding
583
+ postgresql_default_with_oids: off
584
+ postgresql_escape_string_warning: on
585
+ postgresql_lo_compat_privileges: off
586
+ postgresql_quote_all_identifiers: off
587
+ postgresql_sql_inheritance: on
588
+ postgresql_standard_conforming_strings: on
589
+ postgresql_synchronize_seqscans: on
590
+
591
+
592
+ # - Other Platforms and Clients -
593
+
594
+ postgresql_transform_null_equals: off
595
+
596
+
597
+ #------------------------------------------------------------------------------
598
+ # ERROR HANDLING
599
+ #------------------------------------------------------------------------------
600
+
601
+ # Terminate session on any error?
602
+ postgresql_exit_on_error: off
603
+ # Reinitialize after backend crash?
604
+ postgresql_restart_after_crash: on
605
+
606
+
607
+
608
+
609
+ postgresql_env:
610
+ LC_ALL: "{{ postgresql_locale }}"
611
+ LC_LCTYPE: "{{ postgresql_locale }}"
612
+
613
+ # APT settings
614
+ postgresql_apt_key_id: ACCC4CF8
615
+ postgresql_apt_key_url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc"
616
+ postgresql_apt_repository: 'deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main'
@@ -0,0 +1,6 @@
1
+ # file: postgresql/handlers/main.yml
2
+
3
+ - name: restart postgresql
4
+ service:
5
+ name: postgresql
6
+ state: restarted
@@ -0,0 +1 @@
1
+ {install_date: 'Fri Mar 20 18:33:16 2015', version: ''}
@@ -0,0 +1,17 @@
1
+ # file: postgresql/meta/main.yml
2
+
3
+ galaxy_info:
4
+ author: pjan vandaele
5
+ company: ANXS
6
+ description: "Install and configure PostgreSQL, dependencies, extensions, databases and users."
7
+ min_ansible_version: 1.6
8
+ license: MIT
9
+ platforms:
10
+ - name: Ubuntu
11
+ versions:
12
+ - all
13
+ categories:
14
+ - database
15
+ - database:sql
16
+
17
+ dependencies: []
@@ -0,0 +1,58 @@
1
+ # file: postgresql/tasks/configure.yml
2
+
3
+ - name: PostgreSQL | Make sure the postgres data directory exists
4
+ file:
5
+ path: "{{postgresql_data_directory}}"
6
+ owner: "{{ postgresql_service_user }}"
7
+ group: "{{ postgresql_service_group }}"
8
+ state: directory
9
+ mode: 0700
10
+ register: pgdata_dir_exist
11
+
12
+ - name: PostgreSQL | Ensure the locale is generated
13
+ sudo: yes
14
+ locale_gen: name={{postgresql_locale}} state=present
15
+
16
+ - name: PostgreSQL | Reset the cluster - drop the existing one
17
+ shell: pg_dropcluster --stop {{postgresql_version}} {{postgresql_cluster_name}}
18
+ sudo: yes
19
+ sudo_user: "{{ postgresql_service_user }}"
20
+ when: postgresql_cluster_reset and pgdata_dir_exist.changed
21
+
22
+ - name: PostgreSQL | Reset the cluster - create a new one (with specified encoding and locale)
23
+ shell: pg_createcluster --start --locale {{postgresql_locale}} -e {{postgresql_encoding}} -d {{postgresql_data_directory}} {{postgresql_version}} {{postgresql_cluster_name}}
24
+ sudo: yes
25
+ sudo_user: "{{ postgresql_service_user }}"
26
+ when: postgresql_cluster_reset and pgdata_dir_exist.changed
27
+
28
+ - name: PostgreSQL | Update configuration - pt. 1 (pg_hba.conf)
29
+ template:
30
+ src: pg_hba.conf.j2
31
+ dest: "{{postgresql_conf_directory}}/pg_hba.conf"
32
+ owner: "{{ postgresql_service_user }}"
33
+ group: "{{ postgresql_service_group }}"
34
+ mode: 0640
35
+ register: postgresql_configuration_pt1
36
+
37
+ - name: PostgreSQL | Update configuration - pt. 2 (postgresql.conf)
38
+ template:
39
+ src: postgresql.conf.j2
40
+ dest: "{{postgresql_conf_directory}}/postgresql.conf"
41
+ owner: "{{ postgresql_service_user }}"
42
+ group: "{{ postgresql_service_group }}"
43
+ mode: 0640
44
+ register: postgresql_configuration_pt2
45
+
46
+ - name: PostgreSQL | Create folder for additional configuration files
47
+ file:
48
+ name: "{{postgresql_conf_directory}}/conf.d"
49
+ state: directory
50
+ owner: "{{ postgresql_service_user }}"
51
+ group: "{{ postgresql_service_group }}"
52
+ mode: 0755
53
+
54
+ - name: PostgreSQL | Restart PostgreSQL
55
+ service:
56
+ name: postgresql
57
+ state: restarted
58
+ when: postgresql_configuration_pt1.changed or postgresql_configuration_pt2.changed