disk service jenkinsfile less verbose

This commit is contained in:
2025-10-26 15:18:41 -07:00
parent 8411578068
commit 0435dabd87
8 changed files with 90 additions and 32 deletions

View File

@ -0,0 +1,40 @@
---
- name: Create directory structure
ansible.windows.win_file:
path: "{{ storage_api_root }}"
state: directory
- name: Stop service if running
ansible.windows.win_service:
name: "{{ disk_service_name }}"
state: paused
- name: Copy disk_service.py
ansible.windows.win_copy:
src: disk_service.py
dest: "{{ storage_api_root }}\\disk_service.py"
- name: install pyinstaller
win_shell: "{{ python_venv_bin }} -m pip install pyinstaller"
- name: compile binary
become: no
win_shell: "{{ python_venv }}\\Scripts\\pyinstaller.exe -F {{ storage_api_root }}\\disk_service.py"
args:
chdir: "{{ storage_api_root }}"
- name: Open up port 5000
community.windows.win_firewall_rule:
name: _ansible_python_disk_service
description: "Firewall rule to allow traffic for Disk info API"
localport: 5000
action: allow
direction: in
protocol: tcp
state: present
enabled: true
...