Skip to content

Commit

Permalink
Some minor cleanup in Puppet provisioner
Browse files Browse the repository at this point in the history
  • Loading branch information
alexharv074 committed Oct 12, 2019
1 parent e8c12e9 commit eb51f3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builtin/provisioners/puppet/resource_provisioner.go
Expand Up @@ -259,6 +259,7 @@ func (p *provisioner) generateAutosignToken(certname string) (string, error) {
}

func (p *provisioner) installPuppetAgentOpenSource() error {
task := "puppet_agent::install"

connType := p.instanceState.Ephemeral.ConnInfo["type"]
if connType == "" {
Expand All @@ -276,12 +277,12 @@ func (p *provisioner) installPuppetAgentOpenSource() error {
agentConnInfo,
p.BoltTimeout,
p.UseSudo,
"puppet_agent::install",
task,
nil,
)

if err != nil || result.Items[0].Status != "success" {
return fmt.Errorf("puppet_agent::install failed: %s\n%+v", err, result)
return fmt.Errorf("%s failed: %s\n%+v", task, err, result)
}

return nil
Expand Down

0 comments on commit eb51f3c

Please sign in to comment.