From 16b06320cd3bb3121446717c05b6bc13ae2ff133 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 27 Jul 2011 18:41:27 +0200 Subject: init of trocla module --- manifests/config.pp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 manifests/config.pp (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp new file mode 100644 index 0000000..3a4a356 --- /dev/null +++ b/manifests/config.pp @@ -0,0 +1,8 @@ +class trocla::config { + file{"${settings::confdir}/trocla.yaml": + source => [ "puppet:///modules/site-trocla/${fqdn}/trocla.yaml", + 'puppet:///modules/site-trocla/trocla.yaml' ], + require => Package['trocla'], + owner => root, group => puppet, mode => 0640; + } +} -- cgit v1.2.3 From d36c75a9597a1c31f448c530c17cebb72193306b Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 27 Jul 2011 19:12:55 +0200 Subject: make a better config deployment --- manifests/config.pp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index 3a4a356..78f5602 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,8 +1,21 @@ -class trocla::config { - file{"${settings::confdir}/trocla.yaml": - source => [ "puppet:///modules/site-trocla/${fqdn}/trocla.yaml", - 'puppet:///modules/site-trocla/trocla.yaml' ], - require => Package['trocla'], - owner => root, group => puppet, mode => 0640; +class trocla::config($ruby='system') { + if $trocla::default_config::ruby == 'system' or $trocla::default_config::ruby == 'both' { + require trocla::master + } + if $trocla::default_config::ruby == 'ree' or $trocla::default_config::ruby == 'both' { + require trocla::master::ree + } + + # deploy default config file and link it for trocla cli lookup + file{ + "${settings::confdir}/trocla.yaml": + content => "---\nadapter_options:\n :path: ${settings::confdir}/trocla_data.yaml\n", + owner => root, group => puppet, mode => 0640; + '/etc/trocla.yaml': + ensure => link, + target => "${settings::confdir}/trocla.yaml", + "${settings::confdir}/trocla_data.yaml": + ensure => present, + owner => puppet, group => 0, mode => 0600; } } -- cgit v1.2.3 From 6457e95758e5c7aff9e995ab49fd032e3cb80b79 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 27 Jul 2011 19:32:49 +0200 Subject: fix typo --- manifests/config.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index 78f5602..eb8a8ed 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -13,7 +13,7 @@ class trocla::config($ruby='system') { owner => root, group => puppet, mode => 0640; '/etc/trocla.yaml': ensure => link, - target => "${settings::confdir}/trocla.yaml", + target => "${settings::confdir}/trocla.yaml"; "${settings::confdir}/trocla_data.yaml": ensure => present, owner => puppet, group => 0, mode => 0600; -- cgit v1.2.3 From 8ffd1eab30b4bed765457c73ea40b994bff38b7e Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 27 Jul 2011 19:45:54 +0200 Subject: bring config filename in line with what trocla uses --- manifests/config.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index eb8a8ed..9ce8730 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -8,12 +8,12 @@ class trocla::config($ruby='system') { # deploy default config file and link it for trocla cli lookup file{ - "${settings::confdir}/trocla.yaml": + "${settings::confdir}/troclarc.yaml": content => "---\nadapter_options:\n :path: ${settings::confdir}/trocla_data.yaml\n", owner => root, group => puppet, mode => 0640; - '/etc/trocla.yaml': + '/etc/troclarc.yaml': ensure => link, - target => "${settings::confdir}/trocla.yaml"; + target => "${settings::confdir}/troclarc.yaml"; "${settings::confdir}/trocla_data.yaml": ensure => present, owner => puppet, group => 0, mode => 0600; -- cgit v1.2.3 From 7374cf944fbc1b52c438ce7e5345f94427ea876e Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 3 Aug 2011 17:25:54 +0200 Subject: fix variable lookup --- manifests/config.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index 9ce8730..c53aef1 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,8 +1,8 @@ class trocla::config($ruby='system') { - if $trocla::default_config::ruby == 'system' or $trocla::default_config::ruby == 'both' { + if $trocla::config::ruby == 'system' or $trocla::config::ruby == 'both' { require trocla::master } - if $trocla::default_config::ruby == 'ree' or $trocla::default_config::ruby == 'both' { + if $trocla::config::ruby == 'ree' or $trocla::config::ruby == 'both' { require trocla::master::ree } -- cgit v1.2.3 From 69885ba60aed1e48b18424a93d4ccf2efc57b7f3 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 14 Jan 2013 23:02:47 +0100 Subject: adapt to new moneta version --- manifests/config.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index c53aef1..a08d885 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -9,7 +9,7 @@ class trocla::config($ruby='system') { # deploy default config file and link it for trocla cli lookup file{ "${settings::confdir}/troclarc.yaml": - content => "---\nadapter_options:\n :path: ${settings::confdir}/trocla_data.yaml\n", + content => "---\nadapter_options:\n :file: ${settings::confdir}/trocla_data.yaml\n", owner => root, group => puppet, mode => 0640; '/etc/troclarc.yaml': ensure => link, -- cgit v1.2.3 From 27775313728aa85d8c127f7d37fccd97054fe965 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 14 Jan 2013 23:04:38 +0100 Subject: linting --- manifests/config.pp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index a08d885..2c00684 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,3 +1,4 @@ +# deploy a trocla config class trocla::config($ruby='system') { if $trocla::config::ruby == 'system' or $trocla::config::ruby == 'both' { require trocla::master @@ -10,12 +11,16 @@ class trocla::config($ruby='system') { file{ "${settings::confdir}/troclarc.yaml": content => "---\nadapter_options:\n :file: ${settings::confdir}/trocla_data.yaml\n", - owner => root, group => puppet, mode => 0640; + owner => root, + group => puppet, + mode => '0640'; '/etc/troclarc.yaml': - ensure => link, - target => "${settings::confdir}/troclarc.yaml"; + ensure => link, + target => "${settings::confdir}/troclarc.yaml"; "${settings::confdir}/trocla_data.yaml": - ensure => present, - owner => puppet, group => 0, mode => 0600; + ensure => present, + owner => puppet, + group => 0, + mode => '0600'; } } -- cgit v1.2.3 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 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'manifests/config.pp') 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"; } + } -- cgit v1.2.3 From 9da000c6511e85e030e431b7d951d325c2c98681 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 2 Oct 2013 10:28:01 +0200 Subject: Improve the overall experience of the module. - Extending the README - Add a trocla::yaml class for a simple quickstart. - Fixes issues: #4 & #5 --- manifests/config.pp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index ebae2f1..a3a6e01 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,18 +1,26 @@ #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 +# [*adapter*] Defines the adapter type to use for trocla agent. +# By default it's YAML +# [*adapter_options*] This will contain a hash of the adapter 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. +# [*manage_dependencies*] Whether to manage the dependencies or not. Default *true* class trocla::config ( - $adapter = undef, - $keysize = 16, - $adapter_options = { 'default' => '' }, + $adapter = 'YAML', + $password_length = 16, + $random_passwords = true, + $adapter_options = {}, + $manage_dependencies = true, ) { - require trocla::master + if $manage_dependencies { + 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": ensure => present, -- cgit v1.2.3 From 91d91c253b792b5a176159e083eb1a3f301a7e86 Mon Sep 17 00:00:00 2001 From: Timo Goebel Date: Sun, 1 Mar 2015 19:13:57 +0100 Subject: add support for encryption and ssl_options --- manifests/config.pp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'manifests/config.pp') 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 { -- cgit v1.2.3 From 8ca75f6d074b83ee48d9ce713cdb3e28e57d2cf8 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 28 Jan 2016 00:55:26 +0100 Subject: update module to make it work with all the new features of trocla 0.2.2 --- manifests/config.pp | 63 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 22 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index 7b23a3e..8c52db7 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,35 +1,55 @@ #Installs configuration files for the trocla agent/CLI # #Options -# [*adapter*] Defines the adapter type to use for trocla agent. -# 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. -# [*manage_dependencies*] Whether to manage the dependencies or not. Default *true* +# [*options*] Options for trocla. Default: empty hash. +# [*profiles*] Profiles for trocla. Default: empty hash. +# [*x509_profile_domain_constraint*] +# A profile for x509 name constraint that matches +# the own domain by default. +# This will add a profile for x509 certs with the +# option 'name_constraints' set to this array of +# domains. +# [*store*] Defines the store to be used for trocla. By default +# it's not set, meaning trocla's default (moneta) will +# be used. +# [*store_options*] This will contain a hash of the options to pass the +# trocla store configuration. +# [*encryption*] Defines the encryption method for password stored in +# the backend. By default it's not set, meaning trocla's +# default (none) will be used. +# [*encryption_options*] This will contain a hash of the options for the +# encryption. Default: empty Hash +# [*manage_dependencies*] Whether to manage the dependencies or not. +# Default *true* class trocla::config ( - $adapter = 'YAML', - $password_length = 16, - $random_passwords = true, - $adapter_options = {}, - $encryption = undef, - $ssl_options = {}, - $manage_dependencies = true, + $options = {}, + $profiles = {}, + $x509_profile_domain_constraints = [$::domain], + $store = undef, + $store_options = {}, + $encryption = undef, + $encryption_options = {}, + $manage_dependencies = true, ) { + include ::trocla::params if $manage_dependencies { - require trocla::master + require ::trocla::master + } + + if empty($x509_profile_domain_constraints) { + $merged_profiles = $profiles + } else { + $default_profiles = { + "${trocla::params::sysdomain_profile_name}" => { + name_constraints => $x509_profile_domain_constraints + } + } + $merged_profiles = merge($default_profiles,$profiles) } # Deploy default config file and link it for trocla cli lookup file{ "${settings::confdir}/troclarc.yaml": - ensure => present, content => template('trocla/troclarc.yaml.erb'), owner => root, group => puppet, @@ -38,5 +58,4 @@ class trocla::config ( ensure => link, target => "${settings::confdir}/troclarc.yaml"; } - } -- cgit v1.2.3