forked from bitlair/ansible
Rename mqtt-internal to mqtt
This commit is contained in:
parent
44a122575d
commit
e7e2458ba0
8 changed files with 2 additions and 2 deletions
32
roles/mqtt/tasks/main.yaml
Normal file
32
roles/mqtt/tasks/main.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
|
||||
- name: Install dependencies
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- mosquitto
|
||||
- avahi-daemon
|
||||
|
||||
- name: Install bambulab cafile
|
||||
# openssl s_client -showcerts -connect <ip>:8883 </dev/null | sed -n -e '/-.BEGIN/,/-.END/ p'
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ mqtt_bambulab_cafile }}"
|
||||
content: "{{ lookup('passwordstore', 'bambulab subkey=cafile') }}"
|
||||
|
||||
- name: Configure Mosquitto
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/mosquitto/conf.d/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart mosquitto
|
||||
with_items:
|
||||
- bambulab.conf
|
||||
- internal.conf
|
||||
- public-bridge.conf
|
||||
|
||||
- name: Start mosquitto
|
||||
ansible.builtin.systemd:
|
||||
name: mosquitto
|
||||
state: started
|
||||
enabled: yes
|
Loading…
Add table
Add a link
Reference in a new issue