---
- name: install packages
package:
name:
- jupyter-nbconvert
- name: install Jupyter conversion script
copy:
src: 'convert-ipynb.sh'
dest: '/usr/local/bin/convert-ipynb'
mode: 0755
- name: ensure Jupyter assets on all pages
blockinfile:
path: '/var/lib/gitea/custom/templates/custom/header.tmpl'
block: |
marker: ''
notify: 'restart Gitea'
- name: configure Gitea
blockinfile:
path: '/etc/gitea/app.ini'
block: |
[markup.jupyter]
ENABLED = true
FILE_EXTENSIONS = .ipynb
RENDER_COMMAND = /usr/local/bin/convert-ipynb
IS_INPUT_FILE = false
marker: '# {mark} ANSIBLE MANAGED BLOCK: Jupyter'
notify: 'restart Gitea'