community.windows.win_dotnet_ngen – Runs ngen to recompile DLLs after .NET updates
This plugin is part of the community.windows collection (version 1.9.0).
You might already have this collection installed if you are using the
It is not included in
To check whether it is installed, run
ansible-galaxy collection list.
To install it, use:
ansible-galaxy collection install community.windows.
To use it in a playbook, specify:
After .NET framework is installed/updated, Windows will probably want to recompile things to optimise for the host.
This happens via scheduled task, usually at some inopportune time.
This module allows you to run this task on your own schedule, so you incur the CPU hit at some more convenient and controlled time.
There are in fact two scheduled tasks for ngen but they have no triggers so aren’t a problem.
There’s no way to test if they’ve been completed.
The stdout is quite likely to be several megabytes.
Common return values are documented here, the following are the fields unique to this module: