Hello,
I have create module mssql_query in my repertory library/mssql_query.py for execut commande ligne on my database MSSQL
with this website : https://github.com/melmorabity/ansible-mssql-query/blob/master/mssql_query.py
My task is :
- local_action:
module: mssql_query
login_host: my_name_host
login_user: my_user
port: 1433
login_password: my_password
query: SELECT * FROM dbo.my_table
db: my_database
autocommit: true
tds_version: 7.1
as_dict: false
delegate_to: localhost (or delegate_to: mydatabase)
but the error is :
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: connect() got an unexpected keyword argument ‘port’
fatal: [my_name_host → localhost]: FAILED! => {“changed”: false, “module_stderr”: “Traceback (most recent call last):\n File "", line 113, in \n File "", line 105, in _ansiballz_main\n File "", line 48, in invoke_module\n File "/tmp/ansible_mssql_query_payload_hXTFhK/main.py", line 155, in \n File "/tmp/ansible_mssql_query_payload_hXTFhK/main.py", line 143, in main\nTypeError: connect() got an unexpected keyword argument ‘port’\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}
Someone have any idea please ??!!
I need a expert ansible for my problem please !!
Best Regards,
Karther