yum history

So, in bash I can get some info from ‘yum history’.

Get the last ‘yum update’:

yum history | grep Update | head -1

Get the very last call to yum:

yum history | awk ‘/^----/{ n=NR+1 }n && n<=NR && NR<(n+1){ print }’

How do I parse that with an ansible regex?