summaryrefslogtreecommitdiff
path: root/manifests/config.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/config.pp')
-rw-r--r--manifests/config.pp36
1 files changed, 19 insertions, 17 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index 2c00684..ebae2f1 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -1,26 +1,28 @@
-# deploy a trocla config
-class trocla::config($ruby='system') {
- if $trocla::config::ruby == 'system' or $trocla::config::ruby == 'both' {
- require trocla::master
- }
- if $trocla::config::ruby == 'ree' or $trocla::config::ruby == 'both' {
- require trocla::master::ree
- }
+#Installs configuration files for the trocla agent/CLI
+#
+#Options
+# [*adapter*] Defines the adapter type to use for trocla agent. Generally YAML
+# [*adapter_options*] This will contain a hash of the actual options to pass the
+# trocla configuration. Generally you might pass the file option for key-file
+# [*keysize*] Define the length of default passwords to create. 16 by default
+class trocla::config (
+ $adapter = undef,
+ $keysize = 16,
+ $adapter_options = { 'default' => '' },
+) {
+ require trocla::master
- # deploy default config file and link it for trocla cli lookup
+# Deploy default config file and link it for trocla cli lookup
file{
"${settings::confdir}/troclarc.yaml":
- content => "---\nadapter_options:\n :file: ${settings::confdir}/trocla_data.yaml\n",
+ ensure => present,
+ content => template('trocla/troclarc.yaml.erb'),
owner => root,
group => puppet,
mode => '0640';
'/etc/troclarc.yaml':
- ensure => link,
- target => "${settings::confdir}/troclarc.yaml";
- "${settings::confdir}/trocla_data.yaml":
- ensure => present,
- owner => puppet,
- group => 0,
- mode => '0600';
+ ensure => link,
+ target => "${settings::confdir}/troclarc.yaml";
}
+
}