diff --git a/playbooks/install_software_win.yml b/playbooks/install_software_win.yml index da97cf6..703933a 100644 --- a/playbooks/install_software_win.yml +++ b/playbooks/install_software_win.yml @@ -99,6 +99,21 @@ creates: '{{ install_dir }}\bin\FreeCAD.exe' register: inst failed_when: inst.rc not in [0, 3010] + become: yes + become_method: runas + become_user: "{{ win_user }}" + become_password: "{{ win_pass }}" + no_log: true + + - name: Verify FreeCAD.exe exists + ansible.windows.win_stat: + path: '{{ install_dir }}\bin\FreeCAD.exe' + register: fc_check + + - name: Fail if FreeCAD was not installed + ansible.builtin.fail: + msg: "Установщик завершился, но {{ install_dir }}\\bin\\FreeCAD.exe не найден" + when: not fc_check.stat.exists always: - name: Remove local installer copy ansible.windows.win_file: