Enhance Ansible playbooks and scripts:
- 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.
This commit is contained in:
@@ -4,18 +4,19 @@
|
||||
- name: Set Caddy directories
|
||||
ansible.builtin.set_fact:
|
||||
caddy_service_dir: "{{ ansible_env.HOME }}/services/caddy"
|
||||
caddy_data_dir: "/mnt/object_storage/services/caddy"
|
||||
caddy_data_dir: "{{ '/mnt/services/caddy' if inventory_hostname == 'mennos-server' else '/mnt/object_storage/services/caddy' }}"
|
||||
geoip_db_path: "{{ '/mnt/services/echoip' if inventory_hostname == 'mennos-server' else '/mnt/object_storage/services/echoip' }}"
|
||||
caddy_email: "{{ lookup('community.general.onepassword', 'qwvcr4cuumhqh3mschv57xdqka', vault='j7nmhqlsjmp2r6umly5t75hzb4', field='email') }}"
|
||||
|
||||
- name: Setup country blocking
|
||||
ansible.builtin.include_tasks: country-blocking.yml
|
||||
|
||||
- name: Create Caddy directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ caddy_service_dir }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Setup country blocking
|
||||
ansible.builtin.include_tasks: country-blocking.yml
|
||||
|
||||
- name: Copy Dockerfile for custom Caddy build
|
||||
ansible.builtin.copy:
|
||||
src: Dockerfile
|
||||
|
||||
Reference in New Issue
Block a user