diff options
author | duritong <peter.meier+github@immerda.ch> | 2013-09-04 15:02:11 -0700 |
---|---|---|
committer | duritong <peter.meier+github@immerda.ch> | 2013-09-04 15:02:11 -0700 |
commit | 6043761b61716370b375d3e168b36b3bbe49b0e7 (patch) | |
tree | f1fca2b8b55997b3f644ead7fd5cb99e7694f231 /manifests | |
parent | 57d9f3125bafaf3aebc228f0c718d1b104c35a4e (diff) | |
parent | 9fb3286e24548cb3a6a6722e57a005737246fb5a (diff) |
Merge pull request #3 from justicel/master
Release of 0.0.2 module which includes template base configuration for t...
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/config.pp | 36 | ||||
-rw-r--r-- | manifests/init.pp | 6 | ||||
-rw-r--r-- | manifests/master.pp | 28 |
3 files changed, 49 insertions, 21 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..64444b1 100644 --- a/manifests/master.pp +++ b/manifests/master.pp @@ -3,13 +3,33 @@ # This module manages the necessary things for trocla on a master. # # [Remember: No empty lines between comments and class definition] -class trocla::master { +class trocla::master ( + $install_deps = false, + $use_rubygems = true, +) { - require rubygems::moneta - require rubygems::highline + #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 { + package { 'moneta': + ensure => present, + provider => gem, + } + package { 'highline': + ensure => present, + provider => gem, + } + } - package{'trocla': + #Main trocla install + package {'trocla': ensure => present, provider => gem, } + } |