prosody/tasks/main.yaml
changeset 45 2d7ba960b157
parent 44 aaf10cecfc1f
child 138 591b6609fc64
equal deleted inserted replaced
44:aaf10cecfc1f 45:2d7ba960b157
     1 ---
     1 ---
     2 
     2 
     3 - name: install prosody
     3 - name: install prosody
     4   become: yes
     4   become: yes
     5   apt: name="prosody"
     5   apt: name="{{item}}"
     6   notify: restart prosody
     6   notify: restart prosody
       
     7   loop:
       
     8     - "prosody"
       
     9     - "lua-dbi-postgresql"
     7 
    10 
     8 - name: configure prosody
    11 - name: configure prosody
     9   become: yes
    12   become: yes
    10   template:
    13   template:
    11     src: "prosody.cfg.lua.j2"
    14     src: "prosody.cfg.lua.j2"
    29   notify: restart prosody
    32   notify: restart prosody
    30   loop:
    33   loop:
    31     - "{{prosody_ssl_privkey_src}}"
    34     - "{{prosody_ssl_privkey_src}}"
    32     - "{{prosody_ssl_cert_src}}"
    35     - "{{prosody_ssl_cert_src}}"
    33 
    36 
       
    37 - name: install db schema file
       
    38   become: yes
       
    39   template:
       
    40     src: "setup_db.psql.j2"
       
    41     dest: "/tmp/setup_db_{{prosody_db}}.psql"
       
    42     owner: "postgres"
       
    43     group: "postgres"
       
    44     mode: "0600"
       
    45   changed_when: false
       
    46 
       
    47 - name: install psql
       
    48   become: yes
       
    49   become_user: "postgres"
       
    50   command: "psql -f /tmp/setup_db_{{prosody_db}}.psql"
       
    51   changed_when: false
       
    52 
    34 - name: enable prosody site
    53 - name: enable prosody site
    35   become: yes
    54   become: yes
    36   file:
    55   file:
    37     src:  "/etc/prosody/conf.avail/{{prosody_vhost}}.cfg.lua"
    56     src:  "/etc/prosody/conf.avail/{{prosody_vhost}}.cfg.lua"
    38     dest: "/etc/prosody/conf.d/{{prosody_vhost}}.cfg.lua"
    57     dest: "/etc/prosody/conf.d/{{prosody_vhost}}.cfg.lua"