The default port number for both MySQL and MariaDB is 3306, but you can change it as required with changing the port variable in the /etc/mysql/mariadb.conf.d/50-server.cnf file
Ansible works on the push mechanism.
Yes, it is possible to keep secret data in your Ansible content using a vault in the playbook