1
1
mirror of https://github.com/adammck/terraform-inventory synced 2024-11-26 03:36:07 +01:00

Not outputting the global variables if no outputs are set.

This commit is contained in:
Lazar Travica 2016-02-18 11:46:40 +01:00
parent 6ead28eee6
commit 99ff88b3ce
2 changed files with 7 additions and 5 deletions

2
cli.go

@ -22,10 +22,12 @@ func cmdList(stdout io.Writer, stderr io.Writer, s *state) int {
}
}
if(len(s.outputs()) > 0) {
groups["all"] = make(map[string]string, 0)
for _, out := range s.outputs() {
groups["all"].(map[string]string)[out.keyName] = out.value
}
}
return output(stdout, stderr, groups)
}

@ -1,5 +1,5 @@
- hosts:
- web-aws
- web-do
- alpha
- beta
tasks:
- command: "echo Hello, world!"