nostr/build/tasks/main.yaml
changeset 217 e69a030975c4
parent 216 6c85835d4621
child 219 0faea2a7570f
equal deleted inserted replaced
216:6c85835d4621 217:e69a030975c4
       
     1 ---
       
     2 
       
     3 - name: install golang
       
     4   become: yes
       
     5   apt: name="golang-go"
       
     6 
       
     7 - name: unarchive nostr relayer
       
     8   unarchive:
       
     9     remote_src: yes
       
    10     src: "{{relayer_tar}}"
       
    11     dest: "/tmp/"
       
    12     creates: "{{relayer_build_dir}}"
       
    13 
       
    14 - name: check if relayer build exists
       
    15   stat:
       
    16     path: "{{relayer_build_dir}}/whitelisted/whitelisted"
       
    17   register: build_file
       
    18 
       
    19 - name: build relayer
       
    20   command: "go build"
       
    21   args:
       
    22     chdir: "{{relayer_build_dir}}/whitelisted"
       
    23   when: not build_file.stat.exists
       
    24 
       
    25 - name: create build server dir
       
    26   become: yes
       
    27   file:
       
    28     path: "{{relayer_srv_dir}}"
       
    29     mode: "0755"
       
    30     state: "directory"
       
    31   when: not build_file.stat.exists
       
    32 
       
    33 - name: copy bin to build server dir
       
    34   become: yes
       
    35   copy:
       
    36     remote_src: yes
       
    37     src: "{{relayer_build_dir}}/whitelisted/whitelisted"
       
    38     dest: "{{relayer_srv_dir}}/nostr-relayer-whitelisted"
       
    39   when: not build_file.stat.exists