62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
---
|
|
|
|
- name: install certs
|
|
copy:
|
|
src: "/usr/local/etc/letsencrypt/live/{{ item }}"
|
|
dest: "/usr/local/etc/certs/"
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
tags:
|
|
- letsencrypt-certs
|
|
- letsencrypt
|
|
notify: reload nginx
|
|
vars:
|
|
prediff_cmd: echo
|
|
with_items:
|
|
- "{{ element_url }}"
|
|
|
|
- name: element config
|
|
template:
|
|
src: element-config.json.j2
|
|
dest: "{{ systemuserlist.matrix.home }}/element/config.json"
|
|
owner: matrix
|
|
group: matrix
|
|
mode: 0664
|
|
|
|
- name: template element vhost
|
|
template:
|
|
src: 01-element.j2
|
|
dest: /etc/nginx/sites-enabled/01-element
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
tags:
|
|
- nginx
|
|
- matrix-nginx
|
|
notify: reload nginx
|
|
|
|
- name: start matrix-element container
|
|
docker_container:
|
|
name: matrix-element
|
|
image: bubuntux/element-web:latest
|
|
auto_remove: false
|
|
detach: true
|
|
pull: true
|
|
restart_policy: "unless-stopped"
|
|
state: started
|
|
container_default_behavior: compatibility
|
|
networks_cli_compatible: false
|
|
network_mode: bridgewithdns
|
|
networks:
|
|
- name: bridgewithdns
|
|
ipv4_address: "{{ bridgewithdns.element }}"
|
|
mounts:
|
|
- type: bind
|
|
source: "{{ systemuserlist.matrix.home }}/element/config.json"
|
|
target: /etc/element-web/config.json
|
|
read_only: true
|
|
tags:
|
|
- element-container
|
|
- docker-containers
|