david_igou.armbian.disk_image role – Stream a defined image to a defined block device

Note

This role is part of the david_igou.armbian collection (version 0.0.5-alpha).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install david_igou.armbian.

To use it in a playbook, specify: david_igou.armbian.disk_image.

Entry point main – Stream a defined image to a defined block device

Synopsis

  • Accepts an http(s):// URL or an absolute path to an .img.xz or .img, and a target block device (e.g. /dev/mmcblk0). Streams the image to the device via curl/xz -dc/dd with set -o pipefail. Refuses if the target device, or any of its partitions, currently backs a mounted filesystem.

  • Runs on the board (or any host with root) that owns the target device. Caller is responsible for ensuring the running rootfs is NOT on the target device — the mount-aware guard enforces this. Always writes; no idempotency cache.

Parameters

Parameter

Comments

disk_image_dd_bs

string

dd block size. Default tuned for SD/NVMe throughput.

Default: "4M"

disk_image_source

string / required

Either an http(s):// URL or an absolute path on the running host. Auto-dispatch by extension: .img.xz → xz -dc | dd; .img → dd direct. Mismatched extension is a hard failure (no content sniffing).

disk_image_target_device

path / required

Absolute path to a block device (e.g. /dev/mmcblk0, /dev/nvme0n1). Must be a real block device (S_ISBLK), not a partition node.