{#- Get the ProgramFilesDir value from the registry #}
{%-
    set programfiles = salt['reg.read_value'](
        'HKEY_LOCAL_MACHINE',
        'SOFTWARE\Microsoft\Windows\CurrentVersion',
        'ProgramFilesDir').vdata
%}

{#- Initialize a map of default values #}
{%- load_yaml as defaults %}

package: 'splunkforwarder'
service: 'SplunkForwarder'
deploymentclient:
  conf: >-
    '{{ programfiles }}\SplunkUniversalForwarder\etc\system\local\deploymentclient.conf'
log_local:
  contents: |
      category.StatusMgr=WARN
      category.TcpOutputProc=WARN
      category.FilesystemChangeWatcher=ERROR
  conf: >-
    '{{ programfiles }}\SplunkUniversalForwarder\etc\log-local.cfg'
bin_file: >-
    {{ programfiles }}\SplunkUniversalForwarder\bin\splunk.exe

{%- endload %}

{#- Define the splunkforwarder map, merging pillar and default values #}
{%-
    set splunkforwarder = salt['pillar.get'](
        'splunkforwarder:lookup',
        default=defaults,
        merge=True
    )
%}
