我正在尝试使用Ansible安装.NET Framework 4.6.1,但迄今为止没有成功。
我尝试了以下方法:
Running a win_package to install it, but it just hangs till infinity
- name: Install Microsoft NET Framework win_package: path: "http://path/to/dotNetFramework4.6.1.exe" product_id: '{BD6F5371-DAC1-30F0-9DDE-CAC6791E28C3}' register: dotnetfx_exe
Run a PowerShell script to install it (first doesn't work and second throws stack-overflow exception):
Install-WindowsFeature Net-Framework-Core -source C:\temp\dotNetFramework4.6.1.exe
Or
Start-Process -FilePath C:\temp\dotNetFramework4.6.1.exe -ArgumentList "/q /norestart" -Wait -Verb RunAs
I've tried to use win_feature to install it, but it just do nothing.
- name: Install NET-Framework-Core win_feature: name: NET-Framework-Core state: present source: C:\temp\dotNetFramework4.6.1.exe include_sub_features: no include_management_tools: yes register: result
Tried to run a batch script to install it, but no luck:
start /wait c:\temp\dotNetFramework4.6.1.exe /q /norestart /log %TEMP%\dotNetFx4.6.1.log
是否有人成功使用Ansible安装了.NET Framework 4.6.1?
能否分享安装它的任务/角色?