- Add '--skip-check' option to update.py to skip dotfiles update checks. - Update playbook.yml and symlinks.yml to use 'inventory_hostname' for host checks. - Refactor service task inclusions in server.yml for better readability and maintainability. - Add new Home Assistant service with corresponding docker-compose configuration. - Update various service YAML files to use dynamic paths based on inventory_hostname. - Add tags for service tasks to improve organization and execution control. - Remove obsolete services.yml file.
32 lines
1.0 KiB
YAML
32 lines
1.0 KiB
YAML
---
|
|
- name: Deploy WireGuard service
|
|
block:
|
|
- name: Set WireGuard directories
|
|
ansible.builtin.set_fact:
|
|
wireguard_service_dir: "{{ ansible_env.HOME }}/services/wireguard"
|
|
wireguard_data_dir: "/mnt/object_storage/services/wireguard"
|
|
|
|
- name: Create WireGuard directory
|
|
ansible.builtin.file:
|
|
path: "{{ wireguard_service_dir }}"
|
|
state: directory
|
|
mode: "0755"
|
|
|
|
- name: Deploy WireGuard docker-compose.yml
|
|
ansible.builtin.template:
|
|
src: docker-compose.yml.j2
|
|
dest: "{{ wireguard_service_dir }}/docker-compose.yml"
|
|
mode: "0644"
|
|
register: wireguard_compose
|
|
|
|
- name: Stop WireGuard service
|
|
ansible.builtin.command: docker compose -f "{{ wireguard_service_dir }}/docker-compose.yml" down --remove-orphans
|
|
when: wireguard_compose.changed
|
|
|
|
- name: Start WireGuard service
|
|
ansible.builtin.command: docker compose -f "{{ wireguard_service_dir }}/docker-compose.yml" up -d
|
|
when: wireguard_compose.changed
|
|
tags:
|
|
- services
|
|
- wireguard
|