
This patchset allows users to select the context in which certain osconfig tasks run, rather than a hard-coded assumption. It also adds scripts directories which are run in these contexts. Change-Id: I695c3078b4d883a506c243bc715a509f6844c126
57 lines
1.8 KiB
YAML
57 lines
1.8 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
|
|
- 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 base systemd"
|
|
include_tasks: systemd.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: "finalise rootfs"
|
|
include_tasks: finalise-rootfs.yaml
|