9
0
Fork 1
soc-ops/global/overlay/etc/puppet/modules/soc/manifests/intelmq.pp
2024-11-14 10:28:47 +01:00

45 lines
1 KiB
Puppet

class soc::intelmq(
) {
group { 'intelmq':
ensure => present,
}
user { 'intelmq':
ensure => present,
gid => 'intelmq',
groups => 'www-data',
home => '/opt/intelmq',
managehome => true,
shell => '/bin/bash',
}
file { '/etc/intelmq':
ensure => directory,
owner => 'intelmq',
group => 'intelmq',
}
# file { '/opt/sso/apache/groups.txt':
# ensure => file,
# content => template('soc/sso/apache-groups.txt.erb')
# }
package { ['apache2', 'libapache2-mod-wsgi-py3', 'postgresql', 'python3-venv', 'python3-pip', 'python3-gpg', 'python3-psycopg2']:
ensure => 'latest',
}
exec { 'sudo -u intelmq /usr/bin/python3 -m venv --system-site-packages /opt/intelmq/venv':
creates => '/opt/intelmq/venv',
}
file { '/opt/intelmq/install-intelmq.sh':
ensure => file,
content => file('soc/intelmq/install-intelmq.sh'),
mode => '0555',
}
exec { 'sudo -u intelmq /opt/intelmq/install-intelmq.sh':
creates => '/opt/intelmq/.installed'
}
}