2017-07-25 08:16:34 +02:00
|
|
|
---
|
|
|
|
systemd:
|
|
|
|
units:
|
|
|
|
- name: installer.service
|
|
|
|
enable: true
|
|
|
|
contents: |
|
|
|
|
[Unit]
|
|
|
|
Requires=network-online.target
|
|
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
ExecStart=/opt/installer
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
2018-04-05 06:38:03 +02:00
|
|
|
# Avoid using the standard SSH port so terraform apply cannot SSH until
|
|
|
|
# post-install. But admins may SSH to debug disk install problems.
|
|
|
|
# After install, sshd will use port 22 and users/terraform can connect.
|
|
|
|
- name: sshd.socket
|
|
|
|
dropins:
|
|
|
|
- name: 10-sshd-port.conf
|
|
|
|
contents: |
|
|
|
|
[Socket]
|
|
|
|
ListenStream=
|
|
|
|
ListenStream=2222
|
2017-07-25 08:16:34 +02:00
|
|
|
storage:
|
|
|
|
files:
|
|
|
|
- path: /opt/installer
|
|
|
|
filesystem: root
|
|
|
|
mode: 0500
|
|
|
|
contents:
|
|
|
|
inline: |
|
|
|
|
#!/bin/bash -ex
|
|
|
|
curl --retry 10 "${ignition_endpoint}?{{.request.raw_query}}&os=installed" -o ignition.json
|
2018-05-17 08:30:48 +02:00
|
|
|
${os_flavor}-install \
|
2017-07-25 08:16:34 +02:00
|
|
|
-d ${install_disk} \
|
2018-05-17 07:37:37 +02:00
|
|
|
-C ${os_channel} \
|
|
|
|
-V ${os_version} \
|
2017-07-25 08:16:34 +02:00
|
|
|
-o "${container_linux_oem}" \
|
|
|
|
${baseurl_flag} \
|
|
|
|
-i ignition.json
|
|
|
|
udevadm settle
|
|
|
|
systemctl reboot
|
|
|
|
passwd:
|
|
|
|
users:
|
2018-04-05 06:38:03 +02:00
|
|
|
- name: core
|
2017-07-25 08:16:34 +02:00
|
|
|
ssh_authorized_keys:
|
2018-04-05 06:38:03 +02:00
|
|
|
- "${ssh_authorized_key}"
|