Setup iptables-clear.sh

Move this from the nova repo
This commit is contained in:
Andy McCrae 2016-05-26 11:33:41 +01:00
parent 7e95e72303
commit a6ed9873f3
2 changed files with 28 additions and 0 deletions

26
iptables-clear.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
#
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

View File

@ -16,6 +16,8 @@
- name: Playbook for configuring the LXC host
hosts: localhost
pre_tasks:
- name: Clear iptables rules
shell: ./iptables-clear.sh
- name: Update apt cache
apt:
update_cache: yes