community.windows.win_dotnet_ngen (2.2.0) — module

Runs ngen to recompile DLLs after .NET updates

Authors: Peter Mounce (@petemounce)

Install collection

Install with ansible-galaxy collection install community.windows:==2.2.0


Add to requirements.yml

  collections:
    - name: community.windows
      version: 2.2.0

Description

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.

U(https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#native-image-service)

U(http://blogs.msdn.com/b/dotnet/archive/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up.aspx)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run ngen tasks
  community.windows.win_dotnet_ngen:

Outputs

dotnet_ngen64_eqi_exit_code:
  description: The exit code after running the 64-bit ngen.exe executeQueuedItems
    command.
  returned: 64-bit ngen executable exists
  sample: 0
  type: int
dotnet_ngen64_eqi_output:
  description: The stdout after running the 64-bit ngen.exe executeQueuedItems command.
  returned: 64-bit ngen executable exists
  sample: sample output
  type: str
dotnet_ngen64_update_exit_code:
  description: The exit code after running the 64-bit ngen.exe update /force command.
  returned: 64-bit ngen executable exists
  sample: 0
  type: int
dotnet_ngen64_update_output:
  description: The stdout after running the 64-bit ngen.exe update /force command.
  returned: 64-bit ngen executable exists
  sample: sample output
  type: str
dotnet_ngen_eqi_exit_code:
  description: The exit code after running the 32-bit ngen.exe executeQueuedItems
    command.
  returned: 32-bit ngen executable exists
  sample: 0
  type: int
dotnet_ngen_eqi_output:
  description: The stdout after running the 32-bit ngen.exe executeQueuedItems command.
  returned: 32-bit ngen executable exists
  sample: sample output
  type: str
dotnet_ngen_update_exit_code:
  description: The exit code after running the 32-bit ngen.exe update /force command.
  returned: 32-bit ngen executable exists
  sample: 0
  type: int
dotnet_ngen_update_output:
  description: The stdout after running the 32-bit ngen.exe update /force command.
  returned: 32-bit ngen executable exists
  sample: sample output
  type: str