On 20/12/2021 18:08, Tiago Oliveira wrote:
Hi, I am trying to use an sql script to create a database in mariadb on a openbsd server with ansible. My playbook first create the script with the name of the database to create and then uses expect to give the command "mysql -u root -p < script.sql" and then responses the password with "" because theres no password. I try to use the script created by ansible and it works. I try to use the same command that ansible is using and it works. I took the "< script.sql" part to see if the problem was the password, and ansible enter in mysql without returning any error.When i use the playbook with "< script.sql" in command, ansible returns the error of non-zero return code returning rc=1. Anyone know how to solve it??
Maybe you start with sharing your playbook and the contents of the script!?
The modules mysql_user and mysql_db should be able to create your database with
the associated users.
Regards
Racke
I've tried also the community.mysql module, but it didnt worked also to create the first database. Best Regards, Tiago Oliveira -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/44af35a2-29db-4847-a9fe-a1f27a0dc1ebn%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/44af35a2-29db-4847-a9fe-a1f27a0dc1ebn%40googlegroups.com?utm_medium=email&utm_source=footer>.
-- Ecommerce and Linux consulting + Perl and web application programming. Debian and Sympa administration. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/365a5e70-e323-2f9c-263d-58a0c5c616e3%40linuxia.de.
OpenPGP_signature
Description: OpenPGP digital signature
