Browse Source

Ignore ufw error resulting from known bug on Debian 7

In order to check the version of the linux distribution we need to
set `gather_facts` to True.

Closes #73.
Allen Riddell 11 years ago
parent
commit
ae0d1ca8f4
2 changed files with 4 additions and 1 deletions
  1. 3
    0
      roles/common/tasks/ufw.yml
  2. 1
    1
      site.yml

+ 3
- 0
roles/common/tasks/ufw.yml View File

@@ -29,3 +29,6 @@
29 29
 - name: Enable ufw
30 30
   command: ufw --force enable
31 31
   when: "ufw_status.stdout.startswith('Status: inactive')"
32
+  register: ufw_enable
33
+  # ignore error resulting from known bug on Debian 7.0
34
+  failed_when: ufw_enable|failed and not ansible_lsb['codename'] == 'wheezy'

+ 1
- 1
site.yml View File

@@ -4,7 +4,7 @@
4 4
 - hosts: all
5 5
   user: deploy
6 6
   sudo: True
7
-  gather_facts: False
7
+  gather_facts: True
8 8
   vars_files:
9 9
     - vars/defaults.yml
10 10
     - vars/user.yml

Loading…
Cancel
Save