#####  FIREWALL TEMPLATES STORED IN /var/lib/puppet/templates ###########################################
#########################################################################################################
#########################################################################################################

class openemr1::firewall {
        file {'/.../CUSTOM_FIREWALL_RULES':
                ensure => "directory",
        } ->
        concat { '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules':
                ensure => present,
                mode => 700,
        }
        concat::fragment { 'IPTABLES-BASE-RULES-CREATION':
                target => '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules',
                content => template('openemr1_firewall_base_rules.erb'),
        }
        exec { 'load_firewall_base_rules':
                command => "/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules",
        }
}

class healthitfirewall::firewall {
        file {'/.../CUSTOM_FIREWALL_RULES':
                ensure => "directory",
        } ->
        concat { '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules':
                ensure => present,
                mode => 700,
        }
        concat::fragment { 'IPTABLES-BASE-RULES-CREATION':
                target => '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules',
                content => template('healthitfirewall_firewall_base_rules.erb'),
        }
        exec { 'load_firewall_base_rules':
                command => "/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules",
        }
}

class puppet::firewall {
        file {'/.../CUSTOM_FIREWALL_RULES':
                ensure => "directory",
        } ->
        concat { '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules':
                ensure => present,
                mode => 700,
        }
        concat::fragment { 'IPTABLES-BASE-RULES-CREATION':
                target => '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules',
                content => template('puppet_firewall_base_rules.erb'),
        }
        exec { 'load_firewall_base_rules':
                command => "/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules",
        }
}

class healthitdns::firewall {
	file {'/.../CUSTOM_FIREWALL_RULES':
                ensure => "directory",
        } ->
        concat { '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules':
                ensure => present,
                mode => 700,
        }
        concat::fragment { 'IPTABLES-BASE-RULES-CREATION':
                target => '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules',
                content => template('dns_firewall_base_rules.erb'),
        }
        exec { 'load_firewall_base_rules':
                command => "/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules",
        }
}

class healthitdnse::firewall {
	file {'/.../CUSTOM_FIREWALL_RULES':
                ensure => "directory",
        } ->
        concat { '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules':
                ensure => present,
                mode => 700,
        }
        concat::fragment { 'IPTABLES-BASE-RULES-CREATION':
                target => '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules',
                content => template('dnse_firewall_base_rules.erb'),
        }
        exec { 'load_firewall_base_rules':
                command => "/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules",
        }
}

class healthitca::firewall {
	file {'/.../CUSTOM_FIREWALL_RULES':
                ensure => "directory",
        } ->
        concat { '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules':
                ensure => present,
                mode => 700,
        }
        concat::fragment { 'IPTABLES-BASE-RULES-CREATION':
                target => '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules',
                content => template('healthitca_firewall_base_rules.erb'),
        }
        exec { 'load_firewall_base_rules':
                command => "/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules",
        }
}

class healthitbackup::firewall {
	file {'/.../CUSTOM_FIREWALL_RULES':
                ensure => "directory",
        } ->
        concat { '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules':
                ensure => present,
                mode => 700,
        }
        concat::fragment { 'IPTABLES-BASE-RULES-CREATION':
                target => '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules',
                content => template('healthitbackup_firewall_base_rules.erb'),
        }
        exec { 'load_firewall_base_rules':
                command => "/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules",
        }
}

class healthitconman::firewall {
	file {'/.../CUSTOM_FIREWALL_RULES':
                ensure => "directory",
        } ->
        concat { '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules':
                ensure => present,
                mode => 700,
        }
        concat::fragment { 'IPTABLES-BASE-RULES-CREATION':
                target => '/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules',
                content => template('webserve_firewall_base_rules.erb'),
        }
        exec { 'load_firewall_base_rules':
                command => "/.../CUSTOM_FIREWALL_RULES/custom.iptables.rules",
        }
}
