summaryrefslogtreecommitdiff
path: root/manifests/config.pp
blob: ebae2f14a4da51082f6784d412311b125748147f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#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
  file{
    "${settings::confdir}/troclarc.yaml":
      ensure  => present,
      content => template('trocla/troclarc.yaml.erb'),
      owner   => root,
      group   => puppet,
      mode    => '0640';
    '/etc/troclarc.yaml':
      ensure => link,
      target => "${settings::confdir}/troclarc.yaml";
  }

}