# gitea_install: True
# gitea_enabled: True

# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!

# Using @coolaj86's script as a template
# https://git.coolaj86.com/coolaj86/gitea-installer.sh

# Info needed to install Gitea:

gitea_version: 1.13    # 2021-03-07: Had been fine-grained, e.g. 1.13.4
iset_suffixes:
  i386: 386
  x86_64: amd64
  aarch64: arm64
  armv6l: arm-6
  armv7l: arm-6   # "arm-7" used to work, but no longer since 2019-04-20's Gitea 1.8.0: https://github.com/iiab/iiab/issues/1673 https://github.com/iiab/iiab/pull/1713 -- 2019-07-31: ARM7 support will return at some point, according to: https://github.com/go-gitea/gitea/pull/7037#issuecomment-516735216 (what about ARM8 support for RPi 4?)

gitea_iset_suffix: "{{ iset_suffixes[ansible_architecture] | default('unknown') }}"

gitea_download_url: "https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-{{ gitea_iset_suffix }}"
gitea_integrity_url: "{{ gitea_download_url }}.asc"

gitea_root_directory: "{{ content_base }}/gitea"    # /library/gitea
gitea_subdirectories:
  - bin
  - custom
  - data
  - indexers
  - public
  - log
gitea_install_path: "{{ gitea_root_directory }}/bin/gitea-{{ gitea_version }}"
gitea_checksum_path: "{{ gitea_root_directory }}/bin/gitea-{{ gitea_version }}.asc"

# Info needed to verify Gitea
gitea_gpg_key: 7C9E68152594688862D62AF62D9AE806EC1592E2

# Data locations
gitea_db_path: "{{ gitea_root_directory }}/data/gitea.db"
gitea_repo_root: "{{ gitea_root_directory }}/data/repositories"
gitea_lfs_root: "{{ gitea_root_directory }}/data/lfs"

# Log file location
gitea_log_root: "{{ gitea_root_directory }}/log"

# Extra configuration
gitea_display_name: Internet-in-a-Box Gitea
skip_install_screen: true    # lowercase for Gitea's own /etc/gitea/app.ini

gitea_link_path: "{{ gitea_root_directory }}/gitea"

# Info needed to run Gitea:

gitea_user: gitea
gitea_home: "/home/{{ gitea_user }}"    # SSH credentials stored here
gitea_run_directory: "{{ gitea_root_directory }}"

gitea_url: /gitea
gitea_port: 61734    # leet for GITEA
