On Wed, Apr 29, 2020 at 12:31:21PM -0700, Rafael Oliveira wrote:
> I'm sorry I don't know if I got your point, nevertheless let me break down
> my situation:
>
> I already have DB structure where those a lot of tables were created with
> German UMLAUT ЖДЭэжд.
>
> From time to time I have to run some scripts to maintain these tables, I'd
> like to automate this script execution so I created the following task:
>
>
> - name: Run script
> mssql_db:
> name: "{{ DB_NAME }}"
> login_host: "{{ DB_HOST }}"
> login_user: "{{ DB_USER }}"
> login_password: "{{ DB_PASS }}"
> state: import
> target: "{{ SCRIPT_PATH }}"
>
> The step before that is SVN Checkout, as you can see I'm running a script
> in the import state, how should I change my script, that's the point that I
> could not understand.
Every MySQL command that support charset like alter/create database you can add
charset=<> to it, check the MySQL documentation on how.
But if you do a "ansible-doc mysql_db" you'll see that it has an encoding option.
- encoding
Encoding mode to use, examples include `utf8' or `latin1_swedish_ci'
[Default: (null)]
After looking at the source code, this option has been there since before 2014
but the online documentation doesn't show it and several other options.
--
Kai Stian Olstad