Skip to content

Commit

Permalink
Merge pull request #76 from ariddell/feature/ufw-error-fix
Browse files Browse the repository at this point in the history
Ignore ufw error resulting from known bug on Debian 7
  • Loading branch information
al3x committed Oct 29, 2013
2 parents 92846aa + 5b8ba84 commit f64ad69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions roles/common/tasks/ufw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@
- name: Enable ufw
command: ufw --force enable
when: "ufw_status.stdout.startswith('Status: inactive')"
register: ufw_enable
# ignore error resulting from known bug on Debian 7
failed_when: ufw_enable|failed and not ansible_lsb['codename'] == 'wheezy'

- name: Enable ufw again (workaround for known bug in Debian 7)
command: ufw --force enable
when: "ufw_status.stdout.startswith('Status: inactive') and ansible_lsb['codename'] == 'wheezy'"
2 changes: 1 addition & 1 deletion site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- hosts: all
user: deploy
sudo: True
gather_facts: False
gather_facts: True
vars_files:
- vars/defaults.yml
- vars/user.yml
Expand Down

0 comments on commit f64ad69

Please sign in to comment.