lnurld/build/tasks/main.yaml
changeset 31 562b76293a66
child 32 500a32d1f026
equal deleted inserted replaced
30:ff5ba9f5d7ab 31:562b76293a66
       
     1 ---
       
     2 
       
     3 - name: install golang
       
     4   become: yes
       
     5   apt: name="golang-go"
       
     6 
       
     7 - name: git checkout lnurld
       
     8   git:
       
     9     repo: "{{lnurld_git}}"
       
    10     dest: "{{lnurld_build_dir}}"
       
    11 
       
    12 - name: check if build exists
       
    13   stat:
       
    14     path: "{{lnurld_build_dir}}/lnurld"
       
    15   register: build_file
       
    16 
       
    17 - name: build
       
    18   command: "go build"
       
    19   args:
       
    20     chdir: "/tmp/lnurld/"
       
    21   when: not build_file.stat.exists
       
    22 
       
    23 - name: create build server dir
       
    24   become: yes
       
    25   file:
       
    26     path: "{{lnurld_srv_dir}}"
       
    27     mode: "0755"
       
    28     state: "directory"
       
    29   when: not build_file.stat.exists
       
    30 
       
    31 - name: copy bin to build server dir
       
    32   become: yes
       
    33   copy:
       
    34     remote_src: yes
       
    35     src: "{{lnurld_build_dir}}/lnurld"
       
    36     dest: "{{lnurld_srv_dir}}/lnurld"
       
    37   when: not build_file.stat.exists