Shell tasks are skipped in check mode by default, leaving op_item.stdout empty and breaking from_json in the set_fact. The op item get calls are read-only, so mark them check_mode: no so dry runs reflect reality.