ansible-firewalld-role icon indicating copy to clipboard operation
ansible-firewalld-role copied to clipboard

set firewalld default zone fails in check mode

Open alemorvan opened this issue 4 years ago • 0 comments

In check mode, set firewalld default zone fails with this error:

The conditional check 'defaultzone.stdout != default_zone' failed. The error was: error while evaluating conditional (defaultzone.stdout != default_zone): 'dict object' has no attribute 'stdout'

because the tasks is skipped.

To prevent this, you should add check_mode: no into the task :

- name: get actual firewalld default zone
  command: /bin/firewall-cmd --get-default-zone
  register: defaultzone
  changed_when: false
  check_mode: no
  tags: firewalld

Thx

alemorvan avatar Dec 30 '20 11:12 alemorvan