mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-27 12:19:33 +01:00
5c1ed37ff5
* Avoid adding SSH authorized key for user "core" during the disk install, so that terraform apply cannot SSH until post-install
43 lines
1.1 KiB
Cheetah
43 lines
1.1 KiB
Cheetah
---
|
|
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
|
|
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
|
|
coreos-install \
|
|
-d ${install_disk} \
|
|
-C ${container_linux_channel} \
|
|
-V ${container_linux_version} \
|
|
-o "${container_linux_oem}" \
|
|
${baseurl_flag} \
|
|
-i ignition.json
|
|
udevadm settle
|
|
systemctl reboot
|
|
passwd:
|
|
users:
|
|
# Avoid using standard name "core" so terraform apply cannot SSH until post-install.
|
|
- name: debug
|
|
create:
|
|
groups:
|
|
- sudo
|
|
- docker
|
|
ssh_authorized_keys:
|
|
- {{.ssh_authorized_key}}
|