Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set firewalld default zone fails in check mode #15

Open
alemorvan opened this issue Dec 30, 2020 · 0 comments
Open

set firewalld default zone fails in check mode #15

alemorvan opened this issue Dec 30, 2020 · 0 comments

Comments

@alemorvan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant