summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduritong <peter.meier+github@immerda.ch>2015-03-01 20:57:26 +0100
committerduritong <peter.meier+github@immerda.ch>2015-03-01 20:57:26 +0100
commit47befc3a972b0745a87381cad4b280529a0514f2 (patch)
tree235015eff65a2fe7c7c6dcb34d22ff57804548c7
parent3fd6a9a73afb99da97a123afd3041adc05debc55 (diff)
parent91d91c253b792b5a176159e083eb1a3f301a7e86 (diff)
Merge pull request #10 from timogoebel/feature/encryption
add support for encryption and ssl_options
-rw-r--r--manifests/config.pp6
-rw-r--r--templates/troclarc.yaml.erb9
2 files changed, 15 insertions, 0 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index a3a6e01..7b23a3e 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -5,6 +5,10 @@
# By default it's YAML
# [*adapter_options*] This will contain a hash of the adapter options to pass the
# trocla configuration.
+# [*encryption*] Defines the encryption method for password stored in the backend.
+# By default no encryption is used.
+# [*ssl_options*] This will contain a hash of the ssl options to pass the
+# trocla configuration.
# [*password_length*] Define the length of default passwords to create. 16 by default
# [*random_passwords*] Should trocla generate random passwords
# if none can be found. *true* by default.
@@ -14,6 +18,8 @@ class trocla::config (
$password_length = 16,
$random_passwords = true,
$adapter_options = {},
+ $encryption = undef,
+ $ssl_options = {},
$manage_dependencies = true,
) {
if $manage_dependencies {
diff --git a/templates/troclarc.yaml.erb b/templates/troclarc.yaml.erb
index d574cd9..7d4fa27 100644
--- a/templates/troclarc.yaml.erb
+++ b/templates/troclarc.yaml.erb
@@ -9,3 +9,12 @@ adapter_options:
:<%= key %>: '<%= value %>'
<% end -%>
<% end -%>
+<% if @encryption %>
+encryption: :<%= @encryption %>
+<% end -%>
+<% unless @ssl_options.empty? %>
+ssl_options:
+<% @ssl_options.each do |key,value| -%>
+ :<%= key %>: '<%= value %>'
+<% end -%>
+<% end -%>