Skip to content

Commit

Permalink
Merge pull request #18 from mvdriel/fixed-typos
Browse files Browse the repository at this point in the history
Fixed typo: uwf ==> ufw
  • Loading branch information
tersmitten committed Jul 10, 2015
2 parents 2f05cde + 00a52a3 commit 86b4de7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ None

#### Variables

* `uwf_default_policy` [default: `deny`]: Default policy
* `uwf_logging` [default: `off`]: Log level
* `uwf_rules` [default: see `defaults/main.yml`]: Rules to apply
* `ufw_default_policy` [default: `deny`]: Default policy
* `ufw_logging` [default: `off`]: Log level
* `ufw_rules` [default: see `defaults/main.yml`]: Rules to apply

## Dependencies

Expand All @@ -29,23 +29,23 @@ None
##### Allow ssh
```yaml
uwf_rules:
ufw_rules:
- rule: allow
to_port: 22
protocol: tcp
```
##### Allow all traffic on eth1
```yaml
uwf_rules:
ufw_rules:
- rule: allow
interface: eth1
to_port: ''
```
##### Allow snmp traffic from 1.2.3.4 on eth0
```yaml
uwf_rules:
ufw_rules:
- rule: allow
interface: eth0
from_ip: 1.2.3.4
Expand Down
6 changes: 3 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
# defaults file for ufw
uwf_default_policy: deny
uwf_logging: 'off'
uwf_rules:
ufw_default_policy: deny
ufw_logging: 'off'
ufw_rules:
- rule: allow
interface: eth0
to_port: 22
Expand Down
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

- name: default policy
ufw:
policy: "{{ uwf_default_policy }}"
policy: "{{ ufw_default_policy }}"
notify: reload ufw
tags: [configuration, ufw, ufw-default-policy]

Expand All @@ -48,13 +48,13 @@
to_port: "{{ item.to_port | default('') }}"
protocol: "{{ item.protocol | default('any') }}"
log: "{{ item.log | default(False) }}"
with_items: uwf_rules
with_items: ufw_rules
notify: reload ufw
tags: [configuration, ufw, ufw-apply]

- name: logging
ufw:
logging: "{{ uwf_logging }}"
logging: "{{ ufw_logging }}"
notify: reload ufw
tags: [configuration, ufw, ufw-logging]

Expand Down
6 changes: 3 additions & 3 deletions templates/etc/ansible/facts.d/ufw.fact.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"default_policy": {{ uwf_default_policy | to_nice_json }},
"logging": {{ uwf_logging | to_nice_json }},
"rules": {{ uwf_rules | to_nice_json }}
"default_policy": {{ ufw_default_policy | to_nice_json }},
"logging": {{ ufw_logging | to_nice_json }},
"rules": {{ ufw_rules | to_nice_json }}
}

0 comments on commit 86b4de7

Please sign in to comment.