src.nth.io/

summaryrefslogtreecommitdiff
path: root/lnurld/build/tasks/main.yaml
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2023-07-22 23:27:09 -0500
committerLuke Hoersten <[email protected]>2023-07-22 23:27:09 -0500
commit4f2dd12d36b447f6b28844ff4db9414f935272d3 (patch)
tree91a81167b225ec9944632c68c4ddc6b0dfb5aab1 /lnurld/build/tasks/main.yaml
parent58d6bb46618d2cfef3a2f381e46b5eba193d7270 (diff)
Got lnurld running.
Diffstat (limited to 'lnurld/build/tasks/main.yaml')
-rw-r--r--lnurld/build/tasks/main.yaml37
1 files changed, 37 insertions, 0 deletions
diff --git a/lnurld/build/tasks/main.yaml b/lnurld/build/tasks/main.yaml
new file mode 100644
index 0000000..593a6c9
--- /dev/null
+++ b/lnurld/build/tasks/main.yaml
@@ -0,0 +1,37 @@
+---
+
+- name: install golang
+ become: yes
+ apt: name="golang-go"
+
+- name: git checkout lnurld
+ git:
+ repo: "{{lnurld_git}}"
+ dest: "{{lnurld_build_dir}}"
+
+- name: check if build exists
+ stat:
+ path: "{{lnurld_build_dir}}/lnurld"
+ register: build_file
+
+- name: build
+ command: "go build"
+ args:
+ chdir: "/tmp/lnurld/"
+ when: not build_file.stat.exists
+
+- name: create build server dir
+ become: yes
+ file:
+ path: "{{lnurld_srv_dir}}"
+ mode: "0755"
+ state: "directory"
+ when: not build_file.stat.exists
+
+- name: copy bin to build server dir
+ become: yes
+ copy:
+ remote_src: yes
+ src: "{{lnurld_build_dir}}/lnurld"
+ dest: "{{lnurld_srv_dir}}/lnurld"
+ when: not build_file.stat.exists