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"