run script

23 views
Skip to first unread message

Mark Olliver

unread,
Sep 1, 2014, 2:12:33 PM9/1/14
to ansible-project
Hi,

What is the best way to run a script on completion of a successful ansible run. We have a set of automated tests which we need to run via a code deployment server each time we make a run of ansible. This meets our business documentation requirements for change control. 

Currently we have a simple script to run that calls the codeshare api and can trigger the checks, but I am unsure how to firstly get ansible to run this after it has completed the run of any playbook and secondly ideally only run it if all the checks that ran before were ok?


any ideas on where to start ?

Thanks

Mark

--
MARK OLLIVER
HEAD OF IT OPERATIONS
 
T. +44(0) 20 7775 5628
 
Infectious Media
3-7 Herbal Hill / London / EC1R 5EJ
www.infectiousmedia.com
 
Infectious Media  
Facebook Twitter LinkedIn Youtube  
 
 
 
This email and any attachments are confidential and may also be
privileged. If you are not the intended recipient, please notify the sender
immediately, and do not disclose the contents to another person, use it for
any purpose, or store, or copy the information in any medium. Please also
destroy and delete the message from your computer.
 


Michael DeHaan

unread,
Sep 1, 2014, 2:36:38 PM9/1/14
to ansible...@googlegroups.com
As the last play in your playbook:

- hosts: localhost
  tasks:
     - script: foo.sh




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALKPxXiGL2Ac%3D1dCE4zDC%2BZcoCq3o3gCwNU1P36LLN9XzcjoZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages