Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: Copy file and run
- hosts: terminals
- tasks:
- - name: Copy a single file
- win_copy:
- src: '/tmp/ASDTech Shell Terminal Setup 4.0.0.exe'
- dest: 'C:TempASDTech Shell Terminal Setup 4.0.0.exe'
- - name: Check if file exist
- win_stat:
- path: 'C:TempASDTech Shell Terminal Setup 4.0.0.exe'
- register: file_info
- - name: Execute file
- raw: 'C:TempASDTech Shell Terminal Setup 4.0.0.exe'
- when: file_info.stat.exists == True
- TASK [Execute file] *************************************************************************************************************************************************************************************************************************
- fatal: [50.18.46.45]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 1, "stderr": "C:\\Temp\\ASDTech : The term 'C:\\Temp\\ASDTech' is not recognized as the name of a cmdlet, function, script file, or rnoperable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try rnagain.rnAt line:1 char:1rn+ C:\\Temp\\ASDTech Shell Terminal Setup 4.0.0.exern+ ~~~~~~~~~~~~~~~~rn + CategoryInfo : ObjectNotFound: (C:\\Temp\\ASDTech:String) [], CommandNotFoundExceptionrn + FullyQualifiedErrorId : CommandNotFoundExceptionrn ", "stderr_lines": ["C:\\Temp\\ASDTech : The term 'C:\\Temp\\ASDTech' is not recognized as the name of a cmdlet, function, script file, or ", "operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try ", "again.", "At line:1 char:1", "+ C:\\Temp\\ASDTech Shell Terminal Setup 4.0.0.exe", "+ ~~~~~~~~~~~~~~~~", " + CategoryInfo : ObjectNotFound: (C:\\Temp\\ASDTech:String) [], CommandNotFoundException", " + FullyQualifiedErrorId : CommandNotFoundException", " "], "stdout": "", "stdout_lines": []}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement