As the last play in your playbook:
- hosts: localhost
tasks:
- script: foo.sh
On Mon, Sep 1, 2014 at 2:12 PM, Mark Olliver <
[email protected]> wrote:
> 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 [image: Infectious Media] 3-7 Herbal Hill /
> London / EC1R 5EJwww.infectiousmedia.com [image: Infectious Media]
> <http://www.infectiousmedia.com/> [image: Facebook]
> <http://www.facebook.com/infectiousmedia> [image: Twitter]
> <https://twitter.com/infectiousmedia> [image: LinkedIn]
> <http://www.linkedin.com/company/infectious-media-ltd> [image: Youtube]
> <http://www.youtube.com/user/InfectiousMediaLtd> 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.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CALKPxXiGL2Ac%3D1dCE4zDC%2BZcoCq3o3gCwNU1P36LLN9XzcjoZg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CALKPxXiGL2Ac%3D1dCE4zDC%2BZcoCq3o3gCwNU1P36LLN9XzcjoZg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyz8F6bFFnHG6Kp1f2TmmH-UfppLWETkfSs_arP_8phtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.