ansible/site.yml

28 lines
1.1 KiB
YAML
Executable File

#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# Local configuration goes first
- import_playbook: "{{ item }}"
loop: "{{ lookup('fileglob' 'local_*.yml') }}"
# Then we run against all hosts, performing foundational tasks
- import_playbook: all.yml
# Then we narrow things down to device-specific configuration
- import_playbook: "{{ item }}"
loop: "{{ lookup('fileglob' 'device_types_*.yml') }}"
- import_playbook: "{{ item }}"
loop: "{{ lookup('fileglob' 'platforms_*.yml') }}"
- import_playbook: "{{ item }}"
loop: "{{ lookup('fileglob' 'manufacturers_*.yml') }}"
- import_playbook: "{{ item }}"
loop: "{{ lookup('fileglob' 'tags_.yml') }}"
- import_playbook: "{{ item }}"
loop: "{{ lookup('fileglob' 'device_roles_*.yml') }}"
# And finally we configure the core services of the machine
- import_playbook: "{{ item }}"
loop: "{{ lookup('fileglob' 'home_*.yml') }}"
- import_playbook: "{{ item }}"
loop: "{{ lookup('fileglob' 'prod_*.yml') }}"
# Once that's all done, we clean up
# NOTE: This little cleanup playbook rolls reboots!
- import_playbook: cleanup.yml