Dependencies between plays

11 views
Skip to first unread message

Nikita Gubenko

unread,
Oct 13, 2016, 11:10:44 AM10/13/16
to Ansible Project
Hello, folks

Is there any possible way to make plays depend on each other? E.g. in the example below do not start play2 if any of the hosts in play1 failed?

 ---
 
# play 1
 
- hosts: rabbitmq
    gather_facts
: no
    sudo
: yes
    serial
: 1
    roles
:
     
- rabbitmq

 
# play 2
 
- hosts: webservers
    gather_facts
: no
    sudo
: yes
    strategy
: free
    roles
:
     
- webservers


Kai Stian Olstad

unread,
Oct 13, 2016, 1:18:23 PM10/13/16
to ansible...@googlegroups.com
You can add "any_errors_fatal: true" to play 1.

--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages