Files
dotfiles/config/ansible/main.yml
Menno van Leeuwen 35ffc77056
All checks were successful
Nix Format Check / check-format (push) Successful in 37s
refactor: add pre-tasks for installing Ansible collections and improve final setup messages
2025-01-22 16:22:15 +01:00

22 lines
692 B
YAML

- name: Configure all hosts
hosts: all
gather_facts: true
pre_tasks:
- name: Install required collections
ansible.builtin.command: ansible-galaxy collection install -r requirements.yml
delegate_to: localhost
run_once: true
tasks:
- name: Include global tasks
ansible.builtin.import_tasks: tasks/global/global.yml
- name: Include workstation tasks
ansible.builtin.import_tasks: tasks/workstations/workstation.yml
when: hostname in ['mennos-laptop', 'mennos-desktop']
- name: Include server tasks
ansible.builtin.import_tasks: tasks/servers/server.yml
when: hostname in ['mennos-server', 'homeserver-pc', 'mennos-vm']