From 7648b7645546d0cd8dc0f00ba6d1e8066764565f Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 2 Sep 2019 15:35:00 +0100 Subject: Improvements to bookpipeline service, run as a user, and log progress using -v --- roles/pipeliner/files/bookpipeline.service | 3 ++- roles/pipeliner/handlers/main.yml | 4 ++++ roles/pipeliner/tasks/pipeline.yml | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 roles/pipeliner/handlers/main.yml (limited to 'roles') diff --git a/roles/pipeliner/files/bookpipeline.service b/roles/pipeliner/files/bookpipeline.service index 8a4dc45..7728912 100644 --- a/roles/pipeliner/files/bookpipeline.service +++ b/roles/pipeliner/files/bookpipeline.service @@ -2,5 +2,6 @@ Description=Book Pipeline [Service] -ExecStart=/usr/local/bin/bookpipeline +ExecStart=/usr/local/bin/bookpipeline -v Restart=always +User=admin diff --git a/roles/pipeliner/handlers/main.yml b/roles/pipeliner/handlers/main.yml new file mode 100644 index 0000000..9e08d5e --- /dev/null +++ b/roles/pipeliner/handlers/main.yml @@ -0,0 +1,4 @@ +--- + +- name: reload daemons + shell: systemctl daemon-reload diff --git a/roles/pipeliner/tasks/pipeline.yml b/roles/pipeliner/tasks/pipeline.yml index 88ee52f..f3ca30d 100644 --- a/roles/pipeliner/tasks/pipeline.yml +++ b/roles/pipeliner/tasks/pipeline.yml @@ -1,6 +1,6 @@ --- -# TODO: locally check out and build git repo, and upload from that +# TODO: check out and build from repo, and copy into the right place - name: Install pipeline tools copy: src: /home/nick/rescribe/2018-natphil/src/go/src/rescribe.xyz/go.git/bookpipeline/cmd/bookpipeline/bookpipeline @@ -9,6 +9,7 @@ - name: Install systemd unit file copy: src=bookpipeline.service dest=/etc/systemd/system + notify: reload daemons - name: Enable bookpipeline service service: name=bookpipeline enabled=true -- cgit v1.2.1-24-ge1ad