summaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-05-21 22:06:04 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-05-21 22:08:03 +0200
commit933bf504e42012be541c3b02879d3f281c8a0e4b (patch)
treea0d34f9fe06e1963e0004da4293bcc391d02afe5 /tasks
parent2cd6bc6e4a1d73a14af0acb3b884f01da9524986 (diff)
Update webmap task.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/webmap.yml56
1 files changed, 11 insertions, 45 deletions
diff --git a/tasks/webmap.yml b/tasks/webmap.yml
index a417dbd..905aa73 100644
--- a/tasks/webmap.yml
+++ b/tasks/webmap.yml
@@ -15,7 +15,6 @@
- python3
- python3-brotli
- python3-gdal
- - python3-lxml
- python3-requests
- python3-systemd
- python3-tqdm
@@ -41,11 +40,18 @@
owner=root group=root
mode=0755
-- name: Copy /usr/local/share/webmap/common.py
- copy: src=webmap-tools/common.py
- dest=/usr/local/share/webmap/common.py
+- name: Copy /usr/local/share/webmap/*.py modules
+ copy: src=webmap-tools/{{ item }}
+ dest=/usr/local/share/webmap/{{ item }}
owner=root group=root
mode=0644
+ with_items:
+ # TODO these should be compiled
+ - common.py
+ - common_gdal.py
+ - import_source.py
+ - export_mvt.py
+ - rename_exchange.py
- name: Copy webmap-update@.target
copy: src=etc/systemd/system/webmap-update@.target
@@ -96,12 +102,6 @@
owner=root group=root
state=link force=yes
-- name: Copy /usr/local/share/webmap/webmap-download-mrr.py
- copy: src=webmap-tools/webmap-download-mrr.py
- dest=/usr/local/share/webmap/webmap-download-mrr.py
- owner=root group=root
- mode=0644
-
- name: Create directory /var/cache/webmap
file: path=/var/cache/webmap
state=directory
@@ -356,46 +356,12 @@
- meta: flush_handlers
-- name: Create system user '_webmap-publish'
- user: name=_webmap-publish system=true
- group=_webmap
- createhome=false
- home=/nonexistent
- shell=/usr/sbin/nologin
- comment="Webmap update (publication as MVT)"
- password="!"
- state=present
-
-- name: Copy /usr/local/share/webmap/publish.py
- copy: src=webmap-tools/webmap-publish
- dest=/usr/local/share/webmap/publish.py
- owner=root group=root
- mode=0755
-
-- name: Create /usr/local/bin/webmap-publish
- file: src=../share/webmap/publish.py
- dest=/usr/local/bin/webmap-publish
- owner=root group=root
- state=link force=yes
-
- name: Create directory /var/www/webmap/tiles
file: path=/var/www/webmap/tiles
state=directory
- owner=_webmap-publish group=root
+ owner=_webmap-import group=root
mode=0755
-- name: Copy webmap-publish@.service
- copy: src=etc/systemd/system/webmap-publish@.service
- dest=/etc/systemd/system/webmap-publish@.service
- owner=root group=root
- mode=0644
- notify:
- - systemctl daemon-reload
-
-#- name: Enable webmap-publish@.service
-# service: name=webmap-publish@{{ item }}.service enabled=true
-# with_items: "{{ webmap_layer_groups }}"
-
- name: Copy /etc/tmpfiles.d/webmap.conf
copy: src=etc/tmpfiles.d/webmap.conf