The salt mdadm state is slightly broken until saltstack/salt#24952 becomes a release (not sure how to track that). In the mean time, I think I want this anyway:
gunzip -c /boot/initrd.img-3.13.0-52-generic \
| cpio --to-stdout -i etc/mdadm/mdadm.conf 2>/dev/null \
| egrep -q '^ARRAY'
This could be a state check, like so:
(gunzip -c /boot/initrd.img-3.13.0-52-generic \
| cpio --to-stdout -i etc/mdadm/mdadm.conf 2>/dev/null \
| shasum; shasum /etc/mdadm/mdadm.conf) \
| cut -d' ' -f1 | sort -u | wc -l
1 means they are the same, 2 means they are divergent.