mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Bypass /etc/ImageMagick-6/policy.xml PDF surgery w/ ImageMagick 7+
This commit is contained in:
parent
9e235424dc
commit
8b5ea641d4
1 changed files with 9 additions and 1 deletions
|
@ -38,6 +38,13 @@
|
||||||
# state: present
|
# state: present
|
||||||
# when: python_version is version('3.10', '>=')
|
# when: python_version is version('3.10', '>=')
|
||||||
|
|
||||||
|
- name: Does /etc/ImageMagick-6/policy.xml exist?
|
||||||
|
stat:
|
||||||
|
path: /etc/ImageMagick-6/policy.xml
|
||||||
|
register: imagemagick6_policy_xml
|
||||||
|
|
||||||
|
# 2024-12-16: Debian 13 uses /etc/ImageMagick-7/policy.xml instead, which doesn't need this lineinfile surgery:
|
||||||
|
# https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion
|
||||||
- name: Allow ImageMagick to read PDFs, per /etc/ImageMagick-6/policy.xml, to create book cover thumbnails
|
- name: Allow ImageMagick to read PDFs, per /etc/ImageMagick-6/policy.xml, to create book cover thumbnails
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/ImageMagick-6/policy.xml
|
path: /etc/ImageMagick-6/policy.xml
|
||||||
|
@ -45,8 +52,9 @@
|
||||||
backrefs: yes
|
backrefs: yes
|
||||||
line: ' <policy domain="coder" rights="read" pattern="PDF" />'
|
line: ' <policy domain="coder" rights="read" pattern="PDF" />'
|
||||||
state: present
|
state: present
|
||||||
|
when: imagemagick6_policy_xml.stat.exists
|
||||||
|
|
||||||
- name: "Create 3 Calibre-Web folders to store data and config files: {{ calibreweb_home }}, {{ calibreweb_venv_path }}, {{ calibreweb_config }} (all set to {{ calibreweb_user }}:{{ apache_user }}) (default to 0755)"
|
- name: "Create 2 Calibre-Web folders to store data and config files: {{ calibreweb_home }}, {{ calibreweb_config }} (each set to {{ calibreweb_user }}:{{ apache_user }}, default to 0755)"
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue