From 718d1a4d36580cd402f0f108955f5ebf788d38d1 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 14 Apr 2015 15:21:34 +0200 Subject: move fail2ban to separate manifest file --- global/overlay/etc/puppet/manifests/cosmos-site.pp | 25 ++-------------------- .../etc/puppet/modules/sunet/manifests/fail2ban.pp | 20 +++++++++++++++++ 2 files changed, 22 insertions(+), 23 deletions(-) create mode 100644 global/overlay/etc/puppet/modules/sunet/manifests/fail2ban.pp (limited to 'global/overlay') diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp index 06a43da..cf0e7c5 100644 --- a/global/overlay/etc/puppet/manifests/cosmos-site.pp +++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp @@ -697,7 +697,7 @@ node 'cdr1.sunet.se' { } node 'sto-tug-kvm2.swamid.se' { - class { 'fail2ban': } + class { 'sunet::fail2ban': } package {'nagios-nrpe-server': ensure => 'installed', } -> @@ -821,27 +821,6 @@ class entropyserver { } } -class fail2ban { - - include augeas - - package {'fail2ban': - ensure => 'latest' - } -> - service {'fail2ban': - ensure => 'running' - } - augeas { "fail2ban_defaults": - context => "/files/etc/fail2ban/jail.conf", - incl => "/etc/fail2ban/jail.conf", - lens => "Shellvars.lns", - changes => [ - 'set bantime "600800"', - ], - notify => Service['fail2ban'], - } -} - class quantis { apt::ppa {'ppa:ndn/quantispci': } package {'quantispci-dkms': } @@ -858,7 +837,7 @@ class webfrontend { class webappserver { class { 'webcommon': } - class { 'fail2ban': } + class { 'sunet::fail2ban': } } class webbackend { diff --git a/global/overlay/etc/puppet/modules/sunet/manifests/fail2ban.pp b/global/overlay/etc/puppet/modules/sunet/manifests/fail2ban.pp new file mode 100644 index 0000000..8dc6e31 --- /dev/null +++ b/global/overlay/etc/puppet/modules/sunet/manifests/fail2ban.pp @@ -0,0 +1,20 @@ +class sunet::fail2ban { + + include augeas + + package {'fail2ban': + ensure => 'latest' + } -> + service {'fail2ban': + ensure => 'running' + } + augeas { "fail2ban_defaults": + context => "/files/etc/fail2ban/jail.conf", + incl => "/etc/fail2ban/jail.conf", + lens => "Shellvars.lns", + changes => [ + 'set bantime "600800"', + ], + notify => Service['fail2ban'], + } +} -- cgit v1.1