1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

AWStats + Calibre-Web + Gitea + Kiwix + Munix W/O Apache

This commit is contained in:
root 2021-07-06 17:59:07 -04:00
parent 654bff5bbe
commit 1dfd80af19
24 changed files with 69 additions and 132 deletions

View file

@ -9,13 +9,13 @@
# Info needed to install Gitea:
gitea_version: 1.14 # 2021-03-07: Had been fine-grained, e.g. 1.13.4
gitea_version: 1.14 # 2021-03-07: Grabs latest point release from this branch. Rather than hardcoding each, e.g. 1.14.5
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?)
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') }}"

View file

@ -18,7 +18,7 @@
groups: gitea
home: "{{ gitea_home }}" # /home/gitea
- name: Create Gitea directory structure
- name: Create {{ gitea_root_directory }} directory structures
file:
path: "{{ gitea_root_directory }}/{{ item }}" # /library/gitea
state: directory
@ -43,15 +43,15 @@
msg: "Could not find a binary for the CPU architecture \"{{ ansible_architecture }}\""
when: gitea_iset_suffix == "unknown"
- name: Download Gitea binary {{ gitea_download_url }} to {{ gitea_install_path }} (~103 MB, CAN TAKE 20 MIN)
- name: Download Gitea binary {{ gitea_download_url }} to {{ gitea_install_path }} (0775, ~104 MB)
get_url:
url: "{{ gitea_download_url }}"
dest: "{{ gitea_install_path }}"
mode: '0775'
dest: "{{ gitea_install_path }}" # e.g. /library/gitea/bin/gitea-1.14
mode: 0775
timeout: "{{ download_timeout }}"
when: internet_available
- name: Download Gitea GPG signature
- name: Download Gitea GPG signature {{ gitea_integrity_url }} to {{ gitea_checksum_path }}
get_url:
url: "{{ gitea_integrity_url }}"
dest: "{{ gitea_checksum_path }}"
@ -79,36 +79,30 @@
# Gitea. User gitea needs write permissions during the first run but not
# subsequent runs.
- name: mkdir /etc/gitea
- name: mkdir /etc/gitea (0770)
file:
state: directory
path: /etc/gitea
owner: root
group: gitea
mode: '0770'
mode: 0770
- name: Install /etc/gitea/app.ini from template
- name: Install /etc/gitea/app.ini from template (0664)
template:
src: app.ini.j2
dest: /etc/gitea/app.ini
owner: root
group: gitea
mode: '0664'
mode: 0664
# 4. Create systemd service & prepare Apache for http://box/gitea
# 4. Create systemd service & prepare NGINX for http://box/gitea
- name: "Install from template: /etc/systemd/system/gitea.service"
template:
src: gitea.service.j2
dest: /etc/systemd/system/gitea.service
- name: "Install from template: /etc/{{ apache_conf_dir }}/gitea.conf"
template:
src: gitea.conf.j2
dest: "/etc/{{ apache_conf_dir }}/gitea.conf" # apache2/sites-available
when: apache_installed is defined
# 5. RECORD Gitea AS INSTALLED

View file

@ -39,13 +39,8 @@
state: stopped
when: not gitea_enabled
- name: Enable/Disable/Restart Apache if primary
include_tasks: apache.yml
when: not nginx_enabled
- name: Enable/Disable/Restart NGINX if primary
- name: Enable/Disable/Restart NGINX
include_tasks: nginx.yml
when: nginx_enabled
- name: Add 'gitea' to list of services at {{ iiab_ini_file }}