44b0e32063
Change-Id: I8b8846d5451159ddf17966a58526f70ab3a258dc
46 lines
1001 B
YAML
46 lines
1001 B
YAML
- name: Ensure bot directories
|
|
file:
|
|
state: directory
|
|
path: '/var/lib/matrix-eavesdrop/{{ item }}'
|
|
mode: 0755
|
|
loop:
|
|
- data
|
|
- config
|
|
|
|
- name: Install eavesdrop config
|
|
template:
|
|
src: config.yaml
|
|
dest: /var/lib/matrix-eavesdrop/config/config.yaml
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: Restart matrix-eavesdrop
|
|
|
|
- name: Ensure /etc/matrix-eavesdrop-docker directory
|
|
file:
|
|
state: directory
|
|
path: /etc/matrix-eavesdrop-docker
|
|
mode: 0755
|
|
|
|
- name: Put docker-compose file in place
|
|
copy:
|
|
src: docker-compose.yaml
|
|
dest: /etc/matrix-eavesdrop-docker/docker-compose.yaml
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Run docker-compose pull
|
|
shell:
|
|
cmd: docker-compose pull
|
|
chdir: /etc/matrix-eavesdrop-docker/
|
|
|
|
- name: Run docker-compose up
|
|
shell:
|
|
cmd: "docker-compose up -d"
|
|
chdir: /etc/matrix-eavesdrop-docker/
|
|
|
|
- name: Run docker prune to cleanup unneeded images
|
|
shell:
|
|
cmd: docker image prune -f
|