Bestand aus ~/ansible-schule uebernehmen (Push-Setup, Stand Feb 2026)
Playbooks, Inventory, update-ips.sh, first-boot-setup.sh und Doku unveraendert aus dem alten git-losen Ordner uebernommen. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
110
ANLEITUNG_NACH_KLONEN.md
Normal file
110
ANLEITUNG_NACH_KLONEN.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# Anleitung: Nach dem Klonen
|
||||
|
||||
Diese Anleitung gilt NACHDEM du:
|
||||
- Das Image mit Clonezilla aufgespielt hast
|
||||
- Das First-Boot-Script ausgefuehrt hast (`sudo ~/ansible-schule/files/first-boot-setup.sh laptopXX`)
|
||||
|
||||
---
|
||||
|
||||
## Auf dem Controller (laptop03)
|
||||
|
||||
### Schritt 1: IPs aktualisieren
|
||||
|
||||
```bash
|
||||
cd ~/ansible-schule
|
||||
./update-ips.sh
|
||||
```
|
||||
|
||||
Das Script findet automatisch alle eingeschalteten Laptops im Netzwerk und traegt ihre IPs in die inventory.yml ein.
|
||||
|
||||
**Erwartete Ausgabe:**
|
||||
```
|
||||
=== IP-Adressen aktualisieren ===
|
||||
|
||||
laptop01: 192.168.x.x
|
||||
laptop02: nicht erreichbar
|
||||
laptop03: 192.168.x.x
|
||||
...
|
||||
|
||||
=== Fertig ===
|
||||
Aktualisiert: 5
|
||||
Nicht erreichbar: 11
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Schritt 2: Verbindung testen
|
||||
|
||||
```bash
|
||||
ansible all -m ping
|
||||
```
|
||||
|
||||
**Erfolg sieht so aus:**
|
||||
```
|
||||
laptop03 | SUCCESS => { "ping": "pong" }
|
||||
laptop10 | SUCCESS => { "ping": "pong" }
|
||||
```
|
||||
|
||||
**Fehler ignorieren** fuer Laptops die nicht eingeschaltet sind - das ist normal.
|
||||
|
||||
---
|
||||
|
||||
### Schritt 3: Updates auf alle erreichbaren Laptops
|
||||
|
||||
```bash
|
||||
ansible-playbook playbooks/update.yml
|
||||
```
|
||||
|
||||
Oder nur auf bestimmte:
|
||||
|
||||
```bash
|
||||
ansible-playbook playbooks/update.yml --limit laptop10,laptop11
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Schnellreferenz
|
||||
|
||||
| Was | Befehl |
|
||||
|-----|--------|
|
||||
| IPs aktualisieren | `./update-ips.sh` |
|
||||
| Alle pingen | `ansible all -m ping` |
|
||||
| System-Update | `ansible-playbook playbooks/update.yml` |
|
||||
| Software installieren | `ansible-playbook playbooks/install-software.yml -e "packages=['vlc']"` |
|
||||
| Neustarten | `ansible-playbook playbooks/reboot.yml` |
|
||||
| Nur bestimmte Rechner | `--limit laptop05,laptop06` |
|
||||
|
||||
---
|
||||
|
||||
## Problemloesungen
|
||||
|
||||
### "nicht erreichbar" bei update-ips.sh
|
||||
|
||||
- Ist der Laptop eingeschaltet?
|
||||
- Ist er im gleichen Netzwerk (WLAN/Kabel)?
|
||||
- Wurde das First-Boot-Script ausgefuehrt?
|
||||
|
||||
### SSH-Fehler "Host key verification failed"
|
||||
|
||||
```bash
|
||||
ssh-keygen -R 192.168.x.x
|
||||
```
|
||||
|
||||
(Die IP durch die tatsaechliche IP ersetzen)
|
||||
|
||||
### Ansible findet inventory nicht
|
||||
|
||||
Immer aus dem richtigen Verzeichnis ausfuehren:
|
||||
|
||||
```bash
|
||||
cd ~/ansible-schule
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Checkliste neuer Laptop
|
||||
|
||||
- [ ] Image mit Clonezilla aufgespielt
|
||||
- [ ] First-Boot-Script: `sudo ~/ansible-schule/files/first-boot-setup.sh laptopXX`
|
||||
- [ ] Auf Controller: `./update-ips.sh`
|
||||
- [ ] Testen: `ansible laptopXX -m ping`
|
||||
Reference in New Issue
Block a user