matrix-synapse/tasks/main.yaml
changeset 39 90b1b7c4be70
parent 37 2ef98b7b40d4
child 43 b86f3fc9fb6f
equal deleted inserted replaced
38:b4e705f4cda4 39:90b1b7c4be70
     1 ---
     1 ---
     2 
     2 
     3 - name: add debian backports keys
     3 - name: add debian backports keys
     4   become: yes
     4   become: yes
     5   apt_key:
     5   apt_key:
     6     keyserver: "keyserver.ubuntu.com "
     6     keyserver: "keyserver.ubuntu.com"
     7     id: "{{item}}"
     7     id: "{{item}}"
     8   loop:
     8   loop:
     9     - "04EE7237B7D453EC"
     9     - "04EE7237B7D453EC"
    10     - "648ACFD622F3D138"
    10     - "648ACFD622F3D138"
    11 
    11 
    22   notify: restart matrix synapse service
    22   notify: restart matrix synapse service
    23 
    23 
    24 - name: configure matrix synapse
    24 - name: configure matrix synapse
    25   become: yes
    25   become: yes
    26   template:
    26   template:
    27     src: "homeserver.yaml.j2"
    27     src: "{{item.src}}"
    28     dest: "/etc/matrix-synapse/homeserver.yaml"
    28     dest: "{{item.dest}}"
    29   notify: restart matrix synapse service
    29   notify: restart matrix synapse service
       
    30   loop:
       
    31     - { src: "homeserver.yaml.j2", dest: "/etc/matrix-synapse/homeserver.yaml" }
       
    32     - { src: "log.yaml.j2", dest: "/etc/matrix-synapse/log.yaml" }
       
    33     - { src: "server_name.yaml.j2", dest: "/etc/matrix-synapse/conf.d/server_name.yaml" }
    30 
    34 
    31 - name: configure matrix synapse server name
    35 - name: install db schema file
    32   become: yes
    36   become: yes
    33   template:
    37   template:
    34     src: "server_name.yaml.j2"
    38     src: "setup_db.psql.j2"
    35     dest: "/etc/matrix-synapse/conf.d/server_name.yaml"
    39     dest: "/tmp/setup_db_{{matrix_synapse_pgsql_db}}.psql"
    36   notify: restart matrix synapse service
    40     owner: "postgres"
       
    41     group: "postgres"
       
    42     mode: "0600"
       
    43   changed_when: false
       
    44 
       
    45 - name: install psql
       
    46   become: yes
       
    47   become_user: "postgres"
       
    48   command: "psql -f /tmp/setup_db_{{matrix_synapse_pgsql_db}}.psql"
       
    49   changed_when: false
    37 
    50 
    38 - name: ensure matrix synapse is started
    51 - name: ensure matrix synapse is started
    39   become: yes
    52   become: yes
    40   systemd: name="matrix-synapse.service" enabled="yes" state="started"
    53   systemd: name="matrix-synapse.service" enabled="yes" state="started"