dendrite/server/tasks/main.yaml
changeset 237 c6c11084c802
parent 229 7e3bf48e516a
equal deleted inserted replaced
236:55fe664e0a05 237:c6c11084c802
     8   become: yes
     8   become: yes
     9   file:
     9   file:
    10     path: "/tmp/dendrite/"
    10     path: "/tmp/dendrite/"
    11     state: "directory"
    11     state: "directory"
    12     mode: "0755"
    12     mode: "0755"
       
    13   changed_when: false
    13 
    14 
    14 - name: unarchive dendrite bins
    15 - name: unarchive dendrite bins
    15   become: yes
    16   become: yes
    16   unarchive:
    17   unarchive:
    17     remote_src: yes
    18     remote_src: yes
    18     src: "{{dendrite_tar}}"
    19     src: "{{dendrite_tar}}"
    19     dest: "/tmp/dendrite/"
    20     dest: "/tmp/dendrite/"
    20   notify: restart service
    21   changed_when: false
    21 
    22 
    22 - name: install dendrite binary
    23 - name: install dendrite binary
    23   become: yes
    24   become: yes
    24   copy:
    25   copy:
    25     src: "/tmp/dendrite/{{item.src}}"
    26     src: "/tmp/dendrite/{{item.src}}"
    77     src: "setup_db.psql.j2"
    78     src: "setup_db.psql.j2"
    78     dest: "/tmp/setup_db_dendrite_{{dendrite_instance}}.psql"
    79     dest: "/tmp/setup_db_dendrite_{{dendrite_instance}}.psql"
    79     owner: "postgres"
    80     owner: "postgres"
    80     group: "postgres"
    81     group: "postgres"
    81     mode: "0600"
    82     mode: "0600"
       
    83   changed_when: false
    82 
    84 
    83 - name: install db schema psql
    85 - name: install db schema psql
    84   become: yes
    86   become: yes
    85   become_user: "postgres"
    87   become_user: "postgres"
    86   command: "psql -f /tmp/setup_db_dendrite_{{dendrite_instance}}.psql"
    88   command: "psql -f /tmp/setup_db_dendrite_{{dendrite_instance}}.psql"
   101   template:
   103   template:
   102     src: "[email protected]"
   104     src: "[email protected]"
   103     dest: "/lib/systemd/system/[email protected]"
   105     dest: "/lib/systemd/system/[email protected]"
   104   notify: restart service
   106   notify: restart service
   105 
   107 
   106 - name: ensure instance service is stopped
       
   107   become: yes
       
   108   systemd: name="dendrite@{{dendrite_port}}.service" enabled="no" state="stopped" daemon_reload="yes"
       
   109 
       
   110 - name: ensure service is started
   108 - name: ensure service is started
   111   become: yes
   109   become: yes
   112   systemd: name="dendrite@{{dendrite_port}}.service" enabled="yes" state="started"
   110   systemd: name="dendrite@{{dendrite_port}}.service" enabled="yes" state="started"