From 3c5f2c39fe0cd188e10cec06b6ad839e928d2751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bj=C3=B6rklund?= Date: Thu, 14 Nov 2024 14:38:54 +0100 Subject: [PATCH] Bugfix. --- .../etc/puppet/modules/soc/manifests/intelmq.pp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/global/overlay/etc/puppet/modules/soc/manifests/intelmq.pp b/global/overlay/etc/puppet/modules/soc/manifests/intelmq.pp index d794031..6a794d9 100644 --- a/global/overlay/etc/puppet/modules/soc/manifests/intelmq.pp +++ b/global/overlay/etc/puppet/modules/soc/manifests/intelmq.pp @@ -95,8 +95,9 @@ class soc::intelmq( } file { '/etc/apache2/sites-available/intelmq-vhost.conf': - ensure => file, + ensure => file, content => template('soc/intelmq/intelmq-vhost.conf.erb'), + notify => Service['apache2'], } file { '/etc/intelmq/api-config.json': @@ -141,4 +142,15 @@ class soc::intelmq( hasrestart => true, } + exec { 'Disable default apache conf': + command => 'a2dissite 000-default', + onlyif => 'test -f /etc/apache2/sites-enabled/000-default.conf', + notify => Service['apache2'], + } + + exec { 'Enable intelmq apache conf': + command => 'a2ensite intelmq-vhost', + creates => '/etc/apache2/sites-enabled/intelmq-vhost.conf' + notify => Service['apache2'], + } }