lnurld/build/tasks/main.yaml
changeset 222 6eaeb42f5c10
parent 221 a7bb0c129c0a
child 223 de03976c2df1
equal deleted inserted replaced
221:a7bb0c129c0a 222:6eaeb42f5c10
     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