UncleNUC Wiki

Second chance for NUCs

User Tools

Site Tools


lab:ansible_virtualbox_autoboot_linux:customize_user-data_for_ubuntu_unattended_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lab:ansible_virtualbox_autoboot_linux:customize_user-data_for_ubuntu_unattended_install [2024/01/15 21:13] – typo userlab:ansible_virtualbox_autoboot_linux:customize_user-data_for_ubuntu_unattended_install [2024/05/10 05:15] (current) – removed user
Line 1: Line 1:
-====== Customize user-data for Ubuntu Unattended Install ====== 
-A custom "user-data" file is required for an unattended installation of Ubuntu. We will create this template file for use in our Ansible playbook to [[Generate Custom Unattended Ubuntu Install ISO]]. 
  
-FIXME The file below is in development 
- 
-<file yaml user-data> 
-#cloud-config 
-autoinstall: 
-  version: 1 
-  storage: 
-    layout: 
-      name: lvm 
-      match: 
-        size: largest 
-  locale: en_US.UTF-8 
-  keyboard: 
-    layout: us 
-  identity: 
-    hostname: ubuntu-server 
-    username: user 
-    password: "$6$ryx4qBcSL3V1qKaU$UVKN5KO0gwjUqha0OQkGX8CL/Dbp3NCPo52vEvXO1/2s3NkFcvw540HPWc1g6/7UFEmYEbeRXFdttuguFsvj00" # VMware1! 
-  ssh: 
-    install-server: yes 
-    allow-pw: true 
-  apt: 
-    primary: 
-      - arches: [default] 
-        uri: http://us.archive.ubuntu.com/ubuntu/ 
-  packages: 
-    - build-essential 
-    - network-manager 
-    - dkms 
-    - emacs-nox 
-  package_update: true 
-  package_upgrade: true 
-  late-commands: 
-    - echo 'user ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu # Allow user to run sudo without password 
-    # Changing from networkd to NetworkManager 
-    # move existing config out of the way 
-    - find /target/etc/netplan/ -name "*.yaml" -exec sh -c 'mv "$1" "$1-orig"' _ {} \; 
-    # Create a new netplan and enable it 
-    - | 
-      cat <<EOF | sudo tee /target/etc/netplan/01-netcfg.yaml 
-      network: 
-        version: 2 
-        renderer: NetworkManager 
-      EOF 
-    - curtin in-target --target /target netplan generate 
-    - curtin in-target --target /target netplan apply 
-    - curtin in-target --target /target systemctl enable NetworkManager.service 
-</file> 
lab/ansible_virtualbox_autoboot_linux/customize_user-data_for_ubuntu_unattended_install.1705353199.txt.gz · Last modified: 2024/01/15 21:13 by user