2020-06-17 20:44:52 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Create data directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- /opt/tileserver
|
|
|
|
- /opt/tileserver/styles
|
|
|
|
|
|
|
|
- name: Configre tileserver
|
|
|
|
copy:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: /opt/tileserver/{{ item }}
|
|
|
|
with_items:
|
|
|
|
- config.json
|
|
|
|
- styles/day.json
|
|
|
|
- styles/night.json
|
|
|
|
notify: Restart tileserver
|
|
|
|
|
|
|
|
- name: Run tileserver container
|
|
|
|
docker_container:
|
|
|
|
name: tileserver
|
2024-10-04 19:37:04 +02:00
|
|
|
image: maptiler/tileserver-gl:v5.0.0
|
2020-06-17 20:44:52 +02:00
|
|
|
interactive: yes
|
|
|
|
ports:
|
2024-10-04 19:37:04 +02:00
|
|
|
- "80:8080"
|
2021-06-08 22:07:40 +02:00
|
|
|
pull: yes
|
2020-06-17 20:44:52 +02:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
state: started
|
|
|
|
tty: yes
|
|
|
|
volumes:
|
|
|
|
- "/opt/tileserver:/data"
|