nostr/build/tasks/main.yaml
changeset 219 0faea2a7570f
parent 217 e69a030975c4
child 224 25e44d8440d4
equal deleted inserted replaced
218:1db4800bc4f5 219:0faea2a7570f
     8   unarchive:
     8   unarchive:
     9     remote_src: yes
     9     remote_src: yes
    10     src: "{{relayer_tar}}"
    10     src: "{{relayer_tar}}"
    11     dest: "/tmp/"
    11     dest: "/tmp/"
    12     creates: "{{relayer_build_dir}}"
    12     creates: "{{relayer_build_dir}}"
       
    13 
       
    14 # update name
       
    15 - name: update relayer nip11 info
       
    16   lineinfile:
       
    17     path: "{{relayer_main_src}}"
       
    18     regexp: "^(\\s*)return \"WhitelistedRelay\"$"
       
    19     line: "\\1return \"{{relayer_name}}\""
       
    20     backrefs: yes
       
    21 
       
    22 # update nip11 relay info
       
    23 - name: update relayer nip11 info
       
    24   lineinfile:
       
    25     path: "{{relayer_handler_src}}"
       
    26     regexp: "^(\\s*){{item.k}}(\\s*)(.*)$"
       
    27     line: "\\1{{item.k}}\\2\"{{item.v}}\","
       
    28     backrefs: yes
       
    29   loop:
       
    30     - {"k": "Description:", "v": "{{relayer_description}}"}
       
    31     - {"k": "PubKey:", "v": "{{relayer_admin_pubkey}}"}
       
    32     - {"k": "Contact:", "v": "{{relayer_admin_contact}}"}
       
    33     - {"k": "Version:", "v": "{{relayer_version}}"}
    13 
    34 
    14 - name: check if relayer build exists
    35 - name: check if relayer build exists
    15   stat:
    36   stat:
    16     path: "{{relayer_build_dir}}/whitelisted/whitelisted"
    37     path: "{{relayer_build_dir}}/whitelisted/whitelisted"
    17   register: build_file
    38   register: build_file