summaryrefslogtreecommitdiff
path: root/manifests/yaml.pp
diff options
context:
space:
mode:
authorkwadronaut <kwadronaut@leap.se>2016-07-25 00:44:22 +0200
committerkwadronaut <kwadronaut@leap.se>2016-07-25 00:44:22 +0200
commit30bc1e889dd0042132c4da21b94780c5a530b67c (patch)
treee430d45f553364c232626961df1647052166169d /manifests/yaml.pp
parentc0d2832dff7fb14e056a49b28860087b2f201619 (diff)
parent8c1aac4f23d245cda54994737c72a868d112db87 (diff)
mixed up trocla and puppet_trocla repos, sorryHEADmaster
Diffstat (limited to 'manifests/yaml.pp')
-rw-r--r--manifests/yaml.pp41
1 files changed, 41 insertions, 0 deletions
diff --git a/manifests/yaml.pp b/manifests/yaml.pp
new file mode 100644
index 0000000..7727219
--- /dev/null
+++ b/manifests/yaml.pp
@@ -0,0 +1,41 @@
+# A class for an eady start with trocla.
+# This will install and configure trocla with the
+# default yaml storage.
+#
+# [*data_file*] Where to store the passwords.
+# Default: /var/lib/trocla/trocla_data.yaml
+# This should be managed using the package.
+class trocla::yaml(
+ $manage_data_dir = true,
+ $data_file = '/var/lib/trocla/trocla_data.yaml',
+) {
+
+ class{'trocla::config':
+ store => 'moneta',
+ store_options => {
+ adapter => 'YAML',
+ adapter_options => {
+ file => $data_file,
+ },
+ },
+ }
+
+ if $manage_data_dir {
+ $data_dir = dirname($data_file)
+ file{$data_dir:
+ ensure => directory,
+ owner => puppet,
+ group => 0,
+ mode => '0600',
+ require => Package['trocla'];
+ }
+ }
+ file{
+ $data_file:
+ ensure => file,
+ owner => puppet,
+ group => 0,
+ mode => '0600',
+ require => Package['trocla'];
+ }
+}