Put everything back in site.yml again
Originally, I had broken out the other site_*.yml files in an attempt to organize the individual portions of site.yml out, as it was growing long. But now I have a solution to its length and its consistency that doesn't involve using multiple playbooks, so I may as well merge everything back in again.
This commit is contained in:
parent
f0646fb946
commit
d8fe08f879
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- import_playbook: local_dns.yml
|
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
# Main playbooks for machines across my environments
|
||||
# Does not include supplementary management configuration
|
||||
# Home configuration
|
||||
- import_playbook: home_db.yml
|
||||
- import_playbook: home_fs.yml
|
||||
- import_playbook: home_app.yml
|
||||
- import_playbook: home_game.yml
|
||||
- import_playbook: home_media.yml
|
||||
- import_playbook: home_automation.yml
|
||||
- import_playbook: home_bastion.yml
|
||||
# Production configuration
|
||||
- import_playbook: prod_db.yml
|
||||
- import_playbook: prod_web.yml
|
||||
- import_playbook: prod_com.yml
|
||||
- import_playbook: prod_game.yml
|
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
# Preambulatory system configuration
|
||||
# It's implicit that configuration here MUST preceed site_main.yml
|
||||
- import_playbook: all.yml
|
||||
# Device type configuration
|
||||
- import_playbook: "{{ item }}"
|
||||
loop: "{{ lookup('fileglob' 'device_types_*.yml') }}"
|
||||
# Platform configuration
|
||||
- import_playbook: "{{ item }}"
|
||||
loop: "{{ lookup('fileglob' 'platforms_*.yml') }}"
|
||||
# Manufacturer configuration
|
||||
- import_playbook: "{{ item }}"
|
||||
loop: "{{ lookup('fileglob' 'manufacturers_*.yml') }}"
|
||||
# Tags for fundamental services
|
||||
- import_playbook: "{{ item }}"
|
||||
loop: "{{ lookup('fileglob' 'tags_.yml') }}"
|
||||
# Role (in the Netbox sense) configuration
|
||||
- import_playbook: "{{ item }}"
|
||||
loop: "{{ lookup('fileglob' 'device_roles_*.yml') }}"
|
31
site.yml
31
site.yml
@ -1,11 +1,26 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
# Configuration that happens local to the Ansible controller
|
||||
- import_playbook: playbooks/site_local.yml
|
||||
# Preambulatory system configuration
|
||||
- import_playbook: playbooks/site_pre.yml
|
||||
# Main environment configuration
|
||||
- import_playbook: playbooks/site_main.yml
|
||||
# Post-play housekeeping and reboots
|
||||
- import_playbook: playbooks/site_post.yml
|
||||
# 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
|
||||
- import_playbook: cleanup.yml
|
||||
|
Loading…
Reference in New Issue
Block a user