Strange, in any case I did test that module running powershell against my
Mac, and it worked fine:
TASK [pstest]
******************************************************************
ok: [localhost] => {"changed": false, "file":
"/Users/matt/.ansible/tmp/ansible-tmp-1477081774.17-151155167231051/pstest.ps1",
"msg": "test"}
The only difference is that I also had it output the path of the executing
module to show it was a powershell script.
On Fri, Oct 21, 2016 at 3:25 PM, Rajendra Adhikari <[email protected]
> wrote:
> Looks like best bet for me now is to simply use Windows Powershell until
> it is supported from ansible itself. Thank you.
>
> On Friday, October 21, 2016 at 12:24:06 PM UTC-5, Matt Davis wrote:
>>
>> Some aspects of Ansible's Powershell support are currently built under
>> the assumption that it would only ever run on Windows / over WinRM. There
>> are a few things that would need to be moved around in order to allow
>> "real" Ansible Powershell modules to work on Linux. By "real", I mean so
>> that the module generation stuff works correctly whether the WinRM
>> connection plugin runs it or something else, and that you can use our
>> Powershell module API.
>>
>> You can probably make Powershell modules work today by setting the
>> shebang to your powershell path and dealing with the low-level module stuff
>> yourself (or patching powershell.ps1 into the module manually). Now that
>> Powershell for Linux has been released, we'll take a look at the
>> feasibility of doing this for real, but the likelihood of most existing
>> Ansible Powershell modules working unmodified on Linux seems pretty low.
>>
>> My intent is to build some other cross-platform modules around Powershell
>> though (for instance, a set of SQL Server modules that could work on either
>> Windows or Linux hosts with .NET Core/Powershell), but that's probably not
>> going to happen until the 2.4 timeframe.
>>
>> Good luck!
>>
>> -Matt
>>
>>>
>>> --
> 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/3c1bb9b6-6b25-4991-9a2c-230110c31885%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/3c1bb9b6-6b25-4991-9a2c-230110c31885%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Matt Martz
@sivel
sivel.net
--
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/CAD8N0v-pOOF4fmfZTeRd4bF57K%2BK4oHfJ2HW_p%3Dfgm5GOU%3DL7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.