From 768f6521ee6060f7333d9f72d7df37184d1b5ca8 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sun, 24 Jul 2022 18:28:08 +0200 Subject: [PATCH] Make sure package build-essential is installed --- platon.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/platon.yml b/platon.yml index 8900299..164b571 100644 --- a/platon.yml +++ b/platon.yml @@ -24,6 +24,7 @@ - tmux - git-core - cmake + - build-essential - libmosquitto-dev - libconfig-dev - mpg123 @@ -211,10 +212,27 @@ ### Syslog setup for shuttercontrol.log + - name: Check if rsyslog is actually installed + ansible.builtin.package: + name: rsyslog + state: present + check_mode: true + register: rsyslog_check + + - name: Fail if rsyslog is missing + ansible.builtin.fail: + msg: "Please make sure that rsyslog is installed!" + when: rsyslog_check is not succeeded + - name: Make sure shuttercontrol.log exists - ansible.builtin.file: - path: /var/log/shuttercontrol.log - state: touch + ansible.builtin.copy: + content: "" + dest: /var/log/shuttercontrol.log + # force=no ensures the file is created only if it does not exist + force: no + owner: root + group: root + mode: "0644" - name: Copy syslog setting for shuttercontrol ansible.builtin.copy: