首次提交,用于实现安装VNCServer

This commit is contained in:
junlan
2025-07-26 16:37:12 +08:00
commit 2cbc7114ef
19 changed files with 346 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
---
- name: 确保目标目录存在
win_file:
path: C:\tmp
state: directory
- name: 复制安装包(控制机→目标机)
win_copy:
src: "{{ msi_source }}"
dest: "{{ msi_dest }}"
when: not ansible_check_mode
- name: 安装 VNC Server
win_package:
path: "{{ msi_dest }}"
arguments: "{{ vnc_install_args }}"
product_id: "{E2908AB8-056B-461B-962C-F4C2FEC5A404}"
state: present
register: install_result
become: yes
become_method: runas
become_user: SYSTEM
- name: 显示安装结果
debug:
var: install_result