Skip to content

Commit

Permalink
Do not run ansible if playbook empty (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha authored Aug 22, 2017
1 parent ac66c35 commit c8e7148
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
resource "null_resource" "provisioner" {
count = "${signum(length(var.playbook)) == 1 ? 1 : 0}"
provisioner "local-exec" {
command = "ansible-playbook ${join(" ", var.arguments)} ${var.playbook} -e ${join("-e", var.envs)}"
}
Expand Down

0 comments on commit c8e7148

Please sign in to comment.