Fix puppet-lint errors in puppet-packstack module
Change-Id: Ic2faf1f37e3231a2a4eaf521fc5d7fb5c772ce16 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
parent
5fb7192905
commit
c9703a1237
|
@ -2,7 +2,13 @@
|
|||
# hosts that need to connect via FIREWALL_PORTS
|
||||
# using FIREWALL_CHAIN
|
||||
|
||||
define packstack::firewall($host, $service_name, $chain = "INPUT", $ports = undef, $proto = 'tcp') {
|
||||
define packstack::firewall (
|
||||
$host,
|
||||
$service_name,
|
||||
$chain = 'INPUT',
|
||||
$ports = undef,
|
||||
$proto = 'tcp'
|
||||
) {
|
||||
$ip_version = hiera('CONFIG_IP_VERSION')
|
||||
|
||||
$provider = $ip_version ? {
|
||||
|
@ -26,20 +32,20 @@ define packstack::firewall($host, $service_name, $chain = "INPUT", $ports = unde
|
|||
|
||||
if $ports == undef {
|
||||
firewall { "001 ${service_name} ${heading} ${title}":
|
||||
chain => $chain,
|
||||
proto => $proto,
|
||||
action => 'accept',
|
||||
source => $source,
|
||||
chain => $chain,
|
||||
proto => $proto,
|
||||
action => 'accept',
|
||||
source => $source,
|
||||
provider => $provider,
|
||||
}
|
||||
}
|
||||
else {
|
||||
firewall { "001 ${service_name} ${heading} ${title}":
|
||||
chain => $chain,
|
||||
proto => $proto,
|
||||
dport => $ports,
|
||||
action => 'accept',
|
||||
source => $source,
|
||||
chain => $chain,
|
||||
proto => $proto,
|
||||
dport => $ports,
|
||||
action => 'accept',
|
||||
source => $source,
|
||||
provider => $provider,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,19 +3,18 @@
|
|||
# and iproute
|
||||
|
||||
class packstack::netns (
|
||||
$warning = "Kernel package with netns support has been installed."
|
||||
)
|
||||
{
|
||||
if $::netns_support != "true" {
|
||||
exec { "netns_dependecy_install":
|
||||
path => "/usr/bin/",
|
||||
command => "yum update -y kernel iputils iproute",
|
||||
timeout => 900,
|
||||
}
|
||||
|
||||
notify { "packstack_info":
|
||||
message => $warning,
|
||||
require => Exec["netns_dependecy_install"],
|
||||
}
|
||||
$warning = 'Kernel package with netns support has been installed.'
|
||||
) {
|
||||
if $::netns_support != true {
|
||||
exec { 'netns_dependecy_install':
|
||||
path => '/usr/bin/',
|
||||
command => 'yum update -y kernel iputils iproute',
|
||||
timeout => 900,
|
||||
}
|
||||
|
||||
notify { 'packstack_info':
|
||||
message => $warning,
|
||||
require => Exec['netns_dependecy_install'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,35 +2,35 @@
|
|||
# Loads bridge modules and sets appropriate sysctl.conf variables
|
||||
|
||||
class packstack::neutron::bridge {
|
||||
file { 'bridge-module-loader':
|
||||
path => '/etc/sysconfig/modules/openstack-neutron.modules',
|
||||
ensure => present,
|
||||
mode => 0700,
|
||||
content => template('packstack/openstack-neutron.modules.erb'),
|
||||
} -> exec { 'load-bridge':
|
||||
path => ['/sbin', '/usr/sbin'],
|
||||
command => 'modprobe -b bridge',
|
||||
logoutput => 'on_failure'
|
||||
} -> exec { 'load-bridge-netfilter':
|
||||
path => ['/sbin', '/usr/sbin', '/bin', '/usr/bin'],
|
||||
command => 'modprobe -b br_netfilter',
|
||||
logoutput => 'on_failure',
|
||||
unless => 'test -d /proc/sys/net/bridge'
|
||||
} -> file_line { '/etc/sysctl.conf bridge-nf-call-ip6tables':
|
||||
path => '/etc/sysctl.conf',
|
||||
line => 'net.bridge.bridge-nf-call-ip6tables=1',
|
||||
match => 'net.bridge.bridge-nf-call-ip6tables\s*=',
|
||||
} -> file_line { '/etc/sysctl.conf bridge-nf-call-iptables':
|
||||
path => '/etc/sysctl.conf',
|
||||
line => 'net.bridge.bridge-nf-call-iptables=1',
|
||||
match => 'net.bridge.bridge-nf-call-iptables\s*=',
|
||||
} -> file_line { '/etc/sysctl.conf bridge-nf-call-arptables':
|
||||
path => '/etc/sysctl.conf',
|
||||
line => 'net.bridge.bridge-nf-call-arptables=1',
|
||||
match => 'net.bridge.bridge-nf-call-arptables\s*=',
|
||||
} -> exec { 'sysctl_refresh':
|
||||
path => ['/usr/sbin', '/sbin', '/usr/bin', '/bin'],
|
||||
command => 'sysctl -p /etc/sysctl.conf',
|
||||
logoutput => 'on_failure',
|
||||
}
|
||||
file { 'bridge-module-loader':
|
||||
ensure => file,
|
||||
path => '/etc/sysconfig/modules/openstack-neutron.modules',
|
||||
mode => '0700',
|
||||
content => template('packstack/openstack-neutron.modules.erb'),
|
||||
} -> exec { 'load-bridge':
|
||||
path => ['/sbin', '/usr/sbin'],
|
||||
command => 'modprobe -b bridge',
|
||||
logoutput => 'on_failure',
|
||||
} -> exec { 'load-bridge-netfilter':
|
||||
path => ['/sbin', '/usr/sbin', '/bin', '/usr/bin'],
|
||||
command => 'modprobe -b br_netfilter',
|
||||
logoutput => 'on_failure',
|
||||
unless => 'test -d /proc/sys/net/bridge',
|
||||
} -> file_line { '/etc/sysctl.conf bridge-nf-call-ip6tables':
|
||||
path => '/etc/sysctl.conf',
|
||||
line => 'net.bridge.bridge-nf-call-ip6tables=1',
|
||||
match => 'net.bridge.bridge-nf-call-ip6tables\s*=',
|
||||
} -> file_line { '/etc/sysctl.conf bridge-nf-call-iptables':
|
||||
path => '/etc/sysctl.conf',
|
||||
line => 'net.bridge.bridge-nf-call-iptables=1',
|
||||
match => 'net.bridge.bridge-nf-call-iptables\s*=',
|
||||
} -> file_line { '/etc/sysctl.conf bridge-nf-call-arptables':
|
||||
path => '/etc/sysctl.conf',
|
||||
line => 'net.bridge.bridge-nf-call-arptables=1',
|
||||
match => 'net.bridge.bridge-nf-call-arptables\s*=',
|
||||
} -> exec { 'sysctl_refresh':
|
||||
path => ['/usr/sbin', '/sbin', '/usr/bin', '/bin'],
|
||||
command => 'sysctl -p /etc/sysctl.conf',
|
||||
logoutput => 'on_failure',
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue