0c560b8c89
- /home/.chezmoiscripts/universal/run_onchange_before_03-jumpcloud.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_03-jumpcloud-linux.sh.tmpl - /home/.chezmoiscripts/windows/run_onchange_before_03-jumpcloud.ps1.tmpl
3 lines
No EOL
738 B
Cheetah
3 lines
No EOL
738 B
Cheetah
{{- if and (eq .host.distro.family "windows") (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (or (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "JUMPCLOUD_CONNECT_KEY")) (env "JUMPCLOUD_CONNECT_KEY")) -}}
|
|
cd $env:temp | Invoke-Expression; Invoke-RestMethod -Method Get -URI https://raw.githubusercontent.com/TheJumpCloud/support/master/scripts/windows/InstallWindowsAgent.ps1 -OutFile InstallWindowsAgent.ps1 | Invoke-Expression; ./InstallWindowsAgent.ps1 -JumpCloudConnectKey "{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "JUMPCLOUD_CONNECT_KEY")) }}{{- includeTemplate "secrets/JUMPCLOUD_CONNECT_KEY" | decrypt -}}{{ else }}{{- env "JUMPCLOUD_CONNECT_KEY" -}}{{ end }}"
|
|
{{ end -}} |