Fix systemd launch of timesheetsdb
- Add default environment file with postgres config
- Add full path to npm (makes ubuntu happy)
- Call handlers appropriately when systemd unit files are modified
- Add very basic test
Change-Id: I5b1dfab78e449492be193bccfe470813f3028195
diff --git a/tasks/Debian.yml b/tasks/Debian.yml
index f3563ea..95366c6 100644
--- a/tasks/Debian.yml
+++ b/tasks/Debian.yml
@@ -13,6 +13,15 @@
update_cache: true
cache_valid_time: 3600
+- name: Create environment config for timesheetsdb service
+ template:
+ src: "default.timesheetsdb.j2"
+ dest: "/etc/default/timesheetsdb"
+ owner: "root"
+ group: "root"
+ mode: "0640"
+ notify:
+ - restart-timesheetsdb
- name: Create systemd service unit files for timesheetsdb service
template:
@@ -23,3 +32,6 @@
mode: "0644"
with_items:
- "timesheetsdb.service"
+ notify:
+ - start-timesheetsdb
+ - restart-timesheetsdb