ansible/site.yml

28 lines
1.1 KiB
YAML
Raw Normal View History

2020-10-17 00:21:57 -05:00
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
2020-10-17 01:00:06 -05:00
---
# 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