Puppet Class: csf::install

Inherits:
csf
Defined in:
manifests/install.pp

Overview

csf::install



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'manifests/install.pp', line 2

class csf::install inherits csf {
  # this installs csf and reloads it
  if $::operatingsystem == 'CentOS' and versioncmp($::operatingsystemmajrelease, '7') < 0 {
    package { 'iptables-ipv6':
      ensure => installed,
      before => Exec['csf-install'],
    }
  }

  package { 'csf-perl':
    ensure => installed,
    name   => 'perl',
  }
  -> exec { 'csf-install':
    cwd     => '/tmp',
    command => "/usr/bin/curl -o csf.tgz ${::csf::download_location} && tar -xzf csf.tgz && cd csf && sh install.sh",
    creates => '/usr/sbin/csf',
    notify  => Service['csf'],
    require => Package['csf-perl'],
  }

  # make sure testing is disabled, we trust puppet enough
  csf::config { 'TESTING': value => '0' }

  # make sure puppet masters are always accessible
  csf::ipv4::output { '8140': require => Exec['csf-install'], }
}