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