Is there anything else that is needed to have a custom facter fact as a
batch file?
cat lib/facter/ssh_hostkey.bat
```
@ECHO OFF
for /f "tokens=2" %%a in ('type C:\ProgramData\ssh\ssh_host_ecdsa_key.pub')
do (set hostkey=%%a)
Echo ssh_hostkey=%hostkey%
```
Executes fine on the Windows host and returns the expected value, but
doesn't show up at all using 'facter -p', 'puppet facts' or 'facter
ssh_hostkey'.
What am I missing?
The same command works in PowerShell if that's easier to implement ?
```
get-content C:\ProgramData\ssh\ssh_host_ecdsa_key.pub|
ForEach-Object{$_.Split(" ")[1]}
```
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/5930fe75-c809-4e26-86b5-83f13c8295cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.