From fca65b8710668da4646e49cc91d7524f047ab116 Mon Sep 17 00:00:00 2001 From: Justice London Date: Fri, 12 Jul 2013 18:14:53 -0400 Subject: Release of 0.0.2 module which includes template base configuration for trocla CLI. --- manifests/config.pp | 36 +++++++++++++++++++----------------- manifests/init.pp | 6 ++++++ manifests/master.pp | 14 +++++++++++--- 3 files changed, 36 insertions(+), 20 deletions(-) create mode 100644 manifests/init.pp (limited to 'manifests') 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, } -- cgit v1.2.3