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 default firewalld policy #27

Open
greg-hellings opened this issue Jul 29, 2020 · 0 comments
Open

Set default firewalld policy #27

greg-hellings opened this issue Jul 29, 2020 · 0 comments
Assignees

Comments

@greg-hellings
Copy link
Contributor

User should be able to set the default mode on the firewalld zone. Something like this:

- name: firewalld | Checking firewalld target policy
  command: "/usr/bin/firewall-cmd --zone public --get-target --permanent"
  changed_when: firewalld_public_policy.stdout != 'DROP'
  register: firewalld_public_policy

- name: firewalld | Enforce drop policy on firewall public zone
  command: "/usr/bin/firewall-cmd --zone public --set-target DROP --permanent"
  when: firewalld_public_policy.stdout != 'DROP'
  notify:
    - firewalld_reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant