I’ve created a script to install SQL Server silently. I’m using Ansible to push the files to my machine and trying to run the .ps1 script but none of the modules I’ve tried have successfully called the script.
Ive tried: ansible machines -m win_psexec -a “command=‘Powershell c:\temp\sql-setup.ps1’”
It says:
10.0.0.5 | SUCCESS => {
“changed”: true,
“delta”: “0:00:02.790980”,
“end”: “2017-12-19 12:34:07.536547”,
“failed”: false,
“psexec_command”: “psexec.exe -accepteula Powershell c:\temp\sql-setup.ps1”,
“rc”: 0,
“start”: “2017-12-19 12:34:04.745567”,
“stderr”: “Powershell exited with error code 0.\r\n”,
“stderr_lines”: [
“Powershell exited with error code 0.”
],
“stdout”: “\r\nPsExec v2.2 - Execute processes remotely\r\nCopyright (C) 2001-2016 Mark Russinovich\r\nSysinternals - www.sysinternals.com\r\n\r\n”,
“stdout_lines”: [
“”,
“PsExec v2.2 - Execute processes remotely”,
“Copyright (C) 2001-2016 Mark Russinovich”,
“Sysinternals - www.sysinternals.com”,
“”
]
}
but nothing happened on the actual machine.
I tried script / win_command / win_shell
Is this possible at all?