registry_key_present

Ensure that a Registry Key does exist.

⚙️ Compatible targets: Windows

Parameters

NameDocumentation
keyRegistry key (ie, HKLM:\Software\Rudder).

This parameter is required.

Outcome conditions

You need to replace ${key} with its actual canonified value.

  • ✅ Ok: registry_key_present_${key}_ok
    • ☑️ Already compliant: registry_key_present_${key}_kept
    • 🟨 Repaired: registry_key_present_${key}_repaired
  • ❌ Error: registry_key_present_${key}_error

Example

method: registry_key_present
params:
  key: VALUE

Documentation

Create a Registry Key if it does not exist.

There are two different supported syntaxes to describe a Registry Key:

  • with short drive like HKLM:\SOFTWARE\myKey

  • with long drive name preceded by Registry:: like Registry::HKEY_LOCAL_MACHINE\SOFTWARE\myKey

    Please, note that Rudder can not create new drive and new "first-level" Registry Keys.

Examples

- name: Make sure the Rudder reg key is defined
  method: registry_entry_present
    key: "HKLM:\SOFTWARE\Rudder"