nostr/build/tasks/main.yaml
changeset 224 25e44d8440d4
parent 219 0faea2a7570f
--- a/nostr/build/tasks/main.yaml	Sat Sep 16 01:39:37 2023 -0500
+++ b/nostr/build/tasks/main.yaml	Tue Jan 16 00:04:53 2024 -0600
@@ -2,7 +2,15 @@
 
 - name: install golang
   become: yes
-  apt: name="golang-go"
+  apt: name="golang-1.21-go"
+
+- name: link go bin
+  become: yes
+  file:
+    src: "/usr/lib/go-1.21/bin/go"
+    dest: "/usr/bin/go"
+    state: "link"
+    mode: "0755"
 
 - name: unarchive nostr relayer
   unarchive:
@@ -12,7 +20,7 @@
     creates: "{{relayer_build_dir}}"
 
 # update name
-- name: update relayer nip11 info
+- name: update relayer nip11 name
   lineinfile:
     path: "{{relayer_main_src}}"
     regexp: "^(\\s*)return \"WhitelistedRelay\"$"
@@ -34,13 +42,13 @@
 
 - name: check if relayer build exists
   stat:
-    path: "{{relayer_build_dir}}/whitelisted/whitelisted"
+    path: "{{relayer_build_dir}}/examples/whitelisted/whitelisted"
   register: build_file
 
 - name: build relayer
   command: "go build"
   args:
-    chdir: "{{relayer_build_dir}}/whitelisted"
+    chdir: "{{relayer_build_dir}}/examples/whitelisted"
   when: not build_file.stat.exists
 
 - name: create build server dir
@@ -55,6 +63,6 @@
   become: yes
   copy:
     remote_src: yes
-    src: "{{relayer_build_dir}}/whitelisted/whitelisted"
+    src: "{{relayer_build_dir}}/examples/whitelisted/whitelisted"
     dest: "{{relayer_srv_dir}}/nostr-relayer-whitelisted"
   when: not build_file.stat.exists