Puppet Class: hyperglass::server::config

Defined in:
manifests/server/config.pp

Summary

writes the hyperglass config files

Overview

Parameters:

  • devices (Hash) (defaults to: $hyperglass::server::devices)

    hash containing all the devices hyperglass can connect to. Defaults to demo data so the service starts properly.

  • commands (Hash) (defaults to: $hyperglass::server::commands)

    specific commands that can be used by the devices

  • data (Hash) (defaults to: $hyperglass::server::data)

    generic hyperglass configuration hash

Author:

  • Tim Meusel <tim@bastelfreak.de>



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/server/config.pp', line 10

class hyperglass::server::config (
  Hash $devices  = $hyperglass::server::devices,
  Hash $data     = $hyperglass::server::data,
  Hash $commands = $hyperglass::server::commands,
) {
  assert_private()
  file { '/opt/hyperglass/hyperglass-server/hyperglass/hyperglass.yaml':
    ensure  => 'file',
    owner   => 'hyperglass',
    group   => 'hyperglass',
    content => to_yaml($data),
  }
  file { '/opt/hyperglass/hyperglass-server/hyperglass/commands.yaml':
    ensure  => 'file',
    owner   => 'hyperglass',
    group   => 'hyperglass',
    content => to_yaml($commands),
  }

  file { '/opt/hyperglass/hyperglass-server/hyperglass/devices.yaml':
    ensure  => 'file',
    owner   => 'hyperglass',
    group   => 'hyperglass',
    content => to_yaml($devices),
  }
}