Anderson, Craig (ca846m) 7a99dea948 Properly handle machine-ids
/etc/machind-id needed to be removed from the image for cloud-init to
generate it, no simply blank.

/var/lib/dbus/machine-id needed to be symlinked to /etc/machine-id,
otherwise dbus was storing its ID into the generic image. Some NIC
drivers use this for generating unique MAC addresses, so duplicating
these IDs could cause duplicate MAC addressing.

Also correct spelling of "finalize".

Change-Id: Iaabd0730c4e6d2ae47e5ff1c25adc1b6eb65533b
2021-04-07 12:06:48 -07:00

66 lines
2.2 KiB
YAML

- name: "Including any user-defined vars"
include_vars:
file: main.yaml
name: user-vars
# Tasks run when building image-builder container
- name: "configure cloud-init"
include_tasks: cloud-init.yaml
when: run_context == default_run_context
- name: "configure modules"
include_tasks: modules.yaml
when: run_context == default_run_context
- name: "configure limits"
include_tasks: limits.yaml
when: run_context == default_run_context
- name: "configure sysctl"
include_tasks: sysctl.yaml
when: run_context == default_run_context
- name: "configure grub"
include_tasks: grub.yaml
when: run_context == default_run_context or run_context == qcow_run_context
- name: "configure kdump-tools"
include_tasks: kdump-tools.yaml
when: run_context == default_run_context
- name: "configure kubernetes"
include_tasks: kubernetes.yaml
when: run_context == default_run_context
- name: "configure locale"
include_tasks: locale.yaml
when: run_context == default_run_context
- name: "configure hostname and hosts"
include_tasks: hostname-hosts.yaml
when: run_context == default_run_context
- name: "configure banners"
include_tasks: banners.yaml
when: run_context == default_run_context
- name: "unattended upgrades"
include_tasks: unattended-upgrades.yaml
when: run_context == default_run_context
- name: "configure systemd-resolved"
include_tasks: systemd-resolved.yaml
when: run_context == default_run_context
- name: "configure base systemd"
include_tasks: systemd.yaml
when: run_context == default_run_context
- name: "fetch url resource"
include_tasks: fetch-from-url.yaml
when: run_context == default_run_context
# Context-dependent tasks
- name: "write user-provided files"
include_tasks: write-user-files.yaml
- name: "configure user-defined systemd"
include_tasks: systemd-user.yaml
- name: "run system-defined scripts for qcow"
include_tasks: runtime-system-scripts.yaml
when: run_context == qcow_run_context
- name: "run user-defined scripts"
include_tasks: user-scripts.yaml
- name: "configure file permissions"
include_tasks: file-permissions.yaml
# Context-independent cleanup tasks
- name: "finalize rootfs"
include_tasks: finalize-rootfs.yaml