blob: 9dbf83dad02dd330969f5a7bae4384bd7ba7a0d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
- hosts:
- testhost
- testhost2
gather_facts: no
vars:
secondhost: testhost2
tasks:
- name: Call the first role only on one host
include_role:
name: role1
when: inventory_hostname is match(secondhost)
- name: Make sure nothing else runs until role1 finishes
assert:
that:
- "'role1_complete' in hostvars[secondhost]"
|