win_service - simply env test (#55498)

This commit is contained in:
Jordan Borean 2019-04-18 15:06:45 +10:00 committed by GitHub
commit 62badd76a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 13 deletions

View file

@ -51,12 +51,6 @@
- TestServiceParent2 - TestServiceParent2
- TestServiceDependency - TestServiceDependency
- name: remove test environment variable
win_environment:
name: TEST_SERVICE_PATH
level: machine
state: absent
- name: remove test directory - name: remove test directory
win_file: win_file:
path: '{{ test_win_service_dir }}' path: '{{ test_win_service_dir }}'

View file

@ -594,18 +594,13 @@
- win_service_path_again is not changed - win_service_path_again is not changed
- win_service_path_again.path == 'C:\\temp\\test.exe' - win_service_path_again.path == 'C:\\temp\\test.exe'
- name: create test environment variable
win_environment:
name: TEST_SERVICE_PATH
value: C:\temp
level: machine
state: present
- name: set service path with quotes and env var - name: set service path with quotes and env var
win_service: win_service:
name: "{{test_win_service_name}}" name: "{{test_win_service_name}}"
path: '"%TEST_SERVICE_PATH%\test.exe"' path: '"%TEST_SERVICE_PATH%\test.exe"'
register: win_service_env_quote_path register: win_service_env_quote_path
environment:
TEST_SERVICE_PATH: C:\temp
- name: check that the quoted service path has been changed - name: check that the quoted service path has been changed
assert: assert:
@ -618,6 +613,8 @@
name: "{{test_win_service_name}}" name: "{{test_win_service_name}}"
path: '"%TEST_SERVICE_PATH%\test.exe"' path: '"%TEST_SERVICE_PATH%\test.exe"'
register: win_service_env_quote_path_again register: win_service_env_quote_path_again
environment:
TEST_SERVICE_PATH: C:\temp
- name: check that the quoted service path has been changed again - name: check that the quoted service path has been changed again
assert: assert: