fix linter error

This commit is contained in:
Sergey Malyuk
2025-12-11 10:37:39 +03:00
parent 0b9ba8964f
commit 20f56a3d19
4 changed files with 11 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
--- ---
rules: [] ufw_rules: []
limit_ssh: false ufw_limit_ssh: false
openssh_port: 22 ufw_openssh_port: 22

View File

@@ -11,7 +11,7 @@
comment: "Allow all incoming traffic on eth0@if288" comment: "Allow all incoming traffic on eth0@if288"
roles: roles:
- role: genlab.ufw - role: genlab.common.ufw
disable_ipv6: true disable_ipv6: true
limit_ssh: true ufw_limit_ssh: true
rules: "{{ custom_rules }}" ufw_rules: "{{ custom_rules }}"

View File

@@ -28,13 +28,13 @@
- name: "Allow SSH access" - name: "Allow SSH access"
notify: Reload-ufw notify: Reload-ufw
community.general.ufw: community.general.ufw:
rule: "{{ limit_ssh | ternary('limit', 'allow') }}" rule: "{{ ufw_limit_ssh | ternary('limit', 'allow') }}"
port: "{{ openssh_port }}" port: "{{ ufw_openssh_port }}"
proto: tcp proto: tcp
- name: "Set whitelist rules" - name: "Set whitelist rules"
notify: Reload-ufw notify: Reload-ufw
loop: "{{ rules }}" loop: "{{ ufw_rules }}"
community.general.ufw: community.general.ufw:
rule: "{{ item.rule | default('allow') }}" rule: "{{ item.rule | default('allow') }}"
comment: "{{ item.comment | default(omit) }}" comment: "{{ item.comment | default(omit) }}"