change to loop

This commit is contained in:
Antonio J. Delgado 2023-03-19 17:54:25 +02:00
parent 75b8a003d4
commit 444e92edce

View file

@ -97,7 +97,7 @@
ufw: ufw:
rule: allow rule: allow
port: "{{ item.stream_port }}" port: "{{ item.stream_port }}"
with: "{{ motion_config['cameras'] | selectattr('stream_port', 'defined') }}" loop: "{{ motion_config['cameras'] | selectattr('stream_port', 'defined') }}"
when: handle_ufw when: handle_ufw
- name: Enable motion web control in ufw - name: Enable motion web control in ufw
@ -105,7 +105,7 @@
rule: allow rule: allow
from_ip: "{{ item }}" from_ip: "{{ item }}"
port: "{{ motion_config['webcontrol_port'] }}" port: "{{ motion_config['webcontrol_port'] }}"
with: "{{ localnetworks }}" loop: "{{ localnetworks }}"
when: handle_ufw when: handle_ufw
- name: Ensure motion can read signal configuration - name: Ensure motion can read signal configuration