From 1987c1292f59ac471e44fe3afb63055cd347a691 Mon Sep 17 00:00:00 2001 From: ogrechko Date: Fri, 5 Dec 2025 10:35:15 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20playbooks/install=5Fsoftware=5Fwin.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playbooks/install_software_win.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/playbooks/install_software_win.yml b/playbooks/install_software_win.yml index 397837e..1077c1b 100644 --- a/playbooks/install_software_win.yml +++ b/playbooks/install_software_win.yml @@ -1,4 +1,18 @@ -tasks: +--- +- name: Install Software from SMB + hosts: windows + gather_facts: no + + # Если коллекции не подтягиваются автоматически, раскомментируйте: + # collections: + # - community.windows + # - ansible.windows + + vars: + drive_letter: "Z" + # Остальные переменные (smb_user, smb_pass, smb_path) ждем из Semaphore + + tasks: # 1. Монтируем диск - name: Mount Network Drive community.windows.win_mapped_drive: # Или ansible.windows.win_mapped_drive @@ -32,6 +46,11 @@ tasks: # -------------------------------- # 3. Отключаем диск + - name: Unmount Network Drive + community.windows.win_mapped_drive: + letter: "{{ drive_letter }}" + state: absent + - name: Unmount Network Drive community.windows.win_mapped_drive: letter: "{{ drive_letter }}"