|
|
|
|
@ -187,12 +187,7 @@
|
|
|
|
|
win_nssm:
|
|
|
|
|
name: '{{ test_service_name }}'
|
|
|
|
|
application: C:\Windows\System32\cmd.exe
|
|
|
|
|
app_parameters:
|
|
|
|
|
foo: true
|
|
|
|
|
'-file.out': 'output.bat'
|
|
|
|
|
'-path': 'C:\with space\'
|
|
|
|
|
'-str': 'test"quotes'
|
|
|
|
|
_: bar
|
|
|
|
|
app_parameters: foo=true; -file.out=output.bat; -path=C:\with space\; -str=test"quotes; _=bar
|
|
|
|
|
register: mixed_params
|
|
|
|
|
|
|
|
|
|
- name: get result of install service with dict parameters
|
|
|
|
|
@ -205,19 +200,14 @@
|
|
|
|
|
- mixed_params.changed == true
|
|
|
|
|
- (mixed_params_actual.stdout|from_json).Exists == true
|
|
|
|
|
- (mixed_params_actual.stdout|from_json).Parameters.Application == "C:\Windows\System32\cmd.exe"
|
|
|
|
|
# Expected value: bar -str "test\"quotes" -file.out output.bat foo True -path "C:\with space\\" (backslashes doubled for jinja)
|
|
|
|
|
- (mixed_params_actual.stdout|from_json).Parameters.AppParameters == 'bar -str "test\\"quotes" -file.out output.bat foo True -path "C:\\with space\\\\"'
|
|
|
|
|
# Expected value: bar -file.out output.bat -str "test\"quotes" foo true -path "C:\with space\\" (backslashes doubled for jinja)
|
|
|
|
|
- (mixed_params_actual.stdout|from_json).Parameters.AppParameters == 'bar -file.out output.bat -str "test\\"quotes" foo true -path "C:\\with space\\\\"'
|
|
|
|
|
|
|
|
|
|
- name: install service with dict parameters (idempotent)
|
|
|
|
|
win_nssm:
|
|
|
|
|
name: '{{ test_service_name }}'
|
|
|
|
|
application: C:\Windows\System32\cmd.exe
|
|
|
|
|
app_parameters:
|
|
|
|
|
foo: true
|
|
|
|
|
'-file.out': 'output.bat'
|
|
|
|
|
'-path': 'C:\with space\'
|
|
|
|
|
'-str': 'test"quotes'
|
|
|
|
|
_: bar
|
|
|
|
|
app_parameters: foo=true; -file.out=output.bat; -path=C:\with space\; -str=test"quotes; _=bar
|
|
|
|
|
register: mixed_params_again
|
|
|
|
|
|
|
|
|
|
- name: get result of install service with dict parameters (idempotent)
|
|
|
|
|
@ -230,8 +220,8 @@
|
|
|
|
|
- mixed_params_again.changed == false
|
|
|
|
|
- (mixed_params_again_actual.stdout|from_json).Exists == true
|
|
|
|
|
- (mixed_params_again_actual.stdout|from_json).Parameters.Application == "C:\Windows\System32\cmd.exe"
|
|
|
|
|
# Expected value: bar -str "test\"quotes" -file.out output.bat foo True -path "C:\with space\\" (backslashes doubled for jinja)
|
|
|
|
|
- (mixed_params_again_actual.stdout|from_json).Parameters.AppParameters == 'bar -str "test\\"quotes" -file.out output.bat foo True -path "C:\\with space\\\\"'
|
|
|
|
|
# Expected value: bar -file.out output.bat -str "test\"quotes" foo true -path "C:\with space\\" (backslashes doubled for jinja)
|
|
|
|
|
- (mixed_params_again_actual.stdout|from_json).Parameters.AppParameters == 'bar -file.out output.bat -str "test\\"quotes" foo true -path "C:\\with space\\\\"'
|
|
|
|
|
|
|
|
|
|
- name: remove service
|
|
|
|
|
win_nssm:
|
|
|
|
|
|