diff --git a/content/lib/cmd_build.sh b/content/lib/cmd_build.sh index 006f8b1..33e18d5 100644 --- a/content/lib/cmd_build.sh +++ b/content/lib/cmd_build.sh @@ -97,7 +97,7 @@ _start_lab() { else backend_launch dc01 run || { fail "dc01 did not start"; return 1; } fi - _wait_winrm "$LAB_DC_IP" 240 || warn "dc01 did not answer WinRM in time" + backend_ready dc01 240 || warn "dc01 did not answer in time" fi for name in "${VM_NAMES[@]}"; do diff --git a/content/lib/cmd_web.sh b/content/lib/cmd_web.sh index cb14610..0f17dd7 100644 --- a/content/lib/cmd_web.sh +++ b/content/lib/cmd_web.sh @@ -57,8 +57,8 @@ _web_sync() { -c "prompt OFF; recurse ON; mkdir norbourg; mkdir norbourg\\site; lcd $site; cd norbourg\\site; mput *" \ >/dev/null 2>&1 || true - _wait_winrm "$ip" 120 || die "fs01 did not answer WinRM" - _winrm_retry "$ip" ps "Copy-Item -Path 'C:\\norbourg\\site\\*' -Destination 'C:\\inetpub\\wwwroot' -Recurse -Force; Test-Path 'C:\\inetpub\\wwwroot\\index.html'" \ + backend_ready fs01 300 || die "fs01 did not answer" + backend_ps fs01 "Copy-Item -Path 'C:\\norbourg\\site\\*' -Destination 'C:\\inetpub\\wwwroot' -Recurse -Force; Test-Path 'C:\\inetpub\\wwwroot\\index.html'" \ | grep -qi true || die "copy failed on fs01" ok "site published to C:\\inetpub\\wwwroot" diff --git a/content/lib/common.sh b/content/lib/common.sh index ffb6067..62aa8ad 100644 --- a/content/lib/common.sh +++ b/content/lib/common.sh @@ -80,6 +80,7 @@ load_config() { : "${LAB_BRIDGE:?no lab bridge configured (BRIDGE or PVE_BRIDGE)}" MIN_FREE_GB=${MIN_FREE_GB:-20} SEED_DIR=${SEED_DIR:-$LAB_ROOT/seeds} + LAB_USER=${LAB_USER:-Administrator} DISK_FILL_RATIO=${DISK_FILL_RATIO:-60} ISO_BUDGET_GB=${ISO_BUDGET_GB:-8} diff --git a/content/scripts/prepare_site.py b/content/scripts/prepare_site.py index b8365aa..19fe7cf 100644 --- a/content/scripts/prepare_site.py +++ b/content/scripts/prepare_site.py @@ -48,6 +48,7 @@ HITCOUNTER_ANY = re.compile(r"""["']/webstat/webstat\.exe["']""", re.IGNORECASE) HOME_HINT = ( "\n\n" + "\n" ) LINK_ATTR = re.compile(r"""(?:href|src)\s*=\s*["']([^"']+)["']""", re.IGNORECASE) diff --git a/content/web/seed/public/_archives/1985/README.txt b/content/web/seed/public/_archives/1985/README.txt new file mode 100644 index 0000000..a22e1d1 --- /dev/null +++ b/content/web/seed/public/_archives/1985/README.txt @@ -0,0 +1,14 @@ +Archives du service des TI - 1985 +================================= + +Le clip est sur le portable de l'instructeur. +Si vous etes rendus ici, vous ecoutez de la bonne musique. + + The Outfield - Your Love (1985) + https://www.youtube.com/watch?v=4N1iwQxiHrs + +Ce dossier aurait du etre vide depuis la migration de 2002. +Personne n'a eu le coeur de le supprimer. + +-- +(indice : le domaine se souvient aussi) diff --git a/content/web/seed/public/_archives/1985/Your Love.url b/content/web/seed/public/_archives/1985/Your Love.url new file mode 100644 index 0000000..ddb1f6b --- /dev/null +++ b/content/web/seed/public/_archives/1985/Your Love.url @@ -0,0 +1,3 @@ +[InternetShortcut] +URL=https://www.youtube.com/watch?v=4N1iwQxiHrs +IconIndex=0 diff --git a/content/windows/roles/dc01-post.ps1 b/content/windows/roles/dc01-post.ps1 index e4e4a6f..7e06356 100644 --- a/content/windows/roles/dc01-post.ps1 +++ b/content/windows/roles/dc01-post.ps1 @@ -103,6 +103,15 @@ try { Write-LabLog 'dc01: www A record already present' } + # Easter egg: discoverable with nslookup -type=TXT yourlove.norbourg.lab + try { + Add-DnsServerResourceRecord -ZoneName '@@DOMAIN@@' -Name 'yourlove' -Txt ` + -DescriptiveText 'The Outfield - Your Love (1985)' -ErrorAction Stop + Write-LabLog 'dc01: yourlove TXT record created' + } catch { + Write-LabLog 'dc01: yourlove TXT record already present' + } + # ------------------------------------------------------------ flags $flagDir = 'C:\flag' New-Item -ItemType Directory -Force -Path $flagDir | Out-Null