Обновить playbooks/install_software_win.yml
This commit is contained in:
@@ -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. Монтируем диск
|
# 1. Монтируем диск
|
||||||
- name: Mount Network Drive
|
- name: Mount Network Drive
|
||||||
community.windows.win_mapped_drive: # Или ansible.windows.win_mapped_drive
|
community.windows.win_mapped_drive: # Или ansible.windows.win_mapped_drive
|
||||||
@@ -36,3 +50,8 @@ tasks:
|
|||||||
community.windows.win_mapped_drive:
|
community.windows.win_mapped_drive:
|
||||||
letter: "{{ drive_letter }}"
|
letter: "{{ drive_letter }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
|
- name: Unmount Network Drive
|
||||||
|
community.windows.win_mapped_drive:
|
||||||
|
letter: "{{ drive_letter }}"
|
||||||
|
state: absent
|
||||||
Reference in New Issue
Block a user