vtz69g
Last Updated: February 25, 2016
·
3.562K
· lorin
Me pixel

Smoke test after deployment with ansible

After deploying webservers with Ansible, I wanted to be able to run a "smoke test", a simple test that ensures that the servers are up and running. The test itself runs on my local machine, and makes requests against the web servres.

It's easy to do with local_action, which uses Ansible's delegation functionality. Here's what my smoke test play looks like:

---
- name: Run a smoke test against a deployed webserver
  hosts: webservers
  gather_facts: False
  tasks:
   - name: run smoke test
     local_action: command scripts/smoke.py $inventory_hostname
Say Thanks
Respond

3 Responses
Add your response

7473

Could you please provide a bit more detail. I am kind of newbie to ansible and am stuck on a use case like yours. Thanks in advance.

over 1 year ago ·
7597

Thanks I got it working!

over 1 year ago ·
7614
Me pixel

Yay!

over 1 year ago ·
Filed Under