You can try just running the gcloud executable by itself to make things
simpler like so
- win_command: gcloud auth activate-service-account
> --key-file=C:\Users\user\Desktop\foo.json
This should work unless that relies on any shell ism's which are not
available in win_command. Otherwise you have 2 other options if you really
need to run it under command prompt
- 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
The last example is close to what you were trying to do but to run a
command in cmd you must pass the /c argument telling it what command to
actually run.
Thanks
Jordan
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
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.