From 3a09e9373bde0539da307dc01d00bf1f404000e6 Mon Sep 17 00:00:00 2001 From: ogrechko Date: Fri, 2 Oct 2026 12:12:57 +0300 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 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/playbooks/install_software_win.yml b/playbooks/install_software_win.yml index ee592f5..5c95429 100644 --- a/playbooks/install_software_win.yml +++ b/playbooks/install_software_win.yml @@ -23,7 +23,7 @@ unc_file: "{{ smb_path | regex_replace('\\\\+$', '') }}\\{{ installer_file }}" tasks: - - name: Check installer on share and list folder + - name: Check installer on share and list folder ansible.windows.win_powershell: parameters: Share: "{{ smb_path }}" @@ -49,7 +49,6 @@ $res.error = $_.Exception.Message } $Ansible.Result = $res - error_action: continue register: share_check no_log: true failed_when: false @@ -68,4 +67,15 @@ else 'Файл ' ~ installer_file ~ ' не найден в ' ~ smb_path }} when: >- (share_check.result.error | default('x')) != '' or - not (share_check.result.exists | default(false)) \ No newline at end of file + not (share_check.result.exists | default(false)) + + - name: Install {{ installer_file }} + ansible.windows.win_package: + path: "{{ unc_file }}" + username: "{{ smb_user }}" + password: "{{ smb_pass }}" + state: present + arguments: "{{ installer_args }}" + product_id: "{{ product_id | default(omit) }}" + creates_path: "{{ creates_path | default(omit) }}" + no_log: true \ No newline at end of file