Thank you sir, the last command worked, though win_shell did not. Follow up: what is the switch to run cmd.exe AS ADMINISTRATOR?
On Thu, Dec 21, 2017 at 4:24 PM, Jordan Borean <[email protected]> wrote: > 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 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 > [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 > <https://groups.google.com/d/msgid/ansible-project/800ff38e-54b9-42ff-9bba-4fbb5006bc2d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Thank you, Larry Pescatore Lab Engineer, ERG Inc. @ Google -- 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/CADxK1kuiq%3DhSQmNDfr_NHzdN%2B%2BBcUeHXOC4Lfge%2BOHPbZBptyw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
