9
0
Fork 1
soc-ops/global/overlay/etc/puppet/modules/soc/manifests/vuln_dashboard.pp

37 lines
1.2 KiB
ObjectPascal
Raw Normal View History

2024-12-06 13:18:18 +01:00
class soc::vuln_dashboard(
String $allowed_hosts = $facts['networking']['fqdn'],
String $docker_tag = 'latest',
2024-12-06 12:35:49 +01:00
String $db_datadir = '/opt/vuln-dashboard/dbdata',
String $pocs_storage_dir = '/opt/vuln-dashboard/pocsdata',
String $sso_service_name = 'dashboard-dev',
2024-12-06 13:12:27 +01:00
) {
2024-12-06 12:35:49 +01:00
$db_name=lookup('vuln-dashboard.dn_name', undef, undef, 'sunet')
$db_user=lookup('vuln-dashboard.db_user', undef, undef, 'playground')
$db_pass=lookup('vuln-dashboard.db_pass', undef, undef, 'password')
$db_port=lookup('vuln-dashbaord.db_port', undef, undef, '5432')
$db_host=lookup('vuln-dashboard.db_host', undef, undef, 'postgres')
$censys_api_secret=lookup('vuln-dashboard.censys_api_secret', undef, undef, 'null')
$censys_api_id=lookup('vuln-dashboard.censys.api_id', undef, undef, 'null')
file {
'/opt/vuln-dashboard':
ensure => directory,
;
2024-12-06 13:22:06 +01:00
$db_datadir:
2024-12-06 12:35:49 +01:00
ensure => directory,
;
2024-12-06 13:22:06 +01:00
$pocs_storage_dir:
2024-12-06 12:35:49 +01:00
ensure => directory,
2024-12-06 13:15:25 +01:00
;
2024-12-06 12:35:49 +01:00
}
2024-12-06 13:20:15 +01:00
sunet::docker_compose { 'vuln-dashboard':
2024-12-06 12:35:49 +01:00
service_name => 'vuln-dashboard',
description => 'SOC vuln dashboard',
2024-12-06 13:16:53 +01:00
compose_dir => '/opt/vuln-dashboard',
2024-12-06 12:35:49 +01:00
content => template('soc/vuln-dashboard/docker-compose.yml.erb'),
}
}