dendrite/server/tasks/main.yaml
changeset 215 dd52907adff9
parent 212 afd4595fe1af
child 216 6c85835d4621
equal deleted inserted replaced
214:3069b7d001f7 215:dd52907adff9
     2 
     2 
     3 - name: add dendrite user
     3 - name: add dendrite user
     4   become: yes
     4   become: yes
     5   user: name="{{dendrite_user}}" shell="/bin/false" system="yes"
     5   user: name="{{dendrite_user}}" shell="/bin/false" system="yes"
     6 
     6 
     7 # build
       
     8 - name: snap install golang
       
     9   become: yes
       
    10   snap: name="go" classic="yes"
       
    11 
       
    12 - name: unarchive dendrite
       
    13   become: yes
       
    14   unarchive:
       
    15     remote_src: yes
       
    16     src: "{{dendrite_tar}}"
       
    17     dest: "/tmp/"
       
    18     creates: "{{dendrite_build_dir}}"
       
    19     owner: "{{dendrite_user}}"
       
    20     group: "{{dendrite_user}}"
       
    21 
       
    22 - name: check if dendrite build exists
       
    23   stat:
       
    24     path: "{{dendrite_build_dir}}/bin"
       
    25   register: build_file
       
    26 
       
    27 - name: build dendrite
       
    28   become: yes
       
    29   become_user: "{{dendrite_user}}"
       
    30   command: "{{dendrite_build_dir}}/build.sh"
       
    31   args:
       
    32     chdir: "{{dendrite_build_dir}}"
       
    33   when: not build_file.stat.exists
       
    34   notify: restart service
       
    35 
       
    36 # install
       
    37 - name: install dendrite binary
     7 - name: install dendrite binary
    38   become: yes
     8   become: yes
    39   copy:
     9   copy:
    40     src: "{{dendrite_build_dir}}/bin/{{item.src}}"
    10     src: "{{dendrite_bin_dir}}/{{item.src}}"
    41     dest: "/usr/local/bin/{{item.dest}}"
    11     dest: "/usr/local/bin/{{item.dest}}"
    42     remote_src: yes
    12     remote_src: yes
    43     owner: "root"
    13     owner: "root"
    44     group: "root"
    14     group: "root"
    45     mode: "0755"
    15     mode: "0755"