Rewrite inventory to use standard
This commit is contained in:
45
CLAUDE.md
45
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/<group>.yml` - Group-specific
|
||||
3. `host_vars/<host>.yml` - Host-specific
|
||||
1. `group_vars/all.yml` - Global defaults (in toallab-inventory)
|
||||
2. `group_vars/<group>.yml` - Group-specific (in toallab-inventory)
|
||||
3. `host_vars/<host>.yml` - Host-specific (in toallab-inventory)
|
||||
4. Playbook `vars:` - Playbook overrides
|
||||
5. Extra vars (`-e`) - Runtime overrides
|
||||
|
||||
|
||||
Reference in New Issue
Block a user