Run script sql on ansible

Hey all,

I have a database SQL Server and i must run some script .sql on this database with ansible.

I would like know if possible to run script .sql with ansible on database SQL Server ?

Thanks for your help !! :slight_smile:

Thank you guy !! :wink:

Regards,

Hey,

Someone can help me please !! :slight_smile:

thanks community ansible !! ^^

Regards,

Generally, you can do with Ansible everything you can do with CLI on your platform.
If you mean MS SQL server on Windows, you can:

  1. use win_copy to copy script.sql from Ansible host to Windows machine
  2. use win_shell: Invoke-SQLCmd -InputFile script.sql.
    Thank you,
  • Igor

пн, 13 мая 2019 г. в 18:16, Ryad karkar <ryad9200000@gmail.com>:

Hey Igor,

Thanks very much for your answer !! :wink:

Thank you very much for your help !! ^^

Regards,