From 4c176206e3fe6de74aa85e20e39df8721cd93436 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Thu, 20 May 2021 13:36:05 +0200 Subject: [PATCH] asciidoctor installation and showtitle --- README.adoc | 15 ++++++++++++++- tasks/main.yml | 8 ++++++++ templates/gitea.ini.j2 | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 6bf4e42..6ebebcf 100644 --- a/README.adoc +++ b/README.adoc @@ -44,7 +44,11 @@ Example Playbook ---------------- This determines the newest version of gitea automatically. -So it defines `gitea_version` and `gitea_download_uri`. +So it defines `gitea_version` and `gitea_download_uri` for you. + +It uses a host `local`, which you have to define in your inventory. +Set `ansible_host=localhost` for this host. +It uses this host for fetching needed informations once. ---- --- @@ -55,6 +59,15 @@ So it defines `gitea_version` and `gitea_download_uri`. become: false tasks: + - delegate_to: local + run_once: true + remote_user: root + become: false + apt: + name: + - ruby-dev + - make + - gcc - delegate_to: local run_once: true remote_user: root diff --git a/tasks/main.yml b/tasks/main.yml index 56f892c..e4d7229 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,6 +11,8 @@ - gnutls-utils - py3-openssl - gitea + - ruby + - ruby-dev - name: apt-based when: '"apt" == ansible_pkg_mgr|lower' @@ -24,6 +26,8 @@ - nginx - gnutls-bin - python-openssl + - ruby + - ruby-dev - name: create git-group group: name: git @@ -72,6 +76,10 @@ remote_src: yes mode: 0755 +- name: install asciidoctor + gem: + name: asciidoctor + - name: install gitea-service for systemd when: ansible_service_mgr == "systemd" copy: diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index 63843e3..98aa582 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -57,7 +57,7 @@ INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1ODkxOTc0MDl9.e [markup.asciidoc] ENABLED = true FILE_EXTENSIONS = .adoc,.asciidoc -RENDER_COMMAND = "asciidoctor --out-file=- --safe-mode secure --no-header-footer --backend xhtml5 -" +RENDER_COMMAND = "asciidoctor --out-file=- --safe-mode secure --embedded --backend xhtml5 --attribute showtitle=on -" IS_INPUT_FILE = false [oauth2]