diff --git a/files/platon/mosquitto-local.conf b/files/platon/mosquitto-local.conf new file mode 100644 index 0000000..c8348ac --- /dev/null +++ b/files/platon/mosquitto-local.conf @@ -0,0 +1,2 @@ +listener 1883 +allow_anonymous true diff --git a/platon.yml b/platon.yml index 0f8713a..be57d50 100644 --- a/platon.yml +++ b/platon.yml @@ -25,6 +25,7 @@ - libmosquitto-dev - libconfig-dev - mpg123 + - mosquitto - name: Set MAC address for proper DHCP recognition @@ -46,6 +47,18 @@ mode: '0644' + ### Mosquitto for local MQTT + + - name: Local configuration for Mosquitto + ansible.builtin.copy: + src: files/platon/mosquitto-local.conf + dest: /etc/mosquitto/conf.d/platon-local.conf + owner: root + group: root + mode: '0644' + notify: restart mosquitto + + ### Sesam for SSH access # # Make sure to provide the .ssh/authorized_keys from backup, if needed @@ -168,3 +181,11 @@ make cp agents/mqtt-clock ../agents/mqtt-clock creates: "/home/{{ gatekeeper_user }}/mqtt-tools/agents/mqtt-clock" + + + handlers: + - name: restart mosquitto + service: + name: mosquitto + state: restarted + enabled: yes