summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJustice London <jlondon@syrussystems.com>2013-07-12 18:14:53 -0400
committerJustice London <jlondon@syrussystems.com>2013-07-23 12:15:05 -0400
commitfca65b8710668da4646e49cc91d7524f047ab116 (patch)
treea4d6b8436607d65619b99f4250ce964103617bab /manifests
parent57d9f3125bafaf3aebc228f0c718d1b104c35a4e (diff)
Release of 0.0.2 module which includes template base configuration for trocla CLI.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/config.pp36
-rw-r--r--manifests/init.pp6
-rw-r--r--manifests/master.pp14
3 files changed, 36 insertions, 20 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";
}
+
}
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..cf5223e
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,6 @@
+#Main definition class for trocla. Just calls master
+class trocla {
+
+ include trocla::master
+
+}
diff --git a/manifests/master.pp b/manifests/master.pp
index 0123a56..5d5788f 100644
--- a/manifests/master.pp
+++ b/manifests/master.pp
@@ -5,10 +5,18 @@
# [Remember: No empty lines between comments and class definition]
class trocla::master {
- require rubygems::moneta
- require rubygems::highline
+# require rubygems::moneta
+# require rubygems::highline
- package{'trocla':
+ package { 'moneta':
+ ensure => present,
+ provider => gem,
+ }
+ package { 'highline':
+ ensure => present,
+ provider => gem,
+ }
+ package {'trocla':
ensure => present,
provider => gem,
}