name: run command
win_command: C:\Windows\System32\cmd.exe gcloud auth activate-service-account --key-file=C:\Users\user\Desktop\foo.json
All that happens is the command prompt opens.
When I manually paste "gcloud auth activate-service-account --key-file=C:\Users\user\Desktop\foo.json" into a command prompt it works.
Thus I just think the syntax is incorrect. Any idea on the proper syntax to run something through cmd?
I have also tried
win_command: 'C:\Windows\System32\cmd.exe "gcloud auth activate-service-account --key-file=C:\Users\user\Desktop\foo.json"'
- win_command: gcloud auth activate-service-account --key-file=C:\Users\user\Desktop\foo.json
- name: run it under win_shell and specify it to run under the cmd shell
win_shell: gcloud auth activate-service-account --key-file=C:\Users\user\Desktop\foo.json
args:
executable: cmd.exe
- name: run it under win_command by creating a new cmd shell and executing the command
win_command: cmd.exe /c gcloud auth activate-service-account --key-file=C:\Users\user\Desktop\foo.json
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/Nx0WjMGtNow/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/800ff38e-54b9-42ff-9bba-4fbb5006bc2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.