From b9da1273ec648a2bacd7bcfbb982e2790e2d5272 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 23 Jul 2022 18:41:38 +0200 Subject: [PATCH] Add MQTT tools --- platon.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/platon.yml b/platon.yml index aa9ec7c..0f8713a 100644 --- a/platon.yml +++ b/platon.yml @@ -21,7 +21,9 @@ # Regular packages - tmux - git-core + - cmake - libmosquitto-dev + - libconfig-dev - mpg123 @@ -138,3 +140,31 @@ owner: "{{ gatekeeper_user }}" group: "{{ gatekeeper_user }}" mode: "0755" + + + ### MQTT Tools + + - name: Clone MQTT tools (initial checkout) + # Do this as the gatekeeper user! + become: yes + become_user: "{{ gatekeeper_user }}" + ansible.builtin.git: + repo: https://github.com/penguineer/mqtt-tools.git + dest: "/home/{{ gatekeeper_user }}/mqtt-tools" + clone: yes + update: no + + - name: Compile MQTT clock + # Do this as the gatekeeper user! + become: yes + become_user: "{{ gatekeeper_user }}" + ansible.builtin.shell: + warn: false + chdir: "/home/{{ gatekeeper_user }}/mqtt-tools" + cmd: | + mkdir build + cd build + cmake .. + make + cp agents/mqtt-clock ../agents/mqtt-clock + creates: "/home/{{ gatekeeper_user }}/mqtt-tools/agents/mqtt-clock"