reinstall/nocloud.yaml

27 lines
842 B
YAML
Raw Normal View History

2023-07-22 22:02:33 +08:00
#cloud-config
datasource_list: [NoCloud]
2023-08-07 23:28:02 +08:00
timezone: Asia/Shanghai
2023-07-22 22:02:33 +08:00
disable_root: false
ssh_pwauth: true
users:
- name: root
lock_passwd: false
chpasswd:
expire: false
# 20.04 arm 需要
list: |
root:123@@@
users:
- name: root
password: 123@@@
type: text
runcmd:
# arch 没有 /etc/ssh/sshd_config.d/ 文件夹
2023-09-10 22:23:04 +08:00
# opensuse tumbleweed 有 /etc/ssh/sshd_config.d/ 文件夹,但没有 /etc/ssh/sshd_config但有/usr/etc/ssh/sshd_config
- grep 'Include.*/etc/ssh/sshd_config.d' /etc/sshd_config && echo "PermitRootLogin yes" >/etc/ssh/sshd_config.d/01-permitrootlogin.conf || echo "PermitRootLogin yes" >>/etc/ssh/sshd_config
2023-07-22 22:02:33 +08:00
- systemctl restart sshd
2023-08-07 23:28:02 +08:00
# ubuntu 镜像运行 echo -e '\nDone' -e 会被显示出来
- echo >/dev/tty0
- echo Done >/dev/tty0
- touch /etc/cloud/cloud-init.disabled