two-images/packer/scripts/two.sh
GnomeZworc fe401b9a12
Some checks failed
Tests / check (push) Failing after 39s
two-images: construction reproductible de rocky10 et debian13 par Packer, test de démarrage syonad/two#53
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-10-24 13:53:56 +02:00

22 lines
648 B
Bash

#!/usr/bin/env bash
set -euo pipefail
cat > /mnt/etc/cloud/cloud.cfg.d/99_metadata.cfg <<'EOF'
datasource_list: [ NoCloud ]
datasource:
NoCloud:
seedfrom: 'http://169.254.169.254:80/'
timeout: 5
max_wait: 10
EOF
cat > /mnt/etc/cloud/cloud.cfg.d/98_network_updates.cfg <<'EOF'
updates:
network:
when: [boot-new-instance, boot, boot-legacy]
EOF
cat > /mnt/etc/udev/rules.d/90-two-xvd.rules <<'EOF'
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL_SHORT}=="xvd[a-z]", SYMLINK+="$env{ID_SERIAL_SHORT}"
SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL_SHORT}=="xvd[a-z]", SYMLINK+="$env{ID_SERIAL_SHORT}%n"
EOF