cmd.run command getting stuck on windows minion..

37 views
Skip to first unread message

Aftab Shaikh

unread,
May 19, 2021, 12:43:51 PM5/19/21
to Salt-users
Hi Everyone,

I'm having one big problem when i'm trying to run following step on Windows Minion. 
It's getting stuck and not returning any output. I have test the following command manually in Windows Minion by self it's working fine. The only problem having with salt state. Please help me get out with problem guys its very urgent. Thanks in advance to all.
And one more thing I've attached all logs, state and minion logs for investigation. 



copy_report_file_to_master:
  cmd.run:
    - name: c:\pscp -pw password c:\User_Activity\Script\pscp.exe us...@192.11.7.80:/home/user/report
    - shell: powershell
{#- i have check without env argument but that is also not working  #}
    - env:
      - ExecutionPolicy: "bypass"



state_run_log.txt
minion_version.png
minion_os_details.png
master_details.png

Dafydd Jones (techneg.it)

unread,
May 20, 2021, 12:32:43 PM5/20/21
to salt-...@googlegroups.com
Hi,

first thing, I don't see any reason to use shell=powershell when these are not powershell commands.
Second is debugging is a lot easier by running the state locally on the minion using salt-call.
For example, salt-call -l debug state.apply user_activity.script

Dafydd

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/d1daa668-6b81-4db2-b738-f5eba53b19a6n%40googlegroups.com.

Aftab Shaikh

unread,
May 24, 2021, 11:46:23 AM5/24/21
to Salt-users
The reason i use PowerShell as shell. Because its working fine in powershell as well. So i thought lets try with powershell as well.

Aftab Shaikh

unread,
May 24, 2021, 11:46:24 AM5/24/21
to Salt-users
Dafydd,

PFA cp.push command output. Please let me if u require further more details.
On Thursday, May 20, 2021 at 10:02:43 PM UTC+5:30 Dafydd Jones wrote:
cp_push_win_not_working.png

Dafydd Jones (techneg.it)

unread,
May 24, 2021, 4:46:54 PM5/24/21
to salt-...@googlegroups.com
Thanks but I said run it on the minion using salt-call.

Dafydd

Reply all
Reply to author
Forward
0 new messages