-
Notifications
You must be signed in to change notification settings - Fork 0
/
.kitchen.yml
138 lines (135 loc) · 4.42 KB
/
.kitchen.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
driver_plugin: ### your driver here ###
provisioner:
name: chef_zero
environments_path: 'test/integration/environments'
data_bag_dir: 'test/integration/data_bags'
client_rb:
# Change node_name at every run to work around attributes bug.
node_name: op5manage-test<%= Time.now.to_i %>.mydomain.tld
no_proxy: localhost,127.0.0.1
environment: kitchen
platforms:
### your platforms here ###
suites:
- name: op5_manage-<%= ENV['USER'] %>
run_list:
- recipe[op5_manage]
- recipe[op5_manage::host]
- recipe[op5_manage::service]
- recipe[op5_manage::host_downtime]
# node_name changes at every run to handle attributes bug (see above).
# Otherwise you would need to destroy and create vm again to change attributes.
# On the downside attributes set at run time are not persistent.
attributes: {
"role_default": {
"fqdn": "op5cheftest-01.mydomain.tld"
},
"op5_manage": {
"node": {
"hostgroups": {
"DNS servers": true,
"Web servers https": true,
"Linux servers": true
},
"services": {
"Test service 06": {
"check_command": "check_ssh_5",
"display_name": "Interval 15m - Notify 15m+2m",
"action": "create"
}
},
"action": "create"
},
"hosts": {
"op5cheftest-02.mydomain.tld": {
"alias_name": "op5cheftest-02",
"address": "192.168.211.26",
"template": "default-host-template",
"hostgroups": {
"Linux servers": false,
"Web servers https": true,
"Web servers": true
},
"check_period": "none",
"retain_info": true,
"action": "create"
},
"op5cheftest-03.mydomain.tld": {
"alias_name": "op5cheftest-03",
"address": "192.168.211.21",
"template": "default-host-template",
"hostgroups": {
"Linux servers": true,
"Web servers https": true
},
"action": "create"
},
"op5cheftest-04.mydomain.tld": {
"address": "192.168.211.22",
"alias_name": "op5cheftest-04",
"template": "default-host-template",
"hostgroups": {
"Linux servers": true
},
"action": "create"
},
"op5cheftest-05.mydomain.tld": {
"alias_name": "op5cheftest-05",
"address": "192.168.211.23",
"template": "default-host-template",
"hostgroups": {
"Linux servers": false,
"Web servers https": false
},
"check_period": "workhours",
"contact_groups": {
"support-group": true
},
"custom_variable": {
"_myapp_env": "dev",
"_myapp_version": "v1.43"
},
"action": "create"
}
},
"services": {
"op5cheftest-03.mydomain.tld;Test service 01": {
"check_command": "check_ssh_5",
"action": "create"
},
"op5cheftest-03.mydomain.tld;Test service 03": {
"check_command": "check_ssh_5",
"contacts": {
"admin": true
},
"contact_groups": {
"support-group": false
},
"action": "create"
},
"op5cheftest-04.mydomain.tld;Test service 04": {
"check_command": "check_ssh_5",
"template": "default-service",
"display_name": "Interval 15m - Notify 15m+2m",
"action": "create"
},
"op5cheftest-04.mydomain.tld;Test service 05": {
"check_command": "check_ssh_5",
"action": "create"
}
},
"host_downtimes": {
"maintenance_op5cheftest-05.mydomain.tld": {
"command": "SCHEDULE_HOST_DOWNTIME",
"host_name": "op5cheftest-05.mydomain.tld",
"start_time": "<%= Time.now.strftime("%d.%m.%Y %H:%M:%S") %>",
"end_time": "<%= (Time.now + 300).strftime("%d.%m.%Y %H:%M:%S") %>",
"fixed": true,
"duration": 0,
"trigger_id": 0,
"comment": "Maintenance downtime for op5cheftest-05.mydomain.tld"
}
}
}
}