From 3d4be12a4192ee702581eada49e18bb4b21fc58a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <Joerg.Sachse@slub-dresden.de>
Date: Tue, 23 Mar 2021 08:58:06 +0100
Subject: [PATCH] refactor: move font installation to separate taskfile

---
 tasks/install-callas-pdf-engine.yml | 18 ------------------
 tasks/install_fonts.yml             | 18 ++++++++++++++++++
 tasks/main.yml                      |  4 ++++
 3 files changed, 22 insertions(+), 18 deletions(-)
 create mode 100644 tasks/install_fonts.yml

diff --git a/tasks/install-callas-pdf-engine.yml b/tasks/install-callas-pdf-engine.yml
index 50d1d49..f7b5184 100644
--- a/tasks/install-callas-pdf-engine.yml
+++ b/tasks/install-callas-pdf-engine.yml
@@ -80,21 +80,3 @@
     - src: "/usr/lib/x86_64-linux-gnu/libstdc++.so.6"
       dest: "/usr/local/lib/callas_pdfEngine_SDK_x64/callas_pdfEngineSDK_x64_Linux_{{ vault_callas_sdk_version }}/lib/libstdc++.so.6"
   notify: run ldconfig to configure dynamic linker run-time bindings
-
-# provide fonts for callas
-- name: create font-cache folder
-  file:
-    path: "/usr/local/share/callas/cache/"
-    state: directory
-    mode: "0775"
-    owner: "www-data"
-    group: "www-data"
-
-# install applefonts
-- name: copy applefonts
-  unarchive:
-    src: "applefonts.zip"
-    dest: "/usr/share/fonts/truetype/"
-    follow: "yes"
-  notify:
-    - run fc-cache to rebuild font information cache files and add applefonts
diff --git a/tasks/install_fonts.yml b/tasks/install_fonts.yml
new file mode 100644
index 0000000..83f96a1
--- /dev/null
+++ b/tasks/install_fonts.yml
@@ -0,0 +1,18 @@
+---
+# provide fonts for callas
+- name: create font-cache folder
+  file:
+    path: "/usr/local/share/callas/cache/"
+    state: directory
+    mode: "0775"
+    owner: "www-data"
+    group: "www-data"
+
+# install applefonts
+- name: copy applefonts
+  unarchive:
+    src: "applefonts.zip"
+    dest: "/usr/share/fonts/truetype/"
+    follow: "yes"
+  notify:
+    - run fc-cache to rebuild font information cache files and add applefonts
diff --git a/tasks/main.yml b/tasks/main.yml
index 83488ee..0f8bb04 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -29,6 +29,10 @@
 #import_tasks: install-callas-pdf-engine.yml
 #tags: [callaspdf]
 
+- name: install fonts
+  import_tasks: install_fonts.yml
+  tags: [fonts]
+
 - name: install validators
   import_tasks: install-validators.yml
   tags: [validators]
-- 
GitLab