-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathassertion.dsc.yaml
More file actions
27 lines (27 loc) · 927 Bytes
/
assertion.dsc.yaml
File metadata and controls
27 lines (27 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Example configuration that uses assertions to validate the environment before running the configuration.
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: current user registry
type: Microsoft.Windows/Registry
properties:
keyPath: HKCU\example
_exist: true
dependsOn:
- "[resourceId('Microsoft.DSC/Assertion','my assertions')]"
- name: my assertions
type: Microsoft.DSC/Assertion
properties:
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: os
type: Microsoft/OSInfo
properties:
family: Windows
- name: system root
type: Microsoft.Windows/Registry
properties:
keyPath: HKLM\Software\Microsoft\Windows NT\CurrentVersion
valueName: SystemRoot
valueData:
# this is deliberately set to L: drive so that the assertion fails
String: L:\Windows