diff --git a/cli.go b/cli.go index f80529a..a8d7f85 100644 --- a/cli.go +++ b/cli.go @@ -22,9 +22,11 @@ func cmdList(stdout io.Writer, stderr io.Writer, s *state) int { } } - groups["all"] = make(map[string]string, 0) - for _, out := range s.outputs() { - groups["all"].(map[string]string)[out.keyName] = out.value + 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) diff --git a/fixtures/playbook.yml b/fixtures/playbook.yml index a4d802a..2cfbdec 100644 --- a/fixtures/playbook.yml +++ b/fixtures/playbook.yml @@ -1,5 +1,5 @@ - hosts: - - web-aws - - web-do + - alpha + - beta tasks: - command: "echo Hello, world!"