src.nth.io/

summaryrefslogtreecommitdiff
path: root/bin/build/tasks
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2024-02-10 15:40:23 -0600
committerLuke Hoersten <[email protected]>2024-02-10 15:40:23 -0600
commit00f35328ecd7fb71e24d271991083aa76a48d441 (patch)
treea67744420f5d2a55c312325726075a318d745a30 /bin/build/tasks
parent04edbf561c44e28753cbbaa3870b23b220cc644c (diff)
Added pastebin bin role.
Diffstat (limited to 'bin/build/tasks')
-rw-r--r--bin/build/tasks/main.yaml37
1 files changed, 37 insertions, 0 deletions
diff --git a/bin/build/tasks/main.yaml b/bin/build/tasks/main.yaml
new file mode 100644
index 0000000..44c722e
--- /dev/null
+++ b/bin/build/tasks/main.yaml
@@ -0,0 +1,37 @@
+---
+
+- name: install cargo
+ become: yes
+ apt: name="cargo"
+
+- name: unarchive bin
+ unarchive:
+ remote_src: yes
+ src: "{{bin_tar}}"
+ dest: "/tmp/"
+ creates: "{{bin_build_dir}}"
+
+- name: check if bin build exists
+ stat:
+ path: "{{bin_build_dir}}/target/release/bin"
+ register: build_file
+
+- name: build bin
+ command: "cargo build --release"
+ args:
+ chdir: "{{bin_build_dir}}"
+ when: not build_file.stat.exists
+
+- name: create build server dir
+ become: yes
+ file:
+ path: "{{bin_srv_dir}}"
+ mode: "0755"
+ state: "directory"
+
+- name: copy bin to build server dir
+ become: yes
+ copy:
+ remote_src: yes
+ src: "{{bin_build_dir}}/target/release/bin"
+ dest: "{{bin_srv_dir}}/bin"