-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaybook.yml
44 lines (38 loc) · 1.25 KB
/
playbook.yml
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
---
- name: deploy v8hasp-exporter
hosts: hasplmservers
vars:
osweb_path: C:\osweb
exporter_path: C:\HASPLM\v8hasp-exporter
tasks:
- name: install add packages
win_chocolatey:
name:
- onescript
- git
- wget
state: present
- name: download onescript.web
win_get_url:
url: https://build.oscript.io/job/1Script.Web/job/develop/lastSuccessfulBuild/artifact/oscript.web-win-x64.zip
dest: '%TEMP%\oscript.web-win-x64.zip'
- name: unzip oscript.web archive
win_unzip:
src: '%TEMP%\oscript.web-win-x64.zip'
dest: '{{ osweb_path }}'
- name: git clone v8hasp-exporter
win_git:
repo: 'https://github.com/komarovps/v8hasp-exporter.git'
dest: '{{ exporter_path }}'
branch: main
clone: true
- name: install oscript libraries
win_shell: opm install -l
args:
chdir: '{{ exporter_path }}\src'
executable: cmd.exe
- name: reg service
win_service:
name: HASP exporter for Prometheus
path: '{{ osweb_path }}\OneScript.WebHost.exe --RunAsService=true --urls=http://*:5000 --ContentRoot={{ exporter_path }}\src'
state: started