Обновить playbooks/install_software_win.yml
This commit is contained in:
1 parent
56c73827e9
commit
3a09e9373b
1 file changed
+12
-2
@@ -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
|
||||
@@ -69,3 +68,14 @@
|
||||
when: >-
|
||||
(share_check.result.error | default('x')) != '' or
|
||||
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
|
||||
Reference in new issue
Block a user