You could use the command module and run an mysql query.
- name: Run a playbook
command: mysql -u <user> -p<passwd> --silent --skip-column-names
--execute="SELECT <column> FROM <table>"
register: result
Then you can use the variable result.stdout and/or result.stdout_lines
to get the result.
(I don't recommend using -p<passwd>, use a option file instead, but
easier to show a -p on the command line)
--
Kai Stian Olstad