summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-09-02 14:49:19 +0100
committerNick White <git@njw.name>2019-09-02 14:49:19 +0100
commit91eb136a5cc68e0f69621eb939d92f5eb743f3f7 (patch)
treea900c4fce93ad943e723daf2cc0784ab6aaa6f06
parent766142ad438f3bf2f0f486a6315ceb32ca9dc600 (diff)
Add pipeliner role
-rw-r--r--roles/pipeliner/files/bookpipeline.service6
-rw-r--r--roles/pipeliner/tasks/main.yml2
-rw-r--r--roles/pipeliner/tasks/pipeline.yml11
3 files changed, 19 insertions, 0 deletions
diff --git a/roles/pipeliner/files/bookpipeline.service b/roles/pipeliner/files/bookpipeline.service
new file mode 100644
index 0000000..8a4dc45
--- /dev/null
+++ b/roles/pipeliner/files/bookpipeline.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Book Pipeline
+
+[Service]
+ExecStart=/usr/local/bin/bookpipeline
+Restart=always
diff --git a/roles/pipeliner/tasks/main.yml b/roles/pipeliner/tasks/main.yml
new file mode 100644
index 0000000..d9b6830
--- /dev/null
+++ b/roles/pipeliner/tasks/main.yml
@@ -0,0 +1,2 @@
+---
+- include: pipeline.yml
diff --git a/roles/pipeliner/tasks/pipeline.yml b/roles/pipeliner/tasks/pipeline.yml
new file mode 100644
index 0000000..852b84b
--- /dev/null
+++ b/roles/pipeliner/tasks/pipeline.yml
@@ -0,0 +1,11 @@
+---
+
+# TODO: locally check out and build git repo, and upload from that
+- name: Install pipeline tools
+ copy: src=/home/nick/rescribe/2018-natphil/src/go/src/rescribe.xyz/go.git/bookpipeline/cmd/bookpipeline dest=/usr/local/bin
+
+- name: Install systemd unit file
+ copy: src=bookpipeline.service dest=/etc/systemd/system
+
+- name: Enable bookpipeline service
+ service: name=bookpipeline enabled=true