Don't parse `rpm-ostree status` output, it's not meant for that. Use
`--json` output instead.
While we're here, fix an obsolete reference to Ansible.
Related: https://github.com/coreos/rpm-ostree/pull/3938
newcommit=$(ostree rev-parse staged-deploy)
ostree admin upgrade --stage >out.txt
test -f /run/ostree/staged-deployment
- # Debating bouncing back out to Ansible for this
- firstdeploycommit=$(rpm-ostree status |grep 'Commit:' |head -1|sed -e 's,^ *Commit: *,,')
+ firstdeploycommit=$(rpm-ostree status --json | jq -r .deployments[0].checksum)
assert_streq "${firstdeploycommit}" "${newcommit}"
# Cleanup
rpm-ostree cleanup -rp