Fix some ansible-lint complaints.
This commit is contained in:
parent
c7030c9245
commit
2cf34e8e55
64 changed files with 357 additions and 297 deletions
|
@ -2,10 +2,11 @@
|
|||
template:
|
||||
src: interfaces-static.j2
|
||||
dest: /etc/network/interfaces.d/static
|
||||
mode: 0644
|
||||
notify: restart networking
|
||||
|
||||
- name: install shorewall packages
|
||||
apt: name=shorewall state=latest
|
||||
apt: name=shorewall state=latest # noqa package-latest
|
||||
|
||||
- name: copy shorewall configuration
|
||||
command: cp {{ item }} /etc/shorewall/
|
||||
|
@ -24,7 +25,7 @@
|
|||
- name: find files in /etc/shorewall/
|
||||
find:
|
||||
paths: /etc/shorewall/
|
||||
use_regex: yes
|
||||
use_regex: true
|
||||
pattern: '.+[^~]$'
|
||||
contains: '.*(eth0|eth1).*'
|
||||
register: find_result
|
||||
|
@ -35,7 +36,7 @@
|
|||
dest: "{{ item.path }}"
|
||||
regexp: 'eth0'
|
||||
replace: "{{ if_wan }}"
|
||||
backup: yes
|
||||
backup: true
|
||||
with_items: "{{ find_result.files }}"
|
||||
notify: restart shorewall
|
||||
|
||||
|
@ -44,7 +45,7 @@
|
|||
dest: "{{ item.path }}"
|
||||
regexp: 'eth1'
|
||||
replace: "{{ if_lan }}"
|
||||
backup: yes
|
||||
backup: true
|
||||
with_items: "{{ find_result.files }}"
|
||||
notify: restart shorewall
|
||||
|
||||
|
@ -53,7 +54,7 @@
|
|||
dest: /etc/shorewall/shorewall.conf
|
||||
regexp: 'IP_FORWARDING=Keep'
|
||||
replace: 'IP_FORWARDING=Yes'
|
||||
backup: yes
|
||||
backup: true
|
||||
notify: restart shorewall
|
||||
|
||||
- name: configure shorewall policy
|
||||
|
@ -61,7 +62,7 @@
|
|||
dest: /etc/shorewall/policy
|
||||
regexp: 'loc(\s+)net(\s+)ACCEPT'
|
||||
replace: 'loc\1all\2ACCEPT\n$FW\1all\2ACCEPT'
|
||||
backup: yes
|
||||
backup: true
|
||||
notify: restart shorewall
|
||||
|
||||
- name: configure shorewall rules
|
||||
|
@ -69,5 +70,5 @@
|
|||
dest: /etc/shorewall/rules
|
||||
regexp: '(SSH\(ACCEPT\)\s+)loc(\s+\$FW)'
|
||||
replace: '\1all\2'
|
||||
backup: yes
|
||||
backup: true
|
||||
notify: restart shorewall
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue