-
Notifications
You must be signed in to change notification settings - Fork 1
/
hosted.yml
77 lines (65 loc) · 1.69 KB
/
hosted.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
- hosts: localhost
connection: local
gather_facts: false
become: false
tasks:
- fail:
msg: agent-workers > 1
when: agent_workers is defined and agent_workers | int > 1
- fail:
msg: mock-workers > 1
when: mock_workers is defined and mock_workers | int > 1
- fail:
msg: sharding is defined
when: sharding is defined
- fail:
msg: duration is defined
when: duration is defined and test != 'performance'
- fail:
msg: threads is defined
when: threads is defined and test != 'performance'
- hosts: hosted
gather_facts: true
become: false
vars:
type: 'hosted'
vars_files:
- vars-hosted.yml
- vars-common.yml
tasks:
- name: clean test host
shell: docker rm -vf $(docker ps -aq) 2>/dev/null || true && docker volume prune -f
- name: include mock playbook
tags:
- always
import_tasks: mock/main.yml
when: enabler =='agent' or enabler=='mock'
- name: include mosquitto playbook
tags:
- always
import_tasks: mosquitto/main.yml
when: enabler =='agent'
- name: include rabbitmq playbook
tags:
- always
import_tasks: rabbitmq/main.yml
when: enabler =='agent'
- name: include mongo playbook
tags:
- always
import_tasks: mongo/main.yml
when: enabler != 'mock'
- name: include orion playbook
tags:
- always
import_tasks: orion/main.yml
when: enabler =='orion'
- name: include agent playbook
tags:
- always
import_tasks: agent/main.yml
when: enabler == 'agent' and test != 'unit' and test != 'clinic'
- name: include test playbook
tags:
- always
import_tasks: "tests/main.yml"