dendrite/server/tasks/main.yaml
changeset 183 b31ef0e10cad
parent 180 f2f99b9b16ee
child 186 c48761176ede
equal deleted inserted replaced
182:b4ce6f1f15b7 183:b31ef0e10cad
    48     - {"src": "create-account"           , "dest": "dendrite-create-account"}
    48     - {"src": "create-account"           , "dest": "dendrite-create-account"}
    49     - {"src": "dendrite-polylith-multi"  , "dest": "dendrite-polylith-multi"}
    49     - {"src": "dendrite-polylith-multi"  , "dest": "dendrite-polylith-multi"}
    50     - {"src": "dendrite-upgrade-tests"   , "dest": "dendrite-upgrade-tests"}
    50     - {"src": "dendrite-upgrade-tests"   , "dest": "dendrite-upgrade-tests"}
    51     - {"src": "generate-config"          , "dest": "dendrite-generate-config"}
    51     - {"src": "generate-config"          , "dest": "dendrite-generate-config"}
    52     - {"src": "generate-keys"            , "dest": "dendrite-generate-keys"}
    52     - {"src": "generate-keys"            , "dest": "dendrite-generate-keys"}
    53     - {"src": "goose"                    , "dest": "dendrite-goose"}
       
    54     - {"src": "resolve-state"            , "dest": "dendrite-resolve-state"}
    53     - {"src": "resolve-state"            , "dest": "dendrite-resolve-state"}
    55 
    54 
    56 - name: create instance dir
    55 - name: create instance dir
    57   become: yes
    56   become: yes
    58   file:
    57   file:
    63     mode: "0755"
    62     mode: "0755"
    64   notify: restart service
    63   notify: restart service
    65   loop:
    64   loop:
    66     - "{{dendrite_dir}}"
    65     - "{{dendrite_dir}}"
    67     - "{{dendrite_dir}}/{{dendrite_instance}}"
    66     - "{{dendrite_dir}}/{{dendrite_instance}}"
       
    67 
       
    68 - name: create instance port symlink
       
    69   become: yes
       
    70   file:
       
    71     src: "{{dendrite_dir}}/{{dendrite_instance}}"
       
    72     dest: "{{dendrite_dir}}/{{dendrite_port}}"
       
    73     state: "link"
       
    74     owner: "{{dendrite_user}}"
       
    75     group: "{{dendrite_user}}"
       
    76     mode: "0755"
       
    77   notify: restart service
    68 
    78 
    69 - name: install keys
    79 - name: install keys
    70   become: yes
    80   become: yes
    71   copy:
    81   copy:
    72     src: "{{item}}"
    82     src: "{{item}}"
   105   become: yes
   115   become: yes
   106   template:
   116   template:
   107     src: "[email protected]"
   117     src: "[email protected]"
   108     dest: "/lib/systemd/system/[email protected]"
   118     dest: "/lib/systemd/system/[email protected]"
   109 
   119 
       
   120 - name: ensure instance service is stopped
       
   121   become: yes
       
   122   systemd: name="dendrite@{{dendrite_instance}}.service" enabled="no" state="stopped" daemon_reload="yes"
       
   123 
   110 - name: ensure service is started
   124 - name: ensure service is started
   111   become: yes
   125   become: yes
   112   systemd: name="dendrite@{{dendrite_instance}}.service" enabled="yes" state="started"
   126   systemd: name="dendrite@{{dendrite_port}}.service" enabled="yes" state="started"