win_pssession_configuration throws errors if changes are applies to a PS Session Configuration that contains JEA features.
It's a plugin result parsing error due to some outputs that are not piped into the void (aka null), looking like this:
failed to parse module output: Invalid JSON primitive: icrosoft.WSMan.Management.WSManConfigContainerElement.
Diff mode support was added for this plugin too.
It only works for changes and does not contain any info if the session is not created yet.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
win_pssession_configuration
ADDITIONAL INFORMATION
Playbook:
- name: "Create a configuration with JEA features"
win_pssession_configuration:
name: "{{ config_name }}"
description: "{{ config_description }}"
modules_to_import: Microsoft.PowerShell.Utility
visible_aliases: []
visible_cmdlets: []
visible_external_commands: []
visible_functions: []
security_descriptor_sddl: "O:NSG:BAD:P(A;;GA;;;IU)(A;;GA;;;BA)(A;;GA;;;RM)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)"
register: status
- name: "Update configuration, use same parameters as above"
win_pssession_configuration:
name: "{{ config_name }}"
description: "{{ config_description }}"
modules_to_import: Microsoft.PowerShell.Utility
visible_aliases: []
visible_cmdlets: []
visible_external_commands: []
visible_functions: []
security_descriptor_sddl: "O:NSG:BAD:P(A;;GA;;;IU)(A;;GA;;;BA)(A;;GA;;;RM)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)"
register: status
Output:
TASK [Create a configuration with JEA features] *************************************************************************************************************
changed
TASK [Update configuration, use same parameters as above] ***************************************************************************************************
FAILED! => {"msg": "failed to parse module output: Invalid JSON primitive: icrosoft.WSMan.Management.WSManConfigContainerElement."}
WINRM RESULT '<Response code 0, out "{"ansible_async_watc", err "#< CLIXML\r\n<Objs Ver">'
Async Job Status: {'ansible_async_watchdog_pid': 123, 'stdout': '{"changed":true,"invocation":{...}}\r\n\r\nMicrosoft.WSMan.Management.WSManConfigContainerElement\r\n', 'finished': 1, 'stderr': '', 'started': 1, 'failed': True, 'msg': 'failed to parse module output: Invalid JSON primitive: icrosoft.WSMan.Management.WSManConfigContainerElement.', 'changed': False, '_ansible_parsed': True, 'stdout_lines': ['{"changed":true,"invocation":{...}}', '', 'Microsoft.WSMan.Management.WSManConfigContainerElement'], 'stderr_lines': []}
SUMMARY
win_pssession_configuration
throws errors if changes are applies to a PS Session Configuration that contains JEA features. It's a plugin result parsing error due to some outputs that are not piped into the void (akanull
), looking like this:Diff mode support was added for this plugin too. It only works for changes and does not contain any info if the session is not created yet.
ISSUE TYPE
COMPONENT NAME
win_pssession_configuration
ADDITIONAL INFORMATION
Playbook:
Output: