forked from bitlair/ansible
Linter + Dashboard fixes
This commit is contained in:
parent
e1bf3e1765
commit
abc64144a8
44 changed files with 265 additions and 379 deletions
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
|
||||
- name: Install dependencies
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
|
@ -6,32 +7,17 @@
|
|||
- liblinux-epoll-perl
|
||||
- mosquitto
|
||||
|
||||
- name: Allow MQTT
|
||||
ansible.builtin.iptables:
|
||||
chain: INPUT
|
||||
protocol: tcp
|
||||
destination_port: "{{ item.port }}"
|
||||
ctstate: NEW
|
||||
jump: ACCEPT
|
||||
ip_version: "{{ item.ip }}"
|
||||
action: insert
|
||||
with_items:
|
||||
- { ip: ipv4, port: 1883 }
|
||||
- { ip: ipv6, port: 1883 }
|
||||
notify: persist iptables
|
||||
when: not nft | bool
|
||||
|
||||
- name: Install mqtt-simple
|
||||
ansible.builtin.command:
|
||||
cmd: cpan Net::MQTT::Simple
|
||||
community.general.cpanm:
|
||||
name: Net::MQTT::Simple
|
||||
|
||||
- name: Clone mqtt2web source
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/bitlair/mqtt2web.git
|
||||
version: master
|
||||
dest: /opt/mqtt2web
|
||||
accept_hostkey: yes
|
||||
notify: restart mqtt2web
|
||||
accept_hostkey: true
|
||||
notify: Restart mqtt2web
|
||||
|
||||
- name: Install mqtt2web service file
|
||||
ansible.builtin.template:
|
||||
|
@ -41,10 +27,11 @@
|
|||
group: root
|
||||
mode: 0644
|
||||
notify:
|
||||
- daemon reload
|
||||
- restart mqtt2web
|
||||
- Daemon reload
|
||||
- Restart mqtt2web
|
||||
|
||||
- ansible.builtin.meta: flush_handlers
|
||||
- name: Flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Enable mqtt2web
|
||||
ansible.builtin.systemd:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue