-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwindows_service.yml
More file actions
51 lines (46 loc) · 1.16 KB
/
windows_service.yml
File metadata and controls
51 lines (46 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
- name: Install windows service
hosts: all
tasks:
- name: Example install devops windows service
win_service:
name: service name
path: C:\temp\deneme\deneme.exe
display_name: service name
description: Bu servis deneme servisidir.
- name: Remove a service
hosts: windows
tasks:
- name: Servis silme.
win_service:
name: service name
state: absent
- name: Check service is installed
hosts: windows
tasks:
- name: Servis kurulu olup olmadığını kontrol et.
win_service:
name: service name
register: service_info
- name: Stop service
hosts: windows
tasks:
- name: Servisi durdur.
win_service:
name: service name
state: paused
- name: Set service startup mode to auto and ensure it is started
hosts: windows
tasks:
- name: servisi oto başlat ve başlatıldığını kontrol et.
win_service:
name: service name
start_mode: auto
state: started
- name: Restart service
hosts: all
tasks:
- name: Servisi restart et.
win_service:
name: service name
state: restarted