Hi,
Thanks for the comments/suggestions.
Re. the “echo” problem, I think that I wasn’t being clear. What I wanted to do was to do the “echo $(whoami)” and have the output of that re-directed to a file, somewhere, in order to try to test/understand what user the commands that are being run under the “raw” module are running. As I said, I’m guessing that they are not running under the same user as the commands that are run under the script module. But then, when I tried the echo, running under raw module, outputting to the filesystem, it failed with “access denied”, even if I tried outputting to the E: drive somewhere.
So, it’s a “catch-22” situation: It seems like commands running under the raw module are running under a different (maybe “no”) user than commands running inside a ps1 running under a script module, but my test to try to find out which user that is is failing.
Re. your comments in your last paragraph: I agree that there’s a lot going on, but if you recall, I already had these same set of commands (script) running Chef previously, and am trying to see how far I could get with replicating what I was able to do with Chef but using Ansible instead, as I think that Ansible’s push model fits our use case better.
Thanks again,
Jim