Files
ansible-repo/playbooks/software/angie.yml
hogweed1 59b70f3c92
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1s
checking angie install playbook
2026-05-16 01:23:43 +10:00

45 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
##### TODO make it reverse-proxy for everything
- name: Install Angie web server using modern DEB822 standard
hosts: all
become: true
tasks:
# 1. Зачищаем старые следы, если они случайно остались от прошлых попыток
- name: Purge legacy Angie files if they exist
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- /etc/apt/trusted.gpg.d/angie-signing.gpg
- /etc/apt/sources.list.d/angie.list
# 2. Настраиваем репозиторий по канонам безопасности (DEB822 + Keyrings)
- name: Add Angie repository
ansible.builtin.deb822_repository:
name: angie
types: deb
# Формируем правильный URI на основе фактов о системе
# ansible_distribution_id вернет 'debian' (в нижнем регистре)
# ansible_distribution_version вернет версию (например, '12')
uris: "https://download.angie.software/angie/{{ ansible_distribution_id | lower }}/{{ ansible_distribution_version }}"
# ansible_distribution_release подставит кодовое имя (например, 'bookworm')
suites: "{{ ansible_distribution_release }}"
components: main
# Автоматически скачиваем ключ, дебронируем и изолируем его
signed_by: https://angie.software/keys/angie-signing.gpg
register: angie_repo_added
# 3. Обновляем кэш пакетов (только если репозиторий изменился или добавился)
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
when: angie_repo_added.changed
# 4. Устанавливаем сам веб-сервер и консоль управления
- name: Install Angie and console tools
ansible.builtin.apt:
name:
- angie
- angie-console-light
state: present