add default ansible config

This commit is contained in:
Timofey
2025-07-24 14:53:32 +03:00
parent b56deaa92d
commit 1783e34421
8 changed files with 450 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
- name: Angie web server
hosts: servers
tasks:
- name: Install packages
ansible.builtin.package:
name:
- ca-certificates
- curl
- gnupg
- name: Add apt repo key
ansible.builtin.apt_key:
url: https://angie.software/keys/angie-signing.gpg
state: present
- name: Add apt repo
ansible.builtin.apt_repository:
repo: "deb https://download.angie.software/angie/\
{{ ansible_facts['distribution'] | lower }}/{{ ansible_facts['distribution_major_version'] }} \
{{ ansible_facts['distribution_release'] }} main"
filename: angie
update_cache: true
- name: Install Angie
ansible.builtin.package:
name: angie
- name: Configure virtual host
ansible.builtin.template:
src: angie/{{ app }}.conf
dest: "/etc/angie/http.d/{{ app }}.conf"
mode: "0644"
notify: Restart angie
- name: Remove default virtual host
ansible.builtin.file:
path: /etc/angie/http.d/default.conf
state: absent
handlers:
- name: Restart angie
ansible.builtin.service:
name: angie
state: restarted