Sha256: 0fe683434c2d31158c7814441c58bbc0bf8a00ff73fc41dc871bd15052537779

Contents?: true

Size: 1.22 KB

Versions: 20

Compression:

Stored size: 1.22 KB

Contents

# = Class: firewall::linux
#
# Installs the `iptables` package for Linux operating systems and includes
# the appropriate sub-class for any distribution specific services and
# additional packages.
#
# == Parameters:
#
# [*ensure*]
#   Ensure parameter passed onto Service[] resources. When `running` the
#   service will be started on boot, and when `stopped` it will not.
#   Default: running
#
class firewall::linux (
  $ensure = running
) {
  $enable = $ensure ? {
    running => true,
    stopped => false,
  }

  package { 'iptables':
    ensure => present,
  }

  case $::operatingsystem {
    'RedHat', 'CentOS', 'Fedora', 'Scientific', 'SL', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL', 'Amazon', 'XenServer': {
      class { "${title}::redhat":
        ensure  => $ensure,
        enable  => $enable,
        require => Package['iptables'],
      }
    }
    'Debian', 'Ubuntu': {
      class { "${title}::debian":
        ensure  => $ensure,
        enable  => $enable,
        require => Package['iptables'],
      }
    }
    'Archlinux': {
      class { "${title}::archlinux":
        ensure  => $ensure,
        enable  => $enable,
        require => Package['iptables'],
      }
    }
    default: {}
  }
}

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/firewall/manifests/linux.pp
freighthop-0.6.0 modules/firewall/manifests/linux.pp
freighthop-0.5.2 modules/firewall/manifests/linux.pp
freighthop-0.5.1 modules/firewall/manifests/linux.pp
freighthop-0.5.0 modules/firewall/manifests/linux.pp
freighthop-0.4.1 modules/firewall/manifests/linux.pp
freighthop-0.4.0 modules/firewall/manifests/linux.pp
freighthop-0.3.3 modules/firewall/manifests/linux.pp
freighthop-0.3.2 modules/firewall/manifests/linux.pp
freighthop-0.3.1 modules/firewall/manifests/linux.pp
freighthop-0.3.0 modules/firewall/manifests/linux.pp
freighthop-0.2.1 modules/firewall/manifests/linux.pp
freighthop-0.2.0 modules/firewall/manifests/linux.pp
freighthop-0.1.0 modules/firewall/manifests/linux.pp
freighthop-0.0.6 modules/firewall/manifests/linux.pp
freighthop-0.0.5 modules/firewall/manifests/linux.pp
freighthop-0.0.4 modules/firewall/manifests/linux.pp
freighthop-0.0.3 modules/firewall/manifests/linux.pp
freighthop-0.0.2 modules/firewall/manifests/linux.pp
freighthop-0.0.1 modules/firewall/manifests/linux.pp