commit 41f01ea59d83d469478d8cf048770145048a627b parent 0c235a73975db02665ff90b873642449754e58e2 Author: Florian Dold <florian@dold.me> Date: Mon, 16 Feb 2026 11:31:16 +0100 install typst for exchange Diffstat:
| M | roles/exchange/tasks/main.yml | | | 52 | +++++++++++++++++++++++++++++++++++++++++++++++++++- |
1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/roles/exchange/tasks/main.yml b/roles/exchange/tasks/main.yml @@ -24,6 +24,56 @@ state: latest when: ansible_os_family == 'Debian' +- name: Install Typst on Debian Trixie + vars: + typst_version: "0.14.2" + typst_checksum: "sha256:a6044cbad2a954deb921167e257e120ac0a16b20339ec01121194ff9d394996d" + typst_download_url: "https://github.com/typst/typst/releases/download/v{{ typst_version }}/typst-x86_64-unknown-linux-musl.tar.xz" + + block: + - name: Create temporary directory for extraction + ansible.builtin.tempfile: + state: directory + suffix: typst_install + register: temp_dir + + - name: Download and verify Typst binary + ansible.builtin.get_url: + url: "{{ typst_download_url }}" + dest: "{{ temp_dir.path }}/typst.tar.xz" + checksum: "{{ typst_checksum }}" + mode: "0644" + + - name: Unarchive Typst binary + ansible.builtin.unarchive: + src: "{{ temp_dir.path }}/typst.tar.xz" + dest: "{{ temp_dir.path }}" + remote_src: true + + - name: Install Typst to /usr/local/bin + ansible.builtin.copy: + # The archive extracts into a folder named 'typst-x86_64-unknown-linux-musl' + src: "{{ temp_dir.path }}/typst-x86_64-unknown-linux-musl/typst" + dest: /usr/local/bin/typst + mode: "0755" + owner: root + group: root + remote_src: true + + - name: Cleanup temporary files + ansible.builtin.file: + path: "{{ temp_dir.path }}" + state: absent + + - name: Verify installation + ansible.builtin.command: typst --version + register: typst_output + changed_when: false + + - name: Print Typst version + ansible.builtin.debug: + msg: "Typst installed: {{ typst_output.stdout }}" + - name: Ensure Taler exchange virtualhost configuration file exists ansible.builtin.template: src: templates/etc/nginx/sites-available/exchange-nginx.conf.j2 @@ -144,7 +194,7 @@ dest: "/var/lib/taler-exchange/{{ SANCTION_LIST }}" owner: root group: root - mode: '0644' + mode: "0644" when: SANCTION_LIST is defined notify: sanctions-reset