safeguard-devise 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. checksums.yaml +15 -0
  2. data/.vagrant/machines/default/virtualbox/action_provision +1 -0
  3. data/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  4. data/.vagrant/machines/default/virtualbox/id +1 -0
  5. data/Gemfile +25 -0
  6. data/Gemfile.lock +186 -0
  7. data/Rakefile +51 -0
  8. data/VERSION +1 -0
  9. data/Vagrantfile +128 -0
  10. data/app/controllers/devise/devise_safeguard_controller.rb +56 -0
  11. data/app/views/devise/verify_safeguard.html.erb +9 -0
  12. data/app/views/devise/verify_safeguard.html.haml +7 -0
  13. data/config/locales/pt-BR.yml +5 -0
  14. data/lib/devise-safeguard/controllers/helpers.rb +54 -0
  15. data/lib/devise-safeguard/hooks/safeguard_authenticatable.rb +7 -0
  16. data/lib/devise-safeguard/models/safeguard_authenticatable.rb +18 -0
  17. data/lib/devise-safeguard/rails.rb +7 -0
  18. data/lib/devise-safeguard/routes.rb +17 -0
  19. data/lib/generators/active_record/devise_safeguard_generator.rb +13 -0
  20. data/lib/generators/active_record/templates/migration.rb +15 -0
  21. data/lib/generators/devise_safeguard/devise_safeguard_generator.rb +30 -0
  22. data/lib/generators/devise_safeguard/install_generator.rb +44 -0
  23. data/lib/safeguard-devise.rb +24 -0
  24. data/puppet/manifests/default.pp +66 -0
  25. data/puppet/modules/elasticsearch/CHANGELOG +62 -0
  26. data/puppet/modules/elasticsearch/CONTRIBUTORS +20 -0
  27. data/puppet/modules/elasticsearch/LICENSE +13 -0
  28. data/puppet/modules/elasticsearch/Modulefile +9 -0
  29. data/puppet/modules/elasticsearch/README.md +147 -0
  30. data/puppet/modules/elasticsearch/Rakefile +5 -0
  31. data/puppet/modules/elasticsearch/manifests/config.pp +64 -0
  32. data/puppet/modules/elasticsearch/manifests/init.pp +208 -0
  33. data/puppet/modules/elasticsearch/manifests/java.pp +50 -0
  34. data/puppet/modules/elasticsearch/manifests/package.pp +84 -0
  35. data/puppet/modules/elasticsearch/manifests/params.pp +103 -0
  36. data/puppet/modules/elasticsearch/manifests/plugin.pp +97 -0
  37. data/puppet/modules/elasticsearch/manifests/python.pp +34 -0
  38. data/puppet/modules/elasticsearch/manifests/service.pp +114 -0
  39. data/puppet/modules/elasticsearch/manifests/template.pp +118 -0
  40. data/puppet/modules/elasticsearch/metadata.json +41 -0
  41. data/puppet/modules/elasticsearch/spec/classes/elasticsearch_init_spec.rb +596 -0
  42. data/puppet/modules/elasticsearch/spec/defines/template_spec.rb +66 -0
  43. data/puppet/modules/elasticsearch/spec/spec_helper.rb +2 -0
  44. data/puppet/modules/elasticsearch/templates/etc/default/elasticsearch.erb +5 -0
  45. data/puppet/modules/elasticsearch/templates/etc/elasticsearch/elasticsearch.yml.erb +93 -0
  46. data/puppet/modules/memcached/.gitignore +2 -0
  47. data/puppet/modules/memcached/Modulefile +8 -0
  48. data/puppet/modules/memcached/README.md +29 -0
  49. data/puppet/modules/memcached/manifests/init.pp +33 -0
  50. data/puppet/modules/memcached/manifests/params.pp +21 -0
  51. data/puppet/modules/memcached/templates/memcached.conf.erb +46 -0
  52. data/puppet/modules/memcached/templates/memcached_sysconfig.erb +5 -0
  53. data/puppet/modules/mysql/.fixtures.yml +3 -0
  54. data/puppet/modules/mysql/.gemfile +5 -0
  55. data/puppet/modules/mysql/LICENSE +201 -0
  56. data/puppet/modules/mysql/Modulefile +8 -0
  57. data/puppet/modules/mysql/README.md +124 -0
  58. data/puppet/modules/mysql/files/mysqltuner.pl +966 -0
  59. data/puppet/modules/mysql/lib/puppet/parser/functions/mysql_password.rb +15 -0
  60. data/puppet/modules/mysql/lib/puppet/provider/database/mysql.rb +42 -0
  61. data/puppet/modules/mysql/lib/puppet/provider/database_grant/mysql.rb +177 -0
  62. data/puppet/modules/mysql/lib/puppet/provider/database_user/mysql.rb +42 -0
  63. data/puppet/modules/mysql/lib/puppet/type/database.rb +17 -0
  64. data/puppet/modules/mysql/lib/puppet/type/database_grant.rb +75 -0
  65. data/puppet/modules/mysql/lib/puppet/type/database_user.rb +25 -0
  66. data/puppet/modules/mysql/manifests/backup.pp +68 -0
  67. data/puppet/modules/mysql/manifests/config.pp +122 -0
  68. data/puppet/modules/mysql/manifests/db.pp +77 -0
  69. data/puppet/modules/mysql/manifests/init.pp +24 -0
  70. data/puppet/modules/mysql/manifests/java.pp +24 -0
  71. data/puppet/modules/mysql/manifests/params.pp +91 -0
  72. data/puppet/modules/mysql/manifests/python.pp +26 -0
  73. data/puppet/modules/mysql/manifests/ruby.pp +28 -0
  74. data/puppet/modules/mysql/manifests/server/account_security.pp +13 -0
  75. data/puppet/modules/mysql/manifests/server/monitor.pp +19 -0
  76. data/puppet/modules/mysql/manifests/server/mysqltuner.pp +22 -0
  77. data/puppet/modules/mysql/manifests/server.pp +52 -0
  78. data/puppet/modules/mysql/templates/my.cnf.erb +42 -0
  79. data/puppet/modules/mysql/templates/my.cnf.pass.erb +6 -0
  80. data/puppet/modules/mysql/templates/mysqlbackup.sh.erb +23 -0
  81. data/puppet/modules/postgresql/GPL-3 +674 -0
  82. data/puppet/modules/postgresql/Modulefile +13 -0
  83. data/puppet/modules/postgresql/README.md +156 -0
  84. data/puppet/modules/postgresql/lib/puppet/provider/pg_database/debian_postgresql.rb +30 -0
  85. data/puppet/modules/postgresql/lib/puppet/provider/pg_database/default.rb +17 -0
  86. data/puppet/modules/postgresql/lib/puppet/provider/pg_user/debian_postgresql.rb +63 -0
  87. data/puppet/modules/postgresql/lib/puppet/provider/pg_user/default.rb +17 -0
  88. data/puppet/modules/postgresql/lib/puppet/type/pg_database.rb +29 -0
  89. data/puppet/modules/postgresql/lib/puppet/type/pg_user.rb +45 -0
  90. data/puppet/modules/postgresql/manifests/db.pp +20 -0
  91. data/puppet/modules/postgresql/manifests/init.pp +12 -0
  92. data/puppet/modules/postgresql/manifests/params.pp +15 -0
  93. data/puppet/modules/postgresql/manifests/server.pp +47 -0
  94. data/puppet/modules/postgresql/templates/pg_hba.conf.erb +105 -0
  95. data/puppet/modules/postgresql/templates/postgresql.conf.erb +559 -0
  96. data/puppet/modules/redis/CHANGELOG +41 -0
  97. data/puppet/modules/redis/Gemfile +7 -0
  98. data/puppet/modules/redis/Gemfile.lock +18 -0
  99. data/puppet/modules/redis/Modulefile +10 -0
  100. data/puppet/modules/redis/README.md +34 -0
  101. data/puppet/modules/redis/Rakefile +6 -0
  102. data/puppet/modules/redis/manifests/init.pp +153 -0
  103. data/puppet/modules/redis/manifests/params.pp +39 -0
  104. data/puppet/modules/redis/metadata.json +31 -0
  105. data/puppet/modules/redis/spec/spec_helper.rb +17 -0
  106. data/puppet/modules/redis/templates/redis.debian.conf.erb +217 -0
  107. data/puppet/modules/redis/templates/redis.logrotate.erb +9 -0
  108. data/puppet/modules/redis/templates/redis.rhel.conf.erb +547 -0
  109. data/puppet/modules/redis/tests/init.pp +8 -0
  110. data/puppet/upgrade-puppet.sh +16 -0
  111. data/safeguard-devise.gemspec +249 -0
  112. data/spec/controllers/safeguard_devise_controller_spec.rb +67 -0
  113. data/spec/devise/safeguard_authenticatable_spec.rb +71 -0
  114. data/spec/orm/active_record.rb +4 -0
  115. data/spec/routing/routes_spec.rb +13 -0
  116. data/spec/safeguard-devise-test-app/.gitignore +16 -0
  117. data/spec/safeguard-devise-test-app/Gemfile +14 -0
  118. data/spec/safeguard-devise-test-app/Gemfile.lock +119 -0
  119. data/spec/safeguard-devise-test-app/README.rdoc +28 -0
  120. data/spec/safeguard-devise-test-app/Rakefile +6 -0
  121. data/spec/safeguard-devise-test-app/app/assets/images/.keep +0 -0
  122. data/spec/safeguard-devise-test-app/app/assets/javascripts/application.js +13 -0
  123. data/spec/safeguard-devise-test-app/app/assets/stylesheets/application.css +13 -0
  124. data/spec/safeguard-devise-test-app/app/controllers/application_controller.rb +5 -0
  125. data/spec/safeguard-devise-test-app/app/controllers/concerns/.keep +0 -0
  126. data/spec/safeguard-devise-test-app/app/controllers/home_controller.rb +6 -0
  127. data/spec/safeguard-devise-test-app/app/helpers/application_helper.rb +2 -0
  128. data/spec/safeguard-devise-test-app/app/mailers/.keep +0 -0
  129. data/spec/safeguard-devise-test-app/app/models/.keep +0 -0
  130. data/spec/safeguard-devise-test-app/app/models/concerns/.keep +0 -0
  131. data/spec/safeguard-devise-test-app/app/models/user.rb +6 -0
  132. data/spec/safeguard-devise-test-app/app/views/devise/devise_safeguard/verify_safeguard.html.erb +9 -0
  133. data/spec/safeguard-devise-test-app/app/views/devise/devise_safeguard/verify_safeguard.html.haml +6 -0
  134. data/spec/safeguard-devise-test-app/app/views/home/index.html.erb +1 -0
  135. data/spec/safeguard-devise-test-app/app/views/layouts/application.html.erb +14 -0
  136. data/spec/safeguard-devise-test-app/bin/bundle +3 -0
  137. data/spec/safeguard-devise-test-app/bin/rails +4 -0
  138. data/spec/safeguard-devise-test-app/bin/rake +4 -0
  139. data/spec/safeguard-devise-test-app/config/application.rb +31 -0
  140. data/spec/safeguard-devise-test-app/config/boot.rb +4 -0
  141. data/spec/safeguard-devise-test-app/config/database.yml +25 -0
  142. data/spec/safeguard-devise-test-app/config/environment.rb +5 -0
  143. data/spec/safeguard-devise-test-app/config/environments/development.rb +29 -0
  144. data/spec/safeguard-devise-test-app/config/environments/production.rb +80 -0
  145. data/spec/safeguard-devise-test-app/config/environments/test.rb +36 -0
  146. data/spec/safeguard-devise-test-app/config/initializers/backtrace_silencers.rb +7 -0
  147. data/spec/safeguard-devise-test-app/config/initializers/devise.rb +259 -0
  148. data/spec/safeguard-devise-test-app/config/initializers/filter_parameter_logging.rb +4 -0
  149. data/spec/safeguard-devise-test-app/config/initializers/inflections.rb +16 -0
  150. data/spec/safeguard-devise-test-app/config/initializers/mime_types.rb +5 -0
  151. data/spec/safeguard-devise-test-app/config/initializers/secret_token.rb +12 -0
  152. data/spec/safeguard-devise-test-app/config/initializers/session_store.rb +3 -0
  153. data/spec/safeguard-devise-test-app/config/initializers/wrap_parameters.rb +14 -0
  154. data/spec/safeguard-devise-test-app/config/locales/devise.en.yml +59 -0
  155. data/spec/safeguard-devise-test-app/config/locales/devise.safeguard.pt-BR.yml +5 -0
  156. data/spec/safeguard-devise-test-app/config/locales/en.yml +23 -0
  157. data/spec/safeguard-devise-test-app/config/routes.rb +59 -0
  158. data/spec/safeguard-devise-test-app/config.ru +4 -0
  159. data/spec/safeguard-devise-test-app/db/migrate/20140220191103_create_users.rb +9 -0
  160. data/spec/safeguard-devise-test-app/db/migrate/20140220191247_add_devise_to_users.rb +49 -0
  161. data/spec/safeguard-devise-test-app/db/migrate/20140220191522_devise_safeguard_add_to_users.rb +15 -0
  162. data/spec/safeguard-devise-test-app/db/schema.rb +37 -0
  163. data/spec/safeguard-devise-test-app/db/seeds.rb +7 -0
  164. data/spec/safeguard-devise-test-app/lib/assets/.keep +0 -0
  165. data/spec/safeguard-devise-test-app/lib/tasks/.keep +0 -0
  166. data/spec/safeguard-devise-test-app/log/.keep +0 -0
  167. data/spec/safeguard-devise-test-app/public/404.html +58 -0
  168. data/spec/safeguard-devise-test-app/public/422.html +58 -0
  169. data/spec/safeguard-devise-test-app/public/500.html +57 -0
  170. data/spec/safeguard-devise-test-app/public/favicon.ico +0 -0
  171. data/spec/safeguard-devise-test-app/public/robots.txt +5 -0
  172. data/spec/safeguard-devise-test-app/test/controllers/.keep +0 -0
  173. data/spec/safeguard-devise-test-app/test/fixtures/.keep +0 -0
  174. data/spec/safeguard-devise-test-app/test/fixtures/users.yml +9 -0
  175. data/spec/safeguard-devise-test-app/test/helpers/.keep +0 -0
  176. data/spec/safeguard-devise-test-app/test/integration/.keep +0 -0
  177. data/spec/safeguard-devise-test-app/test/mailers/.keep +0 -0
  178. data/spec/safeguard-devise-test-app/test/models/.keep +0 -0
  179. data/spec/safeguard-devise-test-app/test/models/user_test.rb +7 -0
  180. data/spec/safeguard-devise-test-app/test/test_helper.rb +15 -0
  181. data/spec/safeguard-devise-test-app/vendor/assets/javascripts/.keep +0 -0
  182. data/spec/safeguard-devise-test-app/vendor/assets/stylesheets/.keep +0 -0
  183. data/spec/spec_helper.rb +31 -0
  184. data/spec/tests_helper/helpers.rb +34 -0
  185. metadata +381 -0
@@ -0,0 +1,559 @@
1
+ # ---------------------------------------------------------------
2
+ # PostgreSQL configuration file - managed by puppet - DO NOT EDIT
3
+ # ---------------------------------------------------------------
4
+ #
5
+ # This file consists of lines of the form:
6
+ #
7
+ # name = value
8
+ #
9
+ # (The "=" is optional.) Whitespace may be used. Comments are introduced with
10
+ # "#" anywhere on a line. The complete list of parameter names and allowed
11
+ # values can be found in the PostgreSQL documentation.
12
+ #
13
+ # The commented-out settings shown in this file represent the default values.
14
+ # Re-commenting a setting is NOT sufficient to revert it to the default value;
15
+ # you need to reload the server.
16
+ #
17
+ # This file is read on server startup and when the server receives a SIGHUP
18
+ # signal. If you edit the file on a running system, you have to SIGHUP the
19
+ # server for the changes to take effect, or use "pg_ctl reload". Some
20
+ # parameters, which are marked below, require a server shutdown and restart to
21
+ # take effect.
22
+ #
23
+ # Any parameter can also be given as a command-line option to the server, e.g.,
24
+ # "postgres -c log_connections=on". Some parameters can be changed at run time
25
+ # with the "SET" SQL command.
26
+ #
27
+ # Memory units: kB = kilobytes Time units: ms = milliseconds
28
+ # MB = megabytes s = seconds
29
+ # GB = gigabytes min = minutes
30
+ # h = hours
31
+ # d = days
32
+
33
+
34
+ #------------------------------------------------------------------------------
35
+ # FILE LOCATIONS
36
+ #------------------------------------------------------------------------------
37
+
38
+ # The default values of these variables are driven from the -D command-line
39
+ # option or PGDATA environment variable, represented here as ConfigDir.
40
+
41
+ data_directory = '/var/lib/postgresql/<%= @version %>/main' # use data in another directory
42
+ # (change requires restart)
43
+ hba_file = '/etc/postgresql/<%= @version %>/main/pg_hba.conf' # host-based authentication file
44
+ # (change requires restart)
45
+ ident_file = '/etc/postgresql/<%= @version %>/main/pg_ident.conf' # ident configuration file
46
+ # (change requires restart)
47
+
48
+ # If external_pid_file is not explicitly set, no extra PID file is written.
49
+ external_pid_file = '/var/run/postgresql/<%= @version %>-main.pid' # write an extra PID file
50
+ # (change requires restart)
51
+
52
+
53
+ #------------------------------------------------------------------------------
54
+ # CONNECTIONS AND AUTHENTICATION
55
+ #------------------------------------------------------------------------------
56
+
57
+ # - Connection Settings -
58
+
59
+ <% if listen.is_a? Array -%>
60
+ listen_addresses = '<%= @listen.join ',' %>'
61
+ <% else %>
62
+ listen_addresses = '<%= @listen %>'
63
+ <% end %>
64
+ #listen_addresses = 'localhost' # what IP address(es) to listen on;
65
+ # comma-separated list of addresses;
66
+ # defaults to 'localhost', '*' = all
67
+ # (change requires restart)
68
+ port = <%= @port %> # (change requires restart)
69
+ max_connections = 100 # (change requires restart)
70
+ # Note: Increasing max_connections costs ~400 bytes of shared memory per
71
+ # connection slot, plus lock space (see max_locks_per_transaction).
72
+ #superuser_reserved_connections = 3 # (change requires restart)
73
+ unix_socket_directory = '/var/run/postgresql' # (change requires restart)
74
+ #unix_socket_group = '' # (change requires restart)
75
+ #unix_socket_permissions = 0777 # begin with 0 to use octal notation
76
+ # (change requires restart)
77
+ #bonjour = off # advertise server via Bonjour
78
+ # (change requires restart)
79
+ #bonjour_name = '' # defaults to the computer name
80
+ # (change requires restart)
81
+
82
+ # - Security and Authentication -
83
+
84
+ #authentication_timeout = 1min # 1s-600s
85
+ ssl = true # (change requires restart)
86
+ #ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers
87
+ # (change requires restart)
88
+ #ssl_renegotiation_limit = 512MB # amount of data between renegotiations
89
+ #password_encryption = on
90
+ #db_user_namespace = off
91
+
92
+ # Kerberos and GSSAPI
93
+ #krb_server_keyfile = ''
94
+ #krb_srvname = 'postgres' # (Kerberos only)
95
+ #krb_caseins_users = off
96
+
97
+ # - TCP Keepalives -
98
+ # see "man 7 tcp" for details
99
+
100
+ #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
101
+ # 0 selects the system default
102
+ #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
103
+ # 0 selects the system default
104
+ #tcp_keepalives_count = 0 # TCP_KEEPCNT;
105
+ # 0 selects the system default
106
+
107
+
108
+ #------------------------------------------------------------------------------
109
+ # RESOURCE USAGE (except WAL)
110
+ #------------------------------------------------------------------------------
111
+
112
+ # - Memory -
113
+
114
+ shared_buffers = 24MB # min 128kB
115
+ # (change requires restart)
116
+ #temp_buffers = 8MB # min 800kB
117
+ #max_prepared_transactions = 0 # zero disables the feature
118
+ # (change requires restart)
119
+ # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
120
+ # per transaction slot, plus lock space (see max_locks_per_transaction).
121
+ # It is not advisable to set max_prepared_transactions nonzero unless you
122
+ # actively intend to use prepared transactions.
123
+ #work_mem = 1MB # min 64kB
124
+ #maintenance_work_mem = 16MB # min 1MB
125
+ #max_stack_depth = 2MB # min 100kB
126
+
127
+ # - Kernel Resource Usage -
128
+
129
+ #max_files_per_process = 1000 # min 25
130
+ # (change requires restart)
131
+ #shared_preload_libraries = '' # (change requires restart)
132
+
133
+ # - Cost-Based Vacuum Delay -
134
+
135
+ #vacuum_cost_delay = 0ms # 0-100 milliseconds
136
+ #vacuum_cost_page_hit = 1 # 0-10000 credits
137
+ #vacuum_cost_page_miss = 10 # 0-10000 credits
138
+ #vacuum_cost_page_dirty = 20 # 0-10000 credits
139
+ #vacuum_cost_limit = 200 # 1-10000 credits
140
+
141
+ # - Background Writer -
142
+
143
+ #bgwriter_delay = 200ms # 10-10000ms between rounds
144
+ #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
145
+ #bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round
146
+
147
+ # - Asynchronous Behavior -
148
+
149
+ #effective_io_concurrency = 1 # 1-1000. 0 disables prefetching
150
+
151
+
152
+ #------------------------------------------------------------------------------
153
+ # WRITE AHEAD LOG
154
+ #------------------------------------------------------------------------------
155
+
156
+ # - Settings -
157
+
158
+ #wal_level = minimal # minimal, archive, or hot_standby
159
+ # (change requires restart)
160
+ #fsync = on # turns forced synchronization on or off
161
+ #synchronous_commit = on # synchronization level; on, off, or local
162
+ #wal_sync_method = fsync # the default is the first option
163
+ # supported by the operating system:
164
+ # open_datasync
165
+ # fdatasync (default on Linux)
166
+ # fsync
167
+ # fsync_writethrough
168
+ # open_sync
169
+ #full_page_writes = on # recover from partial page writes
170
+ #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
171
+ # (change requires restart)
172
+ #wal_writer_delay = 200ms # 1-10000 milliseconds
173
+
174
+ #commit_delay = 0 # range 0-100000, in microseconds
175
+ #commit_siblings = 5 # range 1-1000
176
+
177
+ # - Checkpoints -
178
+
179
+ #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
180
+ #checkpoint_timeout = 5min # range 30s-1h
181
+ #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
182
+ #checkpoint_warning = 30s # 0 disables
183
+
184
+ # - Archiving -
185
+
186
+ #archive_mode = off # allows archiving to be done
187
+ # (change requires restart)
188
+ #archive_command = '' # command to use to archive a logfile segment
189
+ #archive_timeout = 0 # force a logfile segment switch after this
190
+ # number of seconds; 0 disables
191
+
192
+
193
+ #------------------------------------------------------------------------------
194
+ # REPLICATION
195
+ #------------------------------------------------------------------------------
196
+
197
+ # - Master Server -
198
+
199
+ # These settings are ignored on a standby server
200
+
201
+ #max_wal_senders = 0 # max number of walsender processes
202
+ # (change requires restart)
203
+ #wal_sender_delay = 1s # walsender cycle time, 1-10000 milliseconds
204
+ #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
205
+ #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
206
+ #replication_timeout = 60s # in milliseconds; 0 disables
207
+ #synchronous_standby_names = '' # standby servers that provide sync rep
208
+ # comma-separated list of application_name
209
+ # from standby(s); '*' = all
210
+
211
+ # - Standby Servers -
212
+
213
+ # These settings are ignored on a master server
214
+
215
+ #hot_standby = off # "on" allows queries during recovery
216
+ # (change requires restart)
217
+ #max_standby_archive_delay = 30s # max delay before canceling queries
218
+ # when reading WAL from archive;
219
+ # -1 allows indefinite delay
220
+ #max_standby_streaming_delay = 30s # max delay before canceling queries
221
+ # when reading streaming WAL;
222
+ # -1 allows indefinite delay
223
+ #wal_receiver_status_interval = 10s # send replies at least this often
224
+ # 0 disables
225
+ #hot_standby_feedback = off # send info from standby to prevent
226
+ # query conflicts
227
+
228
+
229
+ #------------------------------------------------------------------------------
230
+ # QUERY TUNING
231
+ #------------------------------------------------------------------------------
232
+
233
+ # - Planner Method Configuration -
234
+
235
+ #enable_bitmapscan = on
236
+ #enable_hashagg = on
237
+ #enable_hashjoin = on
238
+ #enable_indexscan = on
239
+ #enable_material = on
240
+ #enable_mergejoin = on
241
+ #enable_nestloop = on
242
+ #enable_seqscan = on
243
+ #enable_sort = on
244
+ #enable_tidscan = on
245
+
246
+ # - Planner Cost Constants -
247
+
248
+ #seq_page_cost = 1.0 # measured on an arbitrary scale
249
+ #random_page_cost = 4.0 # same scale as above
250
+ #cpu_tuple_cost = 0.01 # same scale as above
251
+ #cpu_index_tuple_cost = 0.005 # same scale as above
252
+ #cpu_operator_cost = 0.0025 # same scale as above
253
+ #effective_cache_size = 128MB
254
+
255
+ # - Genetic Query Optimizer -
256
+
257
+ #geqo = on
258
+ #geqo_threshold = 12
259
+ #geqo_effort = 5 # range 1-10
260
+ #geqo_pool_size = 0 # selects default based on effort
261
+ #geqo_generations = 0 # selects default based on effort
262
+ #geqo_selection_bias = 2.0 # range 1.5-2.0
263
+ #geqo_seed = 0.0 # range 0.0-1.0
264
+
265
+ # - Other Planner Options -
266
+
267
+ #default_statistics_target = 100 # range 1-10000
268
+ #constraint_exclusion = partition # on, off, or partition
269
+ #cursor_tuple_fraction = 0.1 # range 0.0-1.0
270
+ #from_collapse_limit = 8
271
+ #join_collapse_limit = 8 # 1 disables collapsing of explicit
272
+ # JOIN clauses
273
+
274
+
275
+ #------------------------------------------------------------------------------
276
+ # ERROR REPORTING AND LOGGING
277
+ #------------------------------------------------------------------------------
278
+
279
+ # - Where to Log -
280
+
281
+ #log_destination = 'stderr' # Valid values are combinations of
282
+ # stderr, csvlog, syslog, and eventlog,
283
+ # depending on platform. csvlog
284
+ # requires logging_collector to be on.
285
+
286
+ # This is used when logging to stderr:
287
+ #logging_collector = off # Enable capturing of stderr and csvlog
288
+ # into log files. Required to be on for
289
+ # csvlogs.
290
+ # (change requires restart)
291
+
292
+ # These are only used if logging_collector is on:
293
+ #log_directory = 'pg_log' # directory where log files are written,
294
+ # can be absolute or relative to PGDATA
295
+ #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
296
+ # can include strftime() escapes
297
+ #log_file_mode = 0600 # creation mode for log files,
298
+ # begin with 0 to use octal notation
299
+ #log_truncate_on_rotation = off # If on, an existing log file with the
300
+ # same name as the new log file will be
301
+ # truncated rather than appended to.
302
+ # But such truncation only occurs on
303
+ # time-driven rotation, not on restarts
304
+ # or size-driven rotation. Default is
305
+ # off, meaning append to existing files
306
+ # in all cases.
307
+ #log_rotation_age = 1d # Automatic rotation of logfiles will
308
+ # happen after that time. 0 disables.
309
+ #log_rotation_size = 10MB # Automatic rotation of logfiles will
310
+ # happen after that much log output.
311
+ # 0 disables.
312
+
313
+ # These are relevant when logging to syslog:
314
+ #syslog_facility = 'LOCAL0'
315
+ #syslog_ident = 'postgres'
316
+
317
+ #silent_mode = off # Run server silently.
318
+ # DO NOT USE without syslog or
319
+ # logging_collector
320
+ # (change requires restart)
321
+
322
+
323
+ # - When to Log -
324
+
325
+ #client_min_messages = notice # values in order of decreasing detail:
326
+ # debug5
327
+ # debug4
328
+ # debug3
329
+ # debug2
330
+ # debug1
331
+ # log
332
+ # notice
333
+ # warning
334
+ # error
335
+
336
+ #log_min_messages = warning # values in order of decreasing detail:
337
+ # debug5
338
+ # debug4
339
+ # debug3
340
+ # debug2
341
+ # debug1
342
+ # info
343
+ # notice
344
+ # warning
345
+ # error
346
+ # log
347
+ # fatal
348
+ # panic
349
+
350
+ #log_min_error_statement = error # values in order of decreasing detail:
351
+ # debug5
352
+ # debug4
353
+ # debug3
354
+ # debug2
355
+ # debug1
356
+ # info
357
+ # notice
358
+ # warning
359
+ # error
360
+ # log
361
+ # fatal
362
+ # panic (effectively off)
363
+
364
+ #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
365
+ # and their durations, > 0 logs only
366
+ # statements running at least this number
367
+ # of milliseconds
368
+
369
+
370
+ # - What to Log -
371
+
372
+ #debug_print_parse = off
373
+ #debug_print_rewritten = off
374
+ #debug_print_plan = off
375
+ #debug_pretty_print = on
376
+ #log_checkpoints = off
377
+ #log_connections = off
378
+ #log_disconnections = off
379
+ #log_duration = off
380
+ #log_error_verbosity = default # terse, default, or verbose messages
381
+ #log_hostname = off
382
+ log_line_prefix = '%t ' # special values:
383
+ # %a = application name
384
+ # %u = user name
385
+ # %d = database name
386
+ # %r = remote host and port
387
+ # %h = remote host
388
+ # %p = process ID
389
+ # %t = timestamp without milliseconds
390
+ # %m = timestamp with milliseconds
391
+ # %i = command tag
392
+ # %e = SQL state
393
+ # %c = session ID
394
+ # %l = session line number
395
+ # %s = session start timestamp
396
+ # %v = virtual transaction ID
397
+ # %x = transaction ID (0 if none)
398
+ # %q = stop here in non-session
399
+ # processes
400
+ # %% = '%'
401
+ #log_lock_waits = off # log lock waits >= deadlock_timeout
402
+ #log_statement = 'none' # none, ddl, mod, all
403
+ #log_temp_files = -1 # log temporary files equal or larger
404
+ # than the specified size in kilobytes;
405
+ # -1 disables, 0 logs all temp files
406
+ #log_timezone = '(defaults to server environment setting)'
407
+
408
+
409
+ #------------------------------------------------------------------------------
410
+ # RUNTIME STATISTICS
411
+ #------------------------------------------------------------------------------
412
+
413
+ # - Query/Index Statistics Collector -
414
+
415
+ #track_activities = on
416
+ #track_counts = on
417
+ #track_functions = none # none, pl, all
418
+ #track_activity_query_size = 1024 # (change requires restart)
419
+ #update_process_title = on
420
+ #stats_temp_directory = 'pg_stat_tmp'
421
+
422
+
423
+ # - Statistics Monitoring -
424
+
425
+ #log_parser_stats = off
426
+ #log_planner_stats = off
427
+ #log_executor_stats = off
428
+ #log_statement_stats = off
429
+
430
+
431
+ #------------------------------------------------------------------------------
432
+ # AUTOVACUUM PARAMETERS
433
+ #------------------------------------------------------------------------------
434
+
435
+ #autovacuum = on # Enable autovacuum subprocess? 'on'
436
+ # requires track_counts to also be on.
437
+ #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
438
+ # their durations, > 0 logs only
439
+ # actions running at least this number
440
+ # of milliseconds.
441
+ #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
442
+ # (change requires restart)
443
+ #autovacuum_naptime = 1min # time between autovacuum runs
444
+ #autovacuum_vacuum_threshold = 50 # min number of row updates before
445
+ # vacuum
446
+ #autovacuum_analyze_threshold = 50 # min number of row updates before
447
+ # analyze
448
+ #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
449
+ #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
450
+ #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
451
+ # (change requires restart)
452
+ #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
453
+ # autovacuum, in milliseconds;
454
+ # -1 means use vacuum_cost_delay
455
+ #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
456
+ # autovacuum, -1 means use
457
+ # vacuum_cost_limit
458
+
459
+
460
+ #------------------------------------------------------------------------------
461
+ # CLIENT CONNECTION DEFAULTS
462
+ #------------------------------------------------------------------------------
463
+
464
+ # - Statement Behavior -
465
+
466
+ #search_path = '"$user",public' # schema names
467
+ #default_tablespace = '' # a tablespace name, '' uses the default
468
+ #temp_tablespaces = '' # a list of tablespace names, '' uses
469
+ # only default tablespace
470
+ #check_function_bodies = on
471
+ #default_transaction_isolation = 'read committed'
472
+ #default_transaction_read_only = off
473
+ #default_transaction_deferrable = off
474
+ #session_replication_role = 'origin'
475
+ #statement_timeout = 0 # in milliseconds, 0 is disabled
476
+ #vacuum_freeze_min_age = 50000000
477
+ #vacuum_freeze_table_age = 150000000
478
+ #bytea_output = 'hex' # hex, escape
479
+ #xmlbinary = 'base64'
480
+ #xmloption = 'content'
481
+
482
+ # - Locale and Formatting -
483
+
484
+ datestyle = 'iso, mdy'
485
+ #intervalstyle = 'postgres'
486
+ #timezone = '(defaults to server environment setting)'
487
+ #timezone_abbreviations = 'Default' # Select the set of available time zone
488
+ # abbreviations. Currently, there are
489
+ # Default
490
+ # Australia
491
+ # India
492
+ # You can create your own file in
493
+ # share/timezonesets/.
494
+ #extra_float_digits = 0 # min -15, max 3
495
+ #client_encoding = sql_ascii # actually, defaults to database
496
+ # encoding
497
+
498
+ # These settings are initialized by initdb, but they can be changed.
499
+ lc_messages = '<%= @locale %>' # locale for system error message strings
500
+ lc_monetary = '<%= @locale %>' # locale for monetary formatting
501
+ lc_numeric = '<%= @locale %>' # locale for number formatting
502
+ lc_time = '<%= @locale %>' # locale for time formatting
503
+
504
+ # default configuration for text search
505
+ default_text_search_config = 'pg_catalog.english'
506
+
507
+ # - Other Defaults -
508
+
509
+ #dynamic_library_path = '$libdir'
510
+ #local_preload_libraries = ''
511
+
512
+
513
+ #------------------------------------------------------------------------------
514
+ # LOCK MANAGEMENT
515
+ #------------------------------------------------------------------------------
516
+
517
+ #deadlock_timeout = 1s
518
+ #max_locks_per_transaction = 64 # min 10
519
+ # (change requires restart)
520
+ # Note: Each lock table slot uses ~270 bytes of shared memory, and there are
521
+ # max_locks_per_transaction * (max_connections + max_prepared_transactions)
522
+ # lock table slots.
523
+ #max_pred_locks_per_transaction = 64 # min 10
524
+ # (change requires restart)
525
+
526
+ #------------------------------------------------------------------------------
527
+ # VERSION/PLATFORM COMPATIBILITY
528
+ #------------------------------------------------------------------------------
529
+
530
+ # - Previous PostgreSQL Versions -
531
+
532
+ #array_nulls = on
533
+ #backslash_quote = safe_encoding # on, off, or safe_encoding
534
+ #default_with_oids = off
535
+ #escape_string_warning = on
536
+ #lo_compat_privileges = off
537
+ #quote_all_identifiers = off
538
+ #sql_inheritance = on
539
+ #standard_conforming_strings = on
540
+ #synchronize_seqscans = on
541
+
542
+ # - Other Platforms and Clients -
543
+
544
+ #transform_null_equals = off
545
+
546
+
547
+ #------------------------------------------------------------------------------
548
+ # ERROR HANDLING
549
+ #------------------------------------------------------------------------------
550
+
551
+ #exit_on_error = off # terminate session on any error?
552
+ #restart_after_crash = on # reinitialize after backend crash?
553
+
554
+
555
+ #------------------------------------------------------------------------------
556
+ # CUSTOMIZED OPTIONS
557
+ #------------------------------------------------------------------------------
558
+
559
+ #custom_variable_classes = '' # list of custom variable class names
@@ -0,0 +1,41 @@
1
+ ## fsalum-redis changelog
2
+
3
+ Release notes for the fsalum-redis module.
4
+
5
+ ------------------------------------------
6
+
7
+ #### 0.0.6 - 2013-08-01
8
+
9
+ * Install package before poking config (@doismellburning)
10
+
11
+ #### 0.0.5 - 2013-06-06
12
+
13
+ * Fix Puppet 3.2.1 deprecation warnings (@ripienaar)
14
+ * Fix duplicate entry for logrotate on Debian/RHEL using different paths (@arthurfurlan)
15
+ * Add $conf_nosave parameter (@fsalum)
16
+ * Minor changes to params variables (@fsalum)
17
+ * Update CHANGELOG format
18
+
19
+ ------------------------------------------
20
+
21
+ #### 0.0.4 - 2013-04-18
22
+
23
+ * Creates conf_dir directory if it doesn't exist
24
+
25
+ ------------------------------------------
26
+
27
+ #### 0.0.3 - 2013-02-25
28
+
29
+ * Fixing redis.conf less options on Debian
30
+
31
+ ------------------------------------------
32
+
33
+ #### 0.0.2 - 2013-02-25
34
+
35
+ * Fixing redis.conf location for Debian
36
+
37
+ ------------------------------------------
38
+
39
+ #### 0.0.1 - 2013-02-25
40
+
41
+ * Initial Forge release
@@ -0,0 +1,7 @@
1
+ source :rubygems
2
+
3
+ puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
4
+
5
+ gem 'rake'
6
+ gem 'puppet-lint'
7
+ gem 'puppet', puppetversion
@@ -0,0 +1,18 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ facter (1.6.13)
5
+ hiera (1.0.0)
6
+ puppet (3.0.1)
7
+ facter (~> 1.6.11)
8
+ hiera (~> 1.0.0)
9
+ puppet-lint (0.3.2)
10
+ rake (0.9.2.2)
11
+
12
+ PLATFORMS
13
+ ruby
14
+
15
+ DEPENDENCIES
16
+ puppet (>= 2.7)
17
+ puppet-lint
18
+ rake
@@ -0,0 +1,10 @@
1
+ name 'fsalum-redis'
2
+ version '0.0.6'
3
+ source 'git://github.com/fsalum/puppet-redis.git'
4
+ author 'Felipe Salum'
5
+ license 'Apache License, Version 2.0'
6
+ summary 'Puppet module for Redis Server'
7
+ description 'Module to install and configure a Redis server'
8
+ project_page 'https://github.com/fsalum/puppet-redis'
9
+
10
+ ## Add dependencies, if any:
@@ -0,0 +1,34 @@
1
+ Redis Module for Puppet
2
+ =======================
3
+ [![Build Status](https://secure.travis-ci.org/fsalum/puppet-redis.png)](http://travis-ci.org/fsalum/puppet-redis)
4
+
5
+ This module install and manages the Redis server. All redis.conf options are
6
+ accepted in the parameterized class.
7
+
8
+ Operating System
9
+ ----------------
10
+
11
+ Tested on CentOS 6.3 and Debian Squeeze.
12
+
13
+ Quick Start
14
+ -----------
15
+
16
+ Use the default parameters:
17
+
18
+ class { 'redis': }
19
+
20
+ To change the port and listening network interface:
21
+
22
+ class { 'redis':
23
+ conf_port => '6379',
24
+ conf_bind => '0.0.0.0',
25
+ }
26
+
27
+ Parameters
28
+ ----------
29
+
30
+ Check the [init.pp](https://github.com/fsalum/puppet-redis/blob/master/manifests/init.pp) file for a list of parameters accepted.
31
+
32
+ Author
33
+ ------
34
+ Felipe Salum <fsalum@gmail.com>
@@ -0,0 +1,6 @@
1
+ require 'puppet-lint/tasks/puppet-lint'
2
+
3
+ PuppetLint.configuration.send("disable_80chars")
4
+ PuppetLint.configuration.send('disable_class_parameter_defaults')
5
+
6
+ task :default => :lint