https://github.com/deekayen/ansible-role-dotnet452
Install (or uninstall) Microsoft .NET Framework 4.5.2 using Ansible.
https://github.com/deekayen/ansible-role-dotnet452
ansible ansible-role
Last synced: 4 months ago
JSON representation
Install (or uninstall) Microsoft .NET Framework 4.5.2 using Ansible.
- Host: GitHub
- URL: https://github.com/deekayen/ansible-role-dotnet452
- Owner: deekayen
- License: bsd-3-clause
- Created: 2016-10-12T22:15:33.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2021-07-14T03:39:19.000Z (almost 5 years ago)
- Last Synced: 2025-09-21T12:42:30.259Z (10 months ago)
- Topics: ansible, ansible-role
- Homepage: https://galaxy.ansible.com/deekayen/dotnet452/
- Size: 15.6 KB
- Stars: 2
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
.NET Framework 4.5.2
====================
[](https://github.com/deekayen/ansible-role-dotnet452/actions/workflows/ci.yml) [](https://www.repostatus.org/#inactive)
Install (or uninstall) Microsoft .NET Framework 4.5.2 on Windows.
Requirements
------------
The target Windows machines must have whitelisted Internet access to download the .NET installer from [download.microsoft.com]().
Role Variables
--------------
By default, this role installs the .NET Framework. Toggling the `dotnet452_uninstall` variable from `false` to `true` will uninstall the framework if it exists.
Dependencies
------------
None.
Example Playbook
----------------
- hosts: servers
roles:
- { role: deekayen.dotnet452, dotnet452_uninstall: false }
Example Install
---------------
TASK [deekayen.dotnet452 : Install Microsoft .NET Framework 4.5.2.] ************
ok: [10.0.0.100] => {"changed": false, "name": "https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe"}
TASK [deekayen.dotnet452 : debug] **********************************************
ok: [10.0.0.100] => {
"dotnet452_exe": {
"changed": false,
"name": "https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe"
}
}
Because the uninstall task uses Ansible's `raw` module, the play output will always report `ok` status instead of `changed`. The playbook may also complete before the msiexec process has completely finished uninstalling the framework.
### Windows 2008R2
Microsoft .NET Framework must exist already on Windows 2008R2 for Ansible to connect and invoke Powershell. This module will confirm that the desired version is installed.
Example Uninstall
-----------------
TASK [deekayen.dotnet452 : Uninstall Microsoft .NET Framework 4.5.2.] **********
ok: [10.0.0.100] => {"changed": false, "rc": 0, "stderr": "", "stdout": "", "stdout_lines": []}
TASK [deekayen.dotnet452 : debug] **********************************************
ok: [10.0.0.100] => {
"dotnet452_removed": {
"changed": false,
"rc": 0,
"stderr": "",
"stdout": "",
"stdout_lines": []
}
}
### Caveat
Uninstalling .NET Framework on Windows 2008R2 will break Ansible's ability to invoke Powershell. You won't be able to reconnect with Ansible to the remote host until you re-install .NET Framework by some other means than this role.
License
-------
BSD