diff --git a/CLAUDE.md b/CLAUDE.md index f8e7fd1..8f6684d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,11 +16,12 @@ This project demonstrates enterprise-grade automation for the complete lifecycle - **Automation Engine**: Ansible Core 2.15+ - **Platform**: Ansible Automation Platform 2.4+ -- **Hypervisor**: Microsoft Hyper-V (Windows Server 2019/2022) +- **Hypervisor**: Microsoft Hyper-V (Windows Server 2019/2022) - hyperv1.lan.toal.ca - **Guest OS**: Windows Server 2019/2022 - **CMDB**: ServiceNow ITSM - **Version Control**: Git (GitOps workflow) - **Authentication**: Active Directory / Kerberos +- **Inventory**: ToalLab standard inventory (/home/ptoal/Dev/inventories/toallab-inventory) ### Connectivity Model @@ -49,17 +50,17 @@ ServiceNow CMDB ├── ansible.cfg # Ansible configuration with Windows/WinRM defaults ├── collections/ │ └── requirements.yml # Required Ansible collections -├── inventory/ -│ ├── production/ -│ │ └── hosts.yml # Production inventory +├── inventory/ # DEPRECATED: Using toallab-inventory +│ ├── production/ # Legacy - for reference only +│ │ └── hosts.yml │ └── staging/ │ └── hosts.yml # Staging inventory (future) -├── group_vars/ -│ ├── all.yml # Global variables -│ ├── hyperv_hosts.yml # Hyper-V host configuration -│ ├── windows_servers.yml # Windows Server defaults -│ └── web_servers.yml # IIS/web server configuration -├── host_vars/ # Host-specific variables (future) +├── group_vars/ # DEPRECATED: Moved to toallab-inventory +│ ├── all.yml # Legacy - for reference only +│ ├── hyperv_hosts.yml +│ ├── windows_servers.yml +│ └── web_servers.yml +├── host_vars/ # DEPRECATED: Moved to toallab-inventory ├── playbooks/ │ ├── provision-vm.yml # VM provisioning workflow │ ├── patch-vms.yml # Windows Update automation @@ -158,12 +159,30 @@ winrm set winrm/config/service '@{AllowUnencrypted="false"}' 5. Implement check mode support 6. Test in staging environment first +### Inventory Configuration + +This project uses the ToalLab standard inventory located at `/home/ptoal/Dev/inventories/toallab-inventory`. + +**Inventory Groups:** +- `hyperv` - Hyper-V hosts (hyperv1.lan.toal.ca) +- `windows_servers` - All Windows Server VMs + - `web_servers` - IIS/web servers + - `app_servers` - Application servers + - `db_servers` - Database servers + +**Group Variables:** +- `/home/ptoal/Dev/inventories/toallab-inventory/group_vars/hyperv/vars.yml` - Hyper-V defaults +- `/home/ptoal/Dev/inventories/toallab-inventory/group_vars/windows_servers/vars.yml` - Windows defaults + +**Host Variables:** +- `/home/ptoal/Dev/inventories/toallab-inventory/host_vars/hyperv1.lan.toal.ca/vars.yml` - Hypervisor config + ### Variable Precedence Follow this hierarchy (least to most specific): -1. `group_vars/all.yml` - Global defaults -2. `group_vars/.yml` - Group-specific -3. `host_vars/.yml` - Host-specific +1. `group_vars/all.yml` - Global defaults (in toallab-inventory) +2. `group_vars/.yml` - Group-specific (in toallab-inventory) +3. `host_vars/.yml` - Host-specific (in toallab-inventory) 4. Playbook `vars:` - Playbook overrides 5. Extra vars (`-e`) - Runtime overrides diff --git a/README.md b/README.md index e28ad7e..23247c5 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,6 @@ ansible-playbook playbooks/install-iis.yml --limit web_servers ``` . ├── ansible.cfg # Ansible configuration -├── inventory/ # Inventory files -│ ├── production/ -│ └── staging/ ├── playbooks/ # Playbooks by use case │ ├── provision-vm.yml │ ├── patch-vms.yml diff --git a/ansible.cfg b/ansible.cfg index c87ba5f..bc900ca 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,5 @@ [defaults] -inventory = inventory/production +inventory = /home/ptoal/Dev/inventories/toallab-inventory host_key_checking = False retry_files_enabled = False roles_path = roles