I am trying to create a DB with name like example.com_db
in mysql DB using ansible.
here is my code
mysql_db:
login_user: root
login_password: "{{ mysql_pass }}"
name: "{{ domain_name }}_db"
state: present
the error I am getting is this
quote An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
com_db"
' at line 1') quote fatal: [vubuntu1]: FAILED! => {"changed": false, "msg": "error creating database: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'.com_db\"
\' at line 1')"}
is there a way to create the Db using the module except shell module? I have tried using community.mysql.mysql_db
module but it gives same result.