11-25 update
This commit is contained in:
@ -44,6 +44,20 @@
|
||||
regexp: '^#? *iface {{ current_iface }} inet dhcp'
|
||||
line: '# iface {{ current_iface }} inet dhcp'
|
||||
backrefs: yes
|
||||
|
||||
# - name: Create auto iface line for main interface
|
||||
# lineinfile:
|
||||
# dest: /etc/network/interfaces
|
||||
# regexp: '^#? *auto {{ current_iface }}'
|
||||
# line: 'auto {{ current_iface }}'
|
||||
# backrefs: yes
|
||||
#
|
||||
# - name: Create iface manual line for main interface
|
||||
# lineinfile:
|
||||
# dest: /etc/network/interfaces
|
||||
# regexp: '^#? *iface {{ current_iface }} inet manual'
|
||||
# line: 'iface {{ current_iface }} inet manual'
|
||||
# backrefs: yes
|
||||
|
||||
- name: Create new bridge interface file
|
||||
template:
|
||||
@ -61,6 +75,16 @@
|
||||
bridge link
|
||||
register: bridge_status
|
||||
|
||||
# enable routing on bridge
|
||||
- name: "Enable routing on {{ bridge_name }}"
|
||||
shell: "iptables -A FORWARD -i {{ bridge_name }} -o {{ bridge_name }} -j ACCEPT"
|
||||
|
||||
# Make iptables rules persistent
|
||||
- name: Persistence - iptables
|
||||
shell: |
|
||||
netfilter-persistent save
|
||||
netfilter-persistent reload
|
||||
|
||||
- name: show bridge status
|
||||
debug:
|
||||
msg:
|
||||
|
||||
Reference in New Issue
Block a user