Been trying to write a script that will sign a cert for a new node, but I 
don't seem to be having any luck.  

Here is the code I have so far

[System.net.ServicePointManager]::ServerCertificateValidationCallback = {
$true}

$console_server = 'puppetserver'

$node = "new-test-server.local"

$action = '{"desired_state":"signed"}'

$json = $action | ConvertTo-Json


$url = 
"https://${console_server}:8140/puppet-ca/v1/certificate_status/${node}";

echo $url

$results = Invoke-RestMethod -Uri $url -body $json -method PUT -ContentType 
'application/pson'

echo $results

I've spent most of the day trying to figure this one out. Any help would be 
appreciated./

-- 
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/f273559d-ee56-40bd-ad7b-b42801bb4545%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to