I recently upgrade to ansible 1.9.2 and am now having issues with the 
splatting. I looked 
at 
https://github.com/cchurch/ansible/blob/e9b6aaf5d8836ce7ffdca855e006c2131fe19632/lib/ansible/runner/shell_plugins/powershell.py
 
since that fixed it last time. THe only change that wasn't still there was 
in powershell.py. I made the following change and it works now. I haven't 
gone back to debug closer to see what the difference is.

def _build_file_cmd(cmd_parts, quote_args=True):
    '''Build command line to run a file, given list of file name plus 
args.'''
    if quote_args:
        cmd_parts = ['"%s"' % x for x in cmd_parts]
    #return ' '.join(_common_args + ['-ExecutionPolicy', 'Unrestricted', 
'-File'] + cmd_parts)
    return ' '.join(['&'] + cmd_parts)

Before the change this was the output:
TASK: [windowsDeploy | Call deploy.ps1] 
*************************************** changed: [hostname] => {"changed": 
true, "rc": 0, "stderr": 
"C:\\Users\\l_ansible\\AppData\\Local\\Temp\\ansible-tmp-1438627351.4-181936062454137\\\r\nwrapper.ps1
 
: Cannot process argument transformation on parameter 
\r\n'installArguments'. Cannot convert the \"System.Collections.Hashtable\" 
value of \r\ntype \"System.String\" to type 
\"System.Collections.Hashtable\".\r\n + CategoryInfo : InvalidData: (:) 
[wrapper.ps1], ParentContainsEr \r\n rorRecordException\r\n + 
FullyQualifiedErrorId : 
ParameterArgumentTransformationError,wrapper.ps1\r\n \r\n", "stdout": ""} 

I set the debug higher to see the splatted argument and verified it is a 
correct powershell array/hash. I can fill out an issue at github but 
thought this would be a good start.

-- 
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/5ce814cc-faf5-47f9-8d16-aa1048e8b11b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to