-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlibre_db_only.pp
54 lines (46 loc) · 1.01 KB
/
libre_db_only.pp
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
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
######## DATABASE SERVER ########
package { 'epel-release':
ensure => installed,
}
package { 'net-snmp':
ensure => installed,
}
package { 'git':
ensure => installed,
}
user { 'librenms':
comment => 'Libre NMS',
home => '/opt/librenms',
ensure => present,
system => true,
#shell => '/bin/bash',
}
user { 'apache':
ensure => present,
groups => 'librenms',
}
service { 'snmpd':
enable => true,
ensure => running,
}
class { '::mysql::server':
root_password => $::mysql_root_pass,
remove_default_accounts => true,
restart => true,
override_options => {
mysqld => { bind_address => "${::libre_db_bind_addr}"}
},
}
mysql::db { $::libre_db_name:
user => $::libre_db_user,
password => $::libre_db_pass,
host => '%',
grant => ['ALL'],
#sql => '/opt/librenms/build.sql',
#import_timeout => 900,
}
#
service { 'mariadb.service':
enable => true,
ensure => running,
}