aee57a8b89
- Updated SSH configuration for Gitea to disable banner and TTY, and modified the AuthorizedKeysCommand. - Simplified gitea-shell script to directly call the k8s_gitea_shell command with required parameters. - Removed unused gitea-auth script from playbook_gitea.yml. - Updated systools_version in playbook_systools.yml to 0.4.5. - Enhanced ssh_locker_helper to copy redirect URL to clipboard based on OS. - Added a new script test_imaps for IMAP testing. - Updated Terraform configurations for various applications, including: - Added a backup script for MariaDB with retention policy. - Changed Gitea version to 1.24-rootless and adjusted SSH settings. - Updated Nginx configurations to log errors and access to stderr/stdout. - Refactored services to use ClusterIP type and adjusted security contexts for deployments. - Added temporary storage for applications using empty_dir. - Enhanced backup.sh scripts for better error handling and logging.
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
---
|
|
- name: Gitea Playbook (K8s)
|
|
hosts: gitea
|
|
gather_facts: true
|
|
|
|
# Specific tasks for this playbook
|
|
tasks:
|
|
- name: Set required facts
|
|
ansible.builtin.set_fact:
|
|
gitea_home: "{{ persistent_data | default('/var/lib') }}/gitea"
|
|
gitea_mysql_home: "{{ database_path | default('/var/lib') }}/mysql.gitea"
|
|
gitea_user_id: 1000
|
|
gitea_group_id: 1000
|
|
mysql_user_id: 999
|
|
mysql_group_id: 107
|
|
gitea_sshd_config: "/etc/ssh/sshd_config.d/03-gitea.conf"
|
|
gitea_scripts:
|
|
- "scripts/gitea-shell"
|
|
tags: always
|
|
|
|
- name: Copy local scripts to remote
|
|
become: true
|
|
ansible.builtin.copy:
|
|
src: "{{ item }}"
|
|
dest: "/usr/local/bin/{{ item | basename }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
loop: "{{ gitea_scripts }}"
|
|
tags:
|
|
- tasks
|
|
- tasks::scripts
|
|
|
|
- name: Copy sshd_config.d gitea files to remote
|
|
become: true
|
|
ansible.builtin.copy:
|
|
src: "configs/sshd_config.d/gitea.conf"
|
|
dest: "{{ gitea_sshd_config }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0600"
|
|
tags:
|
|
- tasks
|
|
- tasks::sshd_config
|
|
- tasks::configs
|
|
|
|
- name: Create required gitea data folder
|
|
become: true
|
|
ansible.builtin.file:
|
|
state: directory
|
|
path: "{{ gitea_home }}"
|
|
mode: "0750"
|
|
owner: "{{ gitea_user_id }}"
|
|
group: "{{ gitea_group_id }}"
|
|
tags:
|
|
- tasks
|
|
- tasks::folders
|
|
|
|
- name: Create required mysql data folder
|
|
become: true
|
|
ansible.builtin.file:
|
|
state: directory
|
|
path: "{{ gitea_mysql_home }}"
|
|
mode: "0750"
|
|
owner: "{{ mysql_user_id }}"
|
|
group: "{{ mysql_group_id }}"
|
|
tags:
|
|
- tasks
|
|
- tasks::folders
|