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
 - name: Enable ufw
29
 - name: Enable ufw
30
   command: ufw --force enable
30
   command: ufw --force enable
31
   when: "ufw_status.stdout.startswith('Status: inactive')"
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
 - hosts: all
4
 - hosts: all
5
   user: deploy
5
   user: deploy
6
   sudo: True
6
   sudo: True
7
-  gather_facts: False
7
+  gather_facts: True
8
   vars_files:
8
   vars_files:
9
     - vars/defaults.yml
9
     - vars/defaults.yml
10
     - vars/user.yml
10
     - vars/user.yml

Loading…
Cancel
Save