aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorTim D. Smith2014-12-07 01:38:44 -0500
committerTim D. Smith2014-12-07 07:28:18 -0500
commitc198b5f5a96efe78070698481a6a52fbbc622b25 (patch)
treef8671c8b10d935eca39b246579859d652a8b1b3c /Library/Formula
parent40a615f449602c357e723eb4c2fcec6cff9a4155 (diff)
downloadhomebrew-c198b5f5a96efe78070698481a6a52fbbc622b25.tar.bz2
ansible: add functional test
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/ansible.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/Library/Formula/ansible.rb b/Library/Formula/ansible.rb
index 3b1ef15b2..33dbce11f 100644
--- a/Library/Formula/ansible.rb
+++ b/Library/Formula/ansible.rb
@@ -120,6 +120,16 @@ class Ansible < Formula
end
test do
- system "#{bin}/ansible", "--version"
+ ENV["ANSIBLE_REMOTE_TEMP"] = testpath/"tmp"
+ (testpath/"playbook.yml").write <<-EOF.undent
+ ---
+ - hosts: all
+ gather_facts: False
+ tasks:
+ - name: ping
+ ping:
+ EOF
+ (testpath/"hosts.ini").write("localhost ansible_connection=local\n")
+ system bin/"ansible-playbook", testpath/"playbook.yml", "-i", testpath/"hosts.ini"
end
end