From e1a538c49ddd95fb59b2acfc8c9773628d4258d3 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 16 Dec 2017 23:11:56 +0100 Subject: [PATCH] add pidfile directory --- defaults/main.yml | 1 + tasks/install.yml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 6656c6b..7dab392 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,3 +2,4 @@ mosquitto_pid_file: /var/run/mosquitto.pid mosquitto_user: mosquitto mosquitto_group: mosquitto mosquitto_port: 61000 +mosquitto_pid_dir: /var/run/mosquitto diff --git a/tasks/install.yml b/tasks/install.yml index 857b12b..8b02245 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -36,6 +36,13 @@ group: root mode: 0644 +- name: Create folder for PIDFile + file: + path: "{{ mosquitto_pid_dir }}" + owner: "{{ mosquitto_user }}" + group: "{{ mosquitto_group }}" + state: directory + - name: Copy systemd unit files template: src: "etc/systemd/system/mosquitto.service.j2"