-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigrate-to-new-structure.sh
More file actions
40 lines (34 loc) Β· 1.16 KB
/
migrate-to-new-structure.sh
File metadata and controls
40 lines (34 loc) Β· 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
set -e
echo "π Migrating to new Ansible collection structure..."
# Clean up old files
echo "π§Ή Cleaning up old files..."
rm -f ansible.cfg inventory.yml
rm -f setup-ansible-user.yml proxmox-maintenance.yml gather-facts.yml update-packages.yml
rm -f create_structure.py
# Move SSH config to proper location
if [[ -f ~/.ssh/config-proxmox ]]; then
echo "β
SSH config already in place"
else
echo "β οΈ Please ensure ~/.ssh/config-proxmox exists with proper 1Password integration"
fi
# Test new structure
echo "π§ͺ Testing new structure..."
cd ansible-infrastructure
if ansible all -m ping; then
echo "β
New structure working correctly!"
else
echo "β οΈ Check configuration in ansible-infrastructure/inventory/"
fi
echo ""
echo "π Migration completed!"
echo ""
echo "π New structure is ready at: ./ansible-infrastructure/"
echo ""
echo "π Quick start commands:"
echo " cd ansible-infrastructure"
echo " ansible all -m ping"
echo " ansible-playbook tests/validate-setup.yml"
echo " ansible-playbook playbooks/maintenance/hardware-assessment.yml"
echo ""
echo "π See ansible-infrastructure/README.md for complete documentation."