diff options
author | heqnx <root@heqnx.com> | 2025-06-26 11:21:21 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-06-26 11:21:21 +0300 |
commit | 895042a3161b29832b398067a64d6187c8830cc4 (patch) | |
tree | 1b6f1dbebdc5eca190ec9bbf6fbc5251ad4aead9 /packer/answer_files/user-data | |
parent | b8041662a4e6cd52cbb95e8f7f84c4246f5d24ca (diff) | |
download | ansible-pve-host-895042a3161b29832b398067a64d6187c8830cc4.tar.gz ansible-pve-host-895042a3161b29832b398067a64d6187c8830cc4.zip |
ignoring packer .lock files
Diffstat (limited to 'packer/answer_files/user-data')
-rw-r--r-- | packer/answer_files/user-data | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/packer/answer_files/user-data b/packer/answer_files/user-data new file mode 100644 index 0000000..5e02023 --- /dev/null +++ b/packer/answer_files/user-data @@ -0,0 +1,39 @@ +#cloud-config +autoinstall: + version: 1 + early-commands: + - systemctl stop ssh + locale: en_US.UTF-8 + keyboard: + layout: us + variant: "" + storage: + layout: + name: lvm + identity: + hostname: ubuntu + username: ubuntu + password: "$6$R9142dko7PYoTTJP$o19g/Av.dsI/fVEF4SJ8v0XqRcG6YdhQRGYLFrW2X4BG4gO2z3dWyOwio3pRrFXBMHNZHJlZPUp9yvR7elRKs0" + ssh: + allow-pw: true + install-server: true + user-data: + disable_root: false + runcmd: + - 'echo "root:root" | chpasswd' + late-commands: + - rm -rf /target/etc/apt/preferences.d/90curtin.pref + - curtin in-target --target=/target -- lvextend --extents +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv + - curtin in-target --target=/target -- resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv + - echo 'PermitRootLogin yes' >> /target/etc/ssh/sshd_config + - chmod -x /target/etc/update-motd.d/* + - | + cat << EOF > /target/etc/netplan/99-dhcp-any-interface.yaml + network: + ethernets: + any_interface: + match: + name: "e*" + dhcp4: true + version: 2 + EOF |