Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$jsonCertName and $jsonHostName are out of scope in catch block #88

Open
greglarkin opened this issue May 24, 2019 · 0 comments
Open

$jsonCertName and $jsonHostName are out of scope in catch block #88

greglarkin opened this issue May 24, 2019 · 0 comments

Comments

@greglarkin
Copy link

In the windows.ps1 task, if the agent installation fails and control is transferred to the catch block, the $jsonCertName and $jsonHostName variables are out of scope and display blank values.

Sample output:

    {
      "status"   : "failure",
      "host"     : "",
      "certname" : "",
      "master"   : "puppet.classroom.puppet.com",
      "_error"   : {
        "msg" : "Unable to install agent on  with certname : Exception calling \"DownloadString\" with \"1\" argument(s): \"The request was aborted: Could not create SSL/TLS secure channel.\"",
        "kind": "powershell_error",
        "details" : {}
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant