Allow gre through firewalld with one liner
Change-Id: I43c47dc1d91db5082f24ebc762590cbf2d3452ab Closes-Bug: 1641077
This commit is contained in:
parent
1921e2011a
commit
8854d867fd
|
@ -83,5 +83,10 @@ def fix_selinux_permission(path):
|
|||
'{}'.format(path))
|
||||
|
||||
|
||||
def allow_gre_firewalld():
|
||||
sudo('firewall-cmd --permanent --direct \
|
||||
--add-rule ipv4 filter INPUT 0 -p gre -j ACCEPT')
|
||||
|
||||
|
||||
def fix_local_ip(f):
|
||||
sudo('sed -i "s!LOCAL_IP!{}!g" {}'.format(env.host, f))
|
||||
|
|
|
@ -39,6 +39,7 @@ from fabfile import (
|
|||
enable_service,
|
||||
enable_shell,
|
||||
disable_shell,
|
||||
allow_gre_firewalld,
|
||||
fix_path_ownership,
|
||||
fix_selinux_permission,
|
||||
fix_local_ip
|
||||
|
@ -112,8 +113,12 @@ class REMOTEProxy():
|
|||
def install(self):
|
||||
self._setup_yum()
|
||||
self._install_packages()
|
||||
self._allow_gre_firewalld()
|
||||
self._enable_services()
|
||||
|
||||
def _allow_gre_firewalld(self):
|
||||
execute(allow_gre_firewalld)
|
||||
|
||||
def _setup_yum(self):
|
||||
log('Setup yum')
|
||||
repo_id = 1
|
||||
|
|
Loading…
Reference in New Issue