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

36 lines
1.2 KiB
Puppet

class soc::vuln_dashboard(
String $allowed_hosts = $facts['networking']['fqdn'],
String $docker_tag = 'latest',
String $db_datadir = '/opt/vuln-dashboard/dbdata',
String $pocs_storage_dir = '/opt/vuln-dashboard/pocsdata',
String $sso_service_name = 'dashboard-dev',
) {
$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,
;
$db_datadir:
ensure => directory,
;
$pocs_storage_dir:
ensure => directory,
;
}
sunet::docker_compose { 'vuln-dashboard':
service_name => 'vuln-dashboard',
description => 'SOC vuln dashboard',
compose_dir => '/opt/vuln-dashboard',
content => template('soc/vuln-dashboard/docker-compose.yml.erb'),
}
}