6
7
8
9
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'manifests/server/install.pp', line 6
class hyperglass::server::install {
assert_private()
user { 'hyperglass':
ensure => 'present',
managehome => true,
purge_ssh_keys => true,
system => true,
home => '/opt/hyperglass/hyperglass-server',
}
group { 'hyperglass':
ensure => 'present',
system => true,
}
file { '/opt/hyperglass/hyperglass-server/hyperglass':
ensure => 'directory',
owner => 'hyperglass',
group => 'hyperglass',
}
file { '/opt/hyperglass/hyperglass-server/hyperglass/static':
ensure => 'directory',
owner => 'hyperglass',
group => 'hyperglass',
require => File['/opt/hyperglass/hyperglass-server/hyperglass'],
}
file { ['/opt/hyperglass/hyperglass-server/hyperglass/static/ui', '/opt/hyperglass/hyperglass-server/hyperglass/static/images', '/opt/hyperglass/hyperglass-server/hyperglass/static/custom']:
ensure => 'directory',
owner => 'hyperglass',
group => 'hyperglass',
require => File['/opt/hyperglass/hyperglass-server/hyperglass/static'],
}
file { '/opt/hyperglass/hyperglass-server/hyperglass/static/images/favicons':
ensure => 'directory',
owner => 'hyperglass',
group => 'hyperglass',
require => File['/opt/hyperglass/hyperglass-server/hyperglass/static/images'],
}
# we need to explicitly set the version here. During the first puppet run, python3 will be installed but isn't present yet
# due to that the fact is undef and fails. the default of the `version` attribute is the fact. We workaround this by hardcoding
# the python version
python::pyvenv { '/opt/hyperglass/hyperglass-server/virtualenv':
ensure => 'present',
owner => 'hyperglass',
group => 'hyperglass',
systempkgs => false,
version => pick($facts['python3_version'], '3.6'),
}
python::pip { 'hyperglass':
virtualenv => '/opt/hyperglass/hyperglass-server/virtualenv',
owner => 'hyperglass',
group => 'hyperglass',
}
}
|