Commit c7183d54 authored by Francois Le Corre's avatar Francois Le Corre Committed by Thomas Gambier

ubuntu 20.04 and ansible file cleanup

parent 0c62baab
This diff is collapsed.
d-i preseed/include string ../preseed-ubuntu.cfg
d-i preseed/early_command string \
mkdir -p /usr/lib/post-base-installer.d && \
echo "sed -i -e 's/^in-target.*tasksel.*/#\\0/' /var/lib/dpkg/info/pkgsel.postinst" > /usr/lib/post-base-installer.d/90skip-tasksel && \
chmod +x /usr/lib/post-base-installer.d/90skip-tasksel
d-i preseed/late_command string \
echo 'Defaults:slapos !requiretty' > /target/etc/sudoers.d/slapos; \
echo 'slapos ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/slapos; \
chmod 440 /target/etc/sudoers.d/slapos ; \
ln -sf /dev/null /target/etc/systemd/network/99-default.link; \
in-target update-initramfs -u
{
"variables": {
"user": "slapos",
"password": "slapos",
"domain": "",
"disk_size": "20",
"name": "image",
"custom_script": "scripts/empty.sh"
},
"builders":
[
{
"name": "ubuntu-20.04-server-{{ user `disk_size`}}G-{{ user `name`}}",
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}000",
"headless": true,
"iso_checksum": "9d2b54506f8f9fdad6b72e45aff0f0de",
"iso_url": "http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04-legacy-server-amd64.iso",
"iso_checksum_type": "md5",
"http_directory": "http",
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "1800s",
"shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
"boot_wait": "2s",
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz ",
"initrd=/install/initrd.gz ",
"auto=true ",
"debconf/priority=critical ",
"keyboard-configuration/modelcode=pc105 keyboard-configuration/layout=FR ",
"keyboard-configuration/variant=FR console-setup/ask_detect=false ",
"net.ifnames=0 ",
"hostname={{ .Name }} ",
"passwd/user-fullname={{user `user`}} ",
"passwd/user-password-again={{user `password`}} ",
"passwd/user-password={{user `password`}} ",
"passwd/username={{user `user`}} ",
"noapic ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-ubuntu20.04.cfg ",
"-- <enter>"
]
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"scripts/update-ubuntu.sh",
"scripts/grub-ubuntu.sh",
"{{ user `custom_script` }}"
]
}
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment