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

Add firewall rule for Debian using ufw #44

Open
JensMKofoed opened this issue Mar 7, 2023 · 0 comments
Open

Add firewall rule for Debian using ufw #44

JensMKofoed opened this issue Mar 7, 2023 · 0 comments

Comments

@JensMKofoed
Copy link

Hi

To be able to manage ufw rules in Debian, you can use the community.general.ufw module from the community.general collection.
task file: ufw.yml
name: "Add ufw rules"
community.general.ufw:
rule: allow
port: "{{ item }}"
proto: tcp
with_items:
- "{{ (zookeeper_client_port }}"
- "{{ zookeeper_leader_port }}"
- "{{ zookeeper_election_port }}"

Add to the main.yaml task file:

  • include_tasks: ufw.yml
    when: (ansible_os_family == "Debian") and zookeeper_ufw

Kind regards
Jens M. Kofoed

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