Skipped command tasks return stdout: "" rather than being undefined, so
"src: motd/{{ ...stdout }}" collapsed to "motd/" - a directory - and copy
switched to recursive mode, failing with "/etc/motd/<file>: Not a
directory". The empty boot-target stdout likewise never equals
"multi-user.target", so "Set boot mode to CLI" always reported changed.
Run the three read-only commands in check mode. They are all
changed_when: false already, so this is safe.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5.0 KiB
5.0 KiB