deekayen.dotnet48
.NET Framework 4.8
This guide helps you to install or uninstall Microsoft .NET Framework 4.8 on Windows.
Requirements
Your Windows machines need to have internet access to download the .NET installer from download.microsoft.com.
Role Variables
By default, this role will install .NET Framework. If you change the dotnet48_uninstall
variable from false
to true
, it will uninstall the framework if it is already installed.
Dependencies
There are no dependencies.
Example Playbook
- hosts: servers
roles:
- { role: deekayen.dotnet48, dotnet48_uninstall: false }
Example Install
TASK [deekayen.dotnet48 : Install Microsoft .NET Framework 4.8.] ************
ok: [10.0.0.100] => {"changed": false, "name": "https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe"}
TASK [deekayen.dotnet48 : debug] **********************************************
ok: [10.0.0.100] => {
"dotnet48_exe": {
"changed": false,
"name": "https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe"
}
}
Note: When uninstalling, the output will always show ok
instead of changed
, and the uninstallation may finish after the playbook is done.
Windows 2008R2
For Ansible to connect and use Powershell on Windows 2008R2, .NET Framework 4.8 must be already installed.
Example Uninstall
TASK [deekayen.dotnet48 : Uninstall Microsoft .NET Framework 4.8.] **********
ok: [10.0.0.100] => {"changed": false, "rc": 0, "stderr": "", "stdout": "", "stdout_lines": []}
TASK [deekayen.dotnet48 : debug] **********************************************
ok: [10.0.0.100] => {
"dotnet48_removed": {
"changed": false,
"rc": 0,
"stderr": "",
"stdout": "",
"stdout_lines": []
}
}
Caveat
Finding the correct product ID for the 4.8 or 4.8.1 installers can be difficult. The one used for installation is for 4.8, not 4.8.1, so it might not include the latest updates. You may need to download KB5011048 that matches your system.
Uninstalling .NET Framework from Windows 2008R2 will stop Ansible from using Powershell. You won't be able to reconnect until you re-install .NET Framework through another method.
License
BSD
ansible-galaxy install deekayen.dotnet48