summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md15
-rw-r--r--manifests/config.pp6
-rw-r--r--manifests/dependencies.pp11
-rw-r--r--manifests/master.pp21
-rw-r--r--metadata.json2
-rw-r--r--templates/troclarc.yaml.erb9
6 files changed, 16 insertions, 48 deletions
diff --git a/README.md b/README.md
index 98668d5..b3dff56 100644
--- a/README.md
+++ b/README.md
@@ -81,21 +81,6 @@ one if you do not use the default yaml setup.
This class manages the installation of trocla itself. It will not configure
trocla, it will just install the necessary packages.
-### trocla::dependencies
-
-This class is used to install the necessary dependencies if you are not using
-the rubygems module. See dependencies below for more information.
-
-## Dependencies
-
-By default this module requires the rubygems puppet module. If you want to
-use trocla with ruby enterprise, you might be also interested in the
-ruby_enterprise module.
-If the dependencies should be managed internally, set: install_deps to `true`.
-
-You can also use this module with 0 dependencies by setting the option
-use_rubygems to false.
-
## Moar
RTFC and for more information about trocla visit: https://github.com/duritong/trocla
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/manifests/dependencies.pp b/manifests/dependencies.pp
deleted file mode 100644
index b033269..0000000
--- a/manifests/dependencies.pp
+++ /dev/null
@@ -1,11 +0,0 @@
-# manage trocla's dependencies
-#
-# [*provider*] How to install the dependencies.
-class trocla::dependencies(
- $provider = gem,
-) {
- package { [ 'moneta', 'highline', 'bcrypt' ]:
- ensure => present,
- provider => $provider,
- }
-}
diff --git a/manifests/master.pp b/manifests/master.pp
index f7bb32f..8ea324b 100644
--- a/manifests/master.pp
+++ b/manifests/master.pp
@@ -2,33 +2,12 @@
#
# This module manages the necessary things for trocla on a master.
#
-# [*install_deps*]: Whether to directly install the necessary dependencies
-# [*use_rubygems*]: Use the rubygems module to manage your dependencies
-# [*provider*]: Which provider to use to install your dependencies, if you
-# don't use the rubygems module
class trocla::master (
- $install_deps = true,
- $use_rubygems = false,
$provider = gem,
) {
-
- #Select if the upstream rubygems modules should be required for install
- if $use_rubygems {
- require rubygems::moneta
- require rubygems::highline
- }
-
- #Manually install requirements via gem
- if $install_deps {
- class{'trocla::dependencies':
- provider => $provider,
- }
- }
-
#Main trocla install
package {'trocla':
ensure => present,
provider => $provider,
}
-
}
diff --git a/metadata.json b/metadata.json
index 51b5c5e..9541288 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,6 +1,6 @@
{
"name": "duritong-trocla",
- "version": "0.0.4",
+ "version": "0.0.5",
"author": "duritong",
"summary": "This modules allows you to use trocla (https://github.com/duritong/trocla) from puppet.",
"license": "GPLv2",
diff --git a/templates/troclarc.yaml.erb b/templates/troclarc.yaml.erb
index 9f269bf..ddadc3a 100644
--- a/templates/troclarc.yaml.erb
+++ b/templates/troclarc.yaml.erb
@@ -9,3 +9,12 @@ adapter_options:
:<%= key %>: '<%= @adapter_options[key] %>'
<% end -%>
<% end -%>
+<% if @encryption %>
+encryption: :<%= @encryption %>
+<% end -%>
+<% unless @ssl_options.empty? %>
+ssl_options:
+<% @ssl_options.each do |key,value| -%>
+ :<%= key %>: '<%= value %>'
+<% end -%>
+<% end -%>