diff options
| author | Tim D. Smith | 2014-12-07 01:38:44 -0500 |
|---|---|---|
| committer | Tim D. Smith | 2014-12-07 07:28:18 -0500 |
| commit | c198b5f5a96efe78070698481a6a52fbbc622b25 (patch) | |
| tree | f8671c8b10d935eca39b246579859d652a8b1b3c /Library/Formula | |
| parent | 40a615f449602c357e723eb4c2fcec6cff9a4155 (diff) | |
| download | homebrew-c198b5f5a96efe78070698481a6a52fbbc622b25.tar.bz2 | |
ansible: add functional test
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ansible.rb | 12 |
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 |
