From b33d9f8af07f12b899e0b925ee82ad17e93ccbfb Mon Sep 17 00:00:00 2001 From: Stephan Reinwald Date: Tue, 21 Jan 2025 14:20:46 +0100 Subject: [PATCH] hello world --- autoconfig.yaml | 9 ++++----- files/hello_world.service | 11 +++++++++++ files/hello_world.sh | 4 ++++ 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 files/hello_world.service create mode 100644 files/hello_world.sh diff --git a/autoconfig.yaml b/autoconfig.yaml index 284aa81..bb6b527 100644 --- a/autoconfig.yaml +++ b/autoconfig.yaml @@ -32,11 +32,10 @@ autoinstall: shutdown: reboot late-commands: - curl -m 10 --retry 5 http://23.88.102.139:8000/ping/07bf78a8-67c5-4ffb-834d-e9dc660b162a - ansible: - install_method: pip - pull: - url: http://23.88.102.139/gitea/sre/ld-install.git - playbook_name: ld-install.yaml + - curtin in-target curl -o /target/etc/systemd/system/hello_world.service http://23.88.102.139/gitea/sre/ld-install/raw/branch/main/files/hello_world.service + - curtin in-target chmod +x /target/etc/systemd/system/hello_world.service + - curtin in-target curl -o /root/hello_world.sh http://23.88.102.139/gitea/sre/ld-install/raw/branch/main/files/hello_world.sh + - curtin in-target chmod +x /root/hello_world.sh user-data: hostname: ldhost chpasswd: diff --git a/files/hello_world.service b/files/hello_world.service new file mode 100644 index 0000000..ac07316 --- /dev/null +++ b/files/hello_world.service @@ -0,0 +1,11 @@ +# ld-install service +[Unit] +Description=logoDIDACT 4.0 Installer +After=network.target + +[Service] +Type=oneshot +ExecStart=/root/hello_world.sh + +[Install] +WantedBy=multi-user.target diff --git a/files/hello_world.sh b/files/hello_world.sh new file mode 100644 index 0000000..c599314 --- /dev/null +++ b/files/hello_world.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo 'hello world' +touch /root/it_worked