ansible-firewalld-role
ansible-firewalld-role copied to clipboard
set firewalld default zone fails in check mode
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