manifest.yml 1.85 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
packer:
  description: "Base template for ILL"

  variables: {}

  builders:
    - name: qemu
      type: qemu
      format: qcow2
      iso_checksum_type: sha256
11 12 13 14
      iso_checksum_url: "{{ ubuntu_mirror }}/{{ ubuntu_codename }}-updates/main/installer-amd64/current/images/SHA256SUMS"
      iso_url: "{{ ubuntu_mirror }}/{{ ubuntu_codename }}-updates/main/installer-amd64/current/images/netboot/mini.iso"
      ssh_username: "{{ ssh_username }}"
      ssh_password: "{{ root_password }}"
Eric Pellegrini's avatar
Eric Pellegrini committed
15
      ssh_timeout: 60m
16
      accelerator: kvm
17
      headless: "{{ headless }}"
18 19 20
      shutdown_command: "shutdown -P now"
      qemuargs:
        - - "-m"
21
          - "{{ memory }}"
22
        - - "-smp"
23
          - "{{ cpus }}"
24 25 26
      boot_wait: 5s
      boot_command:
        - "<tab> "
27
        - "preseed/url=http://{% raw %}{{ .HTTPIP }}:{{ .HTTPPort }}{% endraw %}/{{ preseed_file_name }} "
28 29
        - "auto-install/enable=true "
        - "net.ifnames=0 "
30 31 32 33 34 35 36 37 38 39 40
        - "netcfg/get_hostname={{ vm_name }} "
        - "netcfg/get_gateway={{ gateway}} "
        - "netcfg/get_nameservers={{ dns_servers }} "
        - "netcfg/hostname={{ vm_name }} "
        - "mirror/http/proxy={{ proxy}} "
        - "passwd/user-fullname={{ user }} "
        - "passwd/username={{ user_fullname }} "
        - "passwd/user-password= {{ user_password }} "
        - "passwd/user-password-again= {{ user_password }} "
        - "passwd/root-password={{ root_password }} "
        - "passwd/root-password-again={{ root_password }} "
41
        - "no_proxy={% raw %}{{ .HTTPIP }}{% endraw %},{{ no_proxy }} "
42
        - "<enter>"
43
      disk_size: "{{ disk_size }}"
44 45 46 47
      http_directory: "http"

  provisioners:
    - type: file
48
      source: "system/etc/apt/sources.list_{{ ubuntu_codename }}"
49 50 51 52 53
      destination: "/etc/apt/sources.list"

    - type: file
      source: system/etc/environment
      destination: /etc/environment