mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 05:51:43 -07:00
win_service - simply env test (#55498)
This commit is contained in:
parent
ffce456de9
commit
62badd76a5
2 changed files with 4 additions and 13 deletions
|
@ -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 }}'
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue