Skip to content

Commit

Permalink
Fix warnings for ufw examples (ansible#63505)
Browse files Browse the repository at this point in the history
  • Loading branch information
houtd authored and samccann committed Oct 15, 2019
1 parent e0f67b5 commit e4eea05
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/ansible/modules/system/ufw.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
- name: Set logging
ufw:
logging: on
logging: 'on'
# Sometimes it is desirable to let the sender know when traffic is
# being denied, rather than simply ignoring it. In these cases, use
Expand Down Expand Up @@ -185,7 +185,7 @@
- name: Deny all access to port 53
ufw:
rule: deny
port: 53
port: '53'
- name: Allow port range 60000-61000
ufw:
Expand All @@ -196,7 +196,7 @@
- name: Allow all access to tcp port 80
ufw:
rule: allow
port: 80
port: '80'
proto: tcp
- name: Allow all access from RFC1918 networks to this host
Expand All @@ -213,7 +213,7 @@
rule: deny
proto: udp
src: 1.2.3.4
port: 514
port: '514'
comment: Block syslog
- name: Allow incoming access to eth0 from 1.2.3.5 port 5469 to 1.2.3.4 port 5469
Expand All @@ -223,24 +223,24 @@
direction: in
proto: udp
src: 1.2.3.5
from_port: 5469
from_port: '5469'
dest: 1.2.3.4
to_port: 5469
to_port: '5469'
# Note that IPv6 must be enabled in /etc/default/ufw for IPv6 firewalling to work.
- name: Deny all traffic from the IPv6 2001:db8::/32 to tcp port 25 on this host
ufw:
rule: deny
proto: tcp
src: 2001:db8::/32
port: 25
port: '25'
- name: Deny all IPv6 traffic to tcp port 20 on this host
# this should be the first IPv6 rule
ufw:
rule: deny
proto: tcp
port: 20
port: '20'
to_ip: "::"
insert: 0
insert_relative_to: first-ipv6
Expand All @@ -254,7 +254,7 @@
ufw:
rule: deny
proto: tcp
port: 20
port: '20'
to_ip: "::"
insert: -1
insert_relative_to: last-ipv4
Expand Down

0 comments on commit e4eea05

Please sign in to comment.