--- - name: renderers | Global renderers config tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_renderers'] block: - name: renderers | Global renderers config community.general.ini_file: path: '{{ gitea_conf_dir }}/app.ini' section: '{{ item.section }}' option: '{{ item.option }}' value: '{{ item.value }}' state: '{{ item.state }}' owner: '{{ gitea_user }}' group: '{{ gitea_group }}' mode: '0640' create: false loop: '{{ gitea_renderers_global_conf }}' when: gitea_install_viewer_addons notify: Restart gitea - name: renderers | Configure asciidoc tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_asciidoc'] block: - name: renderers | Configure asciidoc community.general.ini_file: path: '{{ gitea_conf_dir }}/app.ini' section: '{{ item.section }}' option: '{{ item.option }}' value: '{{ item.value }}' state: '{{ item.state }}' owner: '{{ gitea_user }}' group: '{{ gitea_group }}' mode: '0640' create: false loop: '{{ gitea_markup_asciidoc_conf }}' when: gitea_install_viewer_addons notify: Restart gitea - name: renderers | Configure jupyter markup tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_jupyter'] block: - name: renderers | Configure jupyter markup community.general.ini_file: path: '{{ gitea_conf_dir }}/app.ini' section: '{{ item.section }}' option: '{{ item.option }}' value: '{{ item.value }}' state: '{{ item.state }}' owner: '{{ gitea_user }}' group: '{{ gitea_group }}' mode: '0640' create: false loop: '{{ gitea_markup_jupyter_conf }}' when: gitea_install_viewer_addons notify: Restart gitea - name: renderers | Install the jupyter CSS become: true become_user: '{{ gitea_user }}' ansible.builtin.copy: src: jupyter.css dest: '{{ gitea_data_dir }}/custom/public/assets/css/jupyter.css' mode: "0444" - name: renderers | Install html template that loads the CSS become: true become_user: '{{ gitea_user }}' ansible.builtin.copy: src: header.tmpl dest: '{{ gitea_data_dir }}/custom/templates/custom/header.tmpl' mode: "0444" - name: renderers | Check if the awesome fonts are installed ansible.builtin.stat: path: /usr/share/fonts-font-awesome register: awesome_fonts_dir - name: renderers | Link to the awesome fonts directory become: true become_user: '{{ gitea_user }}' ansible.builtin.file: src: /usr/share/fonts-font-awesome dest: '{{ gitea_data_dir }}/custom/public/assets/components/font-awesome' state: link when: awesome_fonts_dir.stat.exists - name: renderers | Configure restructuredtext markup tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_restructuredtext'] block: - name: renderers | Configure restructuredtext markup community.general.ini_file: path: '{{ gitea_conf_dir }}/app.ini' section: '{{ item.section }}' option: '{{ item.option }}' value: '{{ item.value }}' state: '{{ item.state }}' owner: '{{ gitea_user }}' group: '{{ gitea_group }}' mode: '0640' create: false loop: '{{ gitea_markup_restructuredtext_conf }}' when: gitea_install_viewer_addons notify: Restart gitea - name: renderers | Configure sanitizer TeX markup tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_sanitizer_tex'] block: - name: renderers | Configure sanitizer TeX markup community.general.ini_file: path: '{{ gitea_conf_dir }}/app.ini' section: '{{ item.section }}' option: '{{ item.option }}' value: '{{ item.value }}' state: '{{ item.state }}' owner: '{{ gitea_user }}' group: '{{ gitea_group }}' mode: '0640' create: false loop: '{{ gitea_markup_sanitizer_tex_conf }}' when: gitea_install_viewer_addons notify: Restart gitea - name: renderers | Configure markdown markup tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_markdown'] block: - name: renderers | Configure markdown markup community.general.ini_file: path: '{{ gitea_conf_dir }}/app.ini' section: '{{ item.section }}' option: '{{ item.option }}' value: '{{ item.value }}' state: '{{ item.state }}' owner: '{{ gitea_user }}' group: '{{ gitea_group }}' mode: '0640' create: false loop: '{{ gitea_markup_markdown_conf }}' when: gitea_install_viewer_addons notify: Restart gitea - name: renderers | Configure docx markup when: gitea_install_viewer_addons tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_docx'] block: - name: renderers | Configure the docx markup community.general.ini_file: path: '{{ gitea_conf_dir }}/app.ini' section: '{{ item.section }}' option: '{{ item.option }}' value: '{{ item.value }}' state: '{{ item.state }}' owner: '{{ gitea_user }}' group: '{{ gitea_group }}' mode: '0640' create: false loop: '{{ gitea_markup_docx_conf }}' notify: Restart gitea - name: renderers | Create the docx template become: true become_user: '{{ gitea_user }}' ansible.builtin.copy: content: "$body$" dest: '{{ gitea_data_dir }}/custom/templates/docx-basic.html' mode: "0644"