#cloud-config
autoinstall:
  interactive-sections:
    - identity
    - storage
    - network  
  version: 1
  package_update: true
  package_upgrade: true
  power_state:
    delay: "now"
    mode: reboot
    message: Install successful
    timeout: 30
    condition: true
  mirror:
    mirror: "http://fr.archive.ubuntu.com/ubuntu"
  apt:
    preserve_sources_list: false
    primary:
      - arches: [amd64]
        uri: "http://fr.archive.ubuntu.com/ubuntu"
  ssh:
    install-server: yes
  locale: fr_FR.UTF-8
  keyboard:
    layout: fr
  user-data:
    timezone: Europe/Paris
  packages:
    - curl
    - mc
    - git
    - tree
    - zip
    - nmap
    - htop
    - screen
    - vim
    - qemu-guest-agent
    - ntp
    - net-tools
    - apt-transport-https
    - slurm
    - iftop
    - iotop
    - dos2unix
    - dnsutils
    - nfs-common
    - cifs-utils
    - wget
  late-commands:
    
    # netplan - fix dns
    - netplan apply
    
    # Update OS
    - curtin in-target --target=/target -- apt update
    - curtin in-target --target=/target -- apt upgrade -y
