Add MQTT tools

This commit is contained in:
Stefan Haun 2022-07-23 18:41:38 +02:00
parent 547e6bf251
commit b9da1273ec

View file

@ -21,7 +21,9 @@
# Regular packages # Regular packages
- tmux - tmux
- git-core - git-core
- cmake
- libmosquitto-dev - libmosquitto-dev
- libconfig-dev
- mpg123 - mpg123
@ -138,3 +140,31 @@
owner: "{{ gatekeeper_user }}" owner: "{{ gatekeeper_user }}"
group: "{{ gatekeeper_user }}" group: "{{ gatekeeper_user }}"
mode: "0755" 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"