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.
81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
---
|
|
- name: Install A13Labs systools
|
|
hosts: ubuntu
|
|
gather_facts: true
|
|
|
|
# Specific tasks for this playbook
|
|
tasks:
|
|
- name: Set required facts
|
|
ansible.builtin.set_fact:
|
|
systools_version: "{{ systools_version | default('0.4.5') }}"
|
|
ssh_locker_timeout: "{{ ssh_locker_timeout | default('5m') }}"
|
|
tags: always
|
|
|
|
- name: Download systools zip file
|
|
ansible.builtin.get_url:
|
|
url: https://github.com/a13labs/systools/releases/download/v{{ systools_version }}/systools-v{{ systools_version }}-linux-amd64.zip
|
|
dest: /tmp/systools-v{{ systools_version }}-linux-amd64.zip
|
|
mode: '0644'
|
|
|
|
- name: Unpack systools zip file
|
|
become: true
|
|
failed_when: false
|
|
ansible.builtin.unarchive:
|
|
src: /tmp/systools-v{{ systools_version }}-linux-amd64.zip
|
|
dest: /usr/local/bin
|
|
remote_src: true
|
|
mode: '0755'
|
|
extra_opts:
|
|
- -j
|
|
|
|
- name: Remove systools zip file
|
|
ansible.builtin.file:
|
|
path: /tmp/systools-v{{ systools_version }}-linux-amd64.zip
|
|
state: absent
|
|
|
|
- name: Set root-only executable permissions for specific tools
|
|
become: true
|
|
ansible.builtin.file:
|
|
path: /usr/local/bin/{{ item }}
|
|
mode: '0700'
|
|
loop:
|
|
- open_volume
|
|
- read_system_id
|
|
- k8s_encryption_provider
|
|
|
|
- name: Create shared socket directory
|
|
become: true
|
|
ansible.builtin.file:
|
|
path: /var/run/ssh_locker
|
|
state: directory
|
|
mode: '0777'
|
|
|
|
- name: Install ssh_locker service
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: ssh_locker.service.j2
|
|
dest: /etc/systemd/system/ssh_locker.service
|
|
mode: '0644'
|
|
notify:
|
|
- Reload systemd daemon
|
|
- Enable ssh_locker service
|
|
- Start ssh_locker service
|
|
|
|
handlers:
|
|
- name: Reload systemd daemon
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
daemon_reload: true
|
|
|
|
- name: Enable ssh_locker service
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: ssh_locker
|
|
enabled: true
|
|
|
|
- name: Start ssh_locker service
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: ssh_locker
|
|
state: started
|