From 8659c68242f8968fcae44eb3abdf4bb459b054d0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 17 Dec 2017 14:20:03 +0100 Subject: [PATCH] add iptables task --- tasks/install.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/install.yml b/tasks/install.yml index 478ac0f..b75575d 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -51,6 +51,12 @@ notify: - mosquitto_restart +- name: Open port for mttq + iptables_raw: + name: allow_mttq_port + state: present + rules: '-A OUTPUT -m state --state NEW -p tcp --dport {{ mosquitto_port }} -j ACCEPT' + - name: Copy systemd unit files template: src: "etc/systemd/system/mosquitto.service.j2"