如何将原始Ansibleparameter passing给Windows cmd而无需任何编码/解码?

我试图设置权限到这样的一些Windows目录

# ansible example.com -m raw -a 'icacls D:\somedir\ /grant "! ЗАО. Руководство":F' -vvvvv 

并得到关于无效参数的Windows错误

 No config file found; using defaults Loaded callback minimal of type stdout, v2.0 File lookup using /etc/ansible/host_files/example.com/mvs as file <example.com> ESTABLISH WINRM CONNECTION FOR USER: mvs on PORT 5985 TO example.com <example.com> WINRM CONNECT: transport=plaintext endpoint=http://example.com:5985/wsman <example.com> EXEC icacls D:\somedir\ /grant "! . C:>2>4AB2>" :F <example.com> WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-EncodedCommand', 'aQBjAGEAYwBsAHMAIABEADoAXAAxAGMAXAAgAC8AZwByAGEAbgB0ACAAIgAhACAAFwQQBB4ELgAgACAEQwQ6BD4EMgQ+BDQEQQRCBDIEPgQiACAAOgBGAA=='] <example.com> WINRM RESULT u'<Response code 1, out "", err "Invalid parameter "!">' example.com | FAILED | rc=1 >> Invalid parameter "!    .  㪮    ⢮" 

我看到2个问题:

  1. 西里尔参数“!ЗАО。Руководство”(这是窗口中的一个组名)奇怪的编码或解码从Ansible传递到Windows主机。

  2. 添加额外的空间beetwen组名称和权限

    “编码的bla-bla-bla”:F

代替

 "encoded bla-bla-bla":F 

如何解决它?

Ansible使用源码(2015年8月17日签出)

 # ansible --version ansible 2.0.0 (devel 4068598c15) last updated 2015/08/17 23:09:54 (GMT +600) lib/ansible/modules/core: (detached HEAD dea5f5d15e) last updated 2015/08/17 23:10:13 (GMT +600) lib/ansible/modules/extras: (detached HEAD 210ee3febc) last updated 2015/08/17 23:10:35 (GMT +600) v1/ansible/modules/core: (detached HEAD f8d8af17cd) last updated 2015/08/17 23:10:53 (GMT +600) v1/ansible/modules/extras: (detached HEAD 495ad450e5) last updated 2015/08/17 23:11:11 (GMT +600) config file = configured module search path = None 

并运行在Gentoo Linux上

 # uname -a Linux web 3.10.4-gentoo #1 SMP Sat Aug 3 02:25:18 NOVT 2013 x86_64 Intel(R) Core(TM)2 Quad CPU @ 2.40GHz GenuineIntel GNU/Linux 

另一方面 – KVM中的Windows Server 2012 R2 Standard(在vultr.com上)