mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Fix for PowerShell unquote method when passed None.
This commit is contained in:
parent
6d514e18b7
commit
cafc35fd5b
2 changed files with 12 additions and 0 deletions
|
@ -126,6 +126,7 @@ class ShellModule(object):
|
||||||
|
|
||||||
def _unquote(self, value):
|
def _unquote(self, value):
|
||||||
'''Remove any matching quotes that wrap the given value.'''
|
'''Remove any matching quotes that wrap the given value.'''
|
||||||
|
value = to_unicode(value or '')
|
||||||
m = re.match(r'^\s*?\'(.*?)\'\s*?$', value)
|
m = re.match(r'^\s*?\'(.*?)\'\s*?$', value)
|
||||||
if m:
|
if m:
|
||||||
return m.group(1)
|
return m.group(1)
|
||||||
|
|
|
@ -39,6 +39,17 @@
|
||||||
that:
|
that:
|
||||||
- "template_result.changed == true"
|
- "template_result.changed == true"
|
||||||
|
|
||||||
|
- name: fill in a basic template again
|
||||||
|
win_template:
|
||||||
|
src: foo.j2
|
||||||
|
dest: "{{win_output_dir}}/foo.templated"
|
||||||
|
register: template_result2
|
||||||
|
|
||||||
|
- name: verify that the template was not changed
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- "not template_result2|changed"
|
||||||
|
|
||||||
# VERIFY CONTENTS
|
# VERIFY CONTENTS
|
||||||
|
|
||||||
- name: copy known good into place
|
- name: copy known good into place
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue