Newer
Older
# NOTE(awiddersheim): Gather facts for all hosts as a
# first step since several plays below require them when
# building their configurations. The below 'gather_facts'
# set to 'false' is a bit confusing but this is to avoid
# Ansible gathering facts twice.
- name: Gather facts for all hosts
gather_facts: false
tasks:
- setup:
tags: always
# NOTE(pbourke): This case covers deploying subsets of hosts using --limit. The
# limit arg will cause the first play to gather facts only about that node,
# meaning facts such as IP addresses for rabbitmq nodes etc. will be undefined
# in the case of adding a single compute node.
# We don't want to add the delegate parameters to the above play as it will
# result in ((num_nodes-1)^2) number of SSHs when running for all nodes
# which can be very inefficient.
- name: Gather facts for all hosts (if using --limit)
hosts: all
gather_facts: false
tasks:
- setup:
delegate_facts: True
delegate_to: "{{ item }}"
with_items: "{{ groups['all'] }}"
when:
- (ansible_play_batch | length) != (groups['all'] | length)
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
# NOTE(mgoddard): In large environments, even tasks that are skipped can take a
# significant amount of time. This is an optimisation to prevent any tasks
# running in the subsequent plays for services that are disabled.
- name: Group hosts based on configuration
hosts: all
gather_facts: false
tasks:
- name: Group hosts based on OpenStack release
group_by:
key: "openstack_release_{{ openstack_release }}"
- name: Group hosts based on Kolla action
group_by:
key: "kolla_action_{{ kolla_action }}"
- name: Group hosts based on enabled services
group_by:
key: "{{ item }}"
with_items:
- enable_aodh_{{ enable_aodh | bool }}
- enable_barbican_{{ enable_barbican | bool }}
- enable_blazar_{{ enable_blazar | bool }}
- enable_ceilometer_{{ enable_ceilometer | bool }}
- enable_ceph_{{ enable_ceph | bool }}
- enable_chrony_{{ enable_chrony | bool }}
- enable_cinder_{{ enable_cinder | bool }}
- enable_cloudkitty_{{ enable_cloudkitty | bool }}
- enable_collectd_{{ enable_collectd | bool }}
- enable_congress_{{ enable_congress | bool }}
- enable_designate_{{ enable_designate | bool }}
- enable_elasticsearch_{{ enable_elasticsearch | bool }}
- enable_etcd_{{ enable_etcd | bool }}
- enable_freezer_{{ enable_freezer | bool }}
- enable_glance_{{ enable_glance | bool }}
- enable_gnocchi_{{ enable_gnocchi | bool }}
- enable_grafana_{{ enable_grafana | bool }}
- enable_haproxy_{{ enable_haproxy | bool }}
- enable_heat_{{ enable_heat | bool }}
- enable_horizon_{{ enable_horizon | bool }}
- enable_hyperv_{{ enable_hyperv | bool }}
- enable_influxdb_{{ enable_influxdb | bool }}
- enable_ironic_{{ enable_ironic | bool }}
- enable_iscsid_{{ enable_iscsid | bool }}
- enable_kafka_{{ enable_kafka | bool }}
- enable_karbor_{{ enable_karbor | bool }}
- enable_keystone_{{ enable_keystone | bool }}
- enable_kibana_{{ enable_kibana | bool }}
- enable_kuryr_{{ enable_kuryr | bool }}
- enable_magnum_{{ enable_magnum | bool }}
- enable_manila_{{ enable_manila | bool }}
- enable_mariadb_{{ enable_mariadb | bool }}
- enable_memcached_{{ enable_memcached | bool }}
- enable_mistral_{{ enable_mistral | bool }}
- enable_monasca_{{ enable_monasca | bool }}
- enable_mongodb_{{ enable_mongodb | bool }}
- enable_multipathd_{{ enable_multipathd | bool }}
- enable_murano_{{ enable_murano | bool }}
- enable_neutron_{{ enable_neutron | bool }}
- enable_nova_{{ enable_nova | bool }}
- enable_octavia_{{ enable_octavia | bool }}
- enable_opendaylight_{{ enable_opendaylight | bool }}
- enable_openvswitch_{{ enable_openvswitch | bool }}_enable_ovs_dpdk_{{ enable_ovs_dpdk | bool }}
- enable_outward_rabbitmq_{{ enable_outward_rabbitmq | bool }}
- enable_panko_{{ enable_panko | bool }}
- enable_prometheus_{{ enable_prometheus | bool }}
- enable_qdrouterd_{{ enable_qdrouterd | bool }}
- enable_rabbitmq_{{ enable_rabbitmq | bool }}
- enable_rally_{{ enable_rally | bool }}
- enable_redis_{{ enable_redis | bool }}
- enable_sahara_{{ enable_sahara | bool }}
- enable_searchlight_{{ enable_searchlight | bool }}
- enable_senlin_{{ enable_senlin | bool }}
- enable_skydive_{{ enable_skydive | bool }}
- enable_solum_{{ enable_solum | bool }}
- enable_swift_{{ enable_swift | bool }}
- enable_tacker_{{ enable_tacker | bool }}
- enable_telegraf_{{ enable_telegraf | bool }}
- enable_tempest_{{ enable_tempest | bool }}
- enable_trove_{{ enable_trove | bool }}
- enable_vitrage_{{ enable_vitrage | bool }}
- enable_vmtp_{{ enable_vmtp | bool }}
- enable_watcher_{{ enable_watcher | bool }}
- enable_zookeeper_{{ enable_zookeeper | bool }}
- enable_zun_{{ enable_zun | bool }}
tags: always
- import_playbook: detect-release.yml
vars:
detect_release_hosts: openstack_release_auto
# Apply only when kolla action is 'precheck'.
hosts: kolla_action_precheck
roles:
- { role: chrony,
tags: chrony,
when: enable_chrony | bool }
- name: Apply role haproxy
gather_facts: false
hosts:
- haproxy
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
roles:
- { role: haproxy,
tags: haproxy,
when: enable_haproxy | bool }
tasks:
- block:
- include_role:
role: aodh
tasks_from: loadbalancer
tags: aodh
when: enable_aodh | bool
- include_role:
role: barbican
tasks_from: loadbalancer
tags: barbican
when: enable_barbican | bool
- include_role:
role: blazar
tasks_from: loadbalancer
tags: blazar
when: enable_blazar | bool
- include_role:
role: ceph
tasks_from: loadbalancer
tags: ceph
when: enable_ceph | bool
- include_role:
role: cinder
tasks_from: loadbalancer
tags: cinder
when: enable_cinder | bool
- include_role:
role: cloudkitty
tasks_from: loadbalancer
tags: cloudkitty
when: enable_cloudkitty | bool
- include_role:
role: congress
tasks_from: loadbalancer
tags: congress
when: enable_congress | bool
- include_role:
role: designate
tasks_from: loadbalancer
tags: designate
when: enable_designate | bool
- include_role:
role: elasticsearch
tasks_from: loadbalancer
tags: elasticsearch
when: enable_elasticsearch | bool
- include_role:
role: freezer
tasks_from: loadbalancer
tags: freezer
when: enable_freezer | bool
- include_role:
role: glance
tasks_from: loadbalancer
tags: glance
when: enable_glance | bool
- include_role:
role: gnocchi
tasks_from: loadbalancer
tags: gnocchi
when: enable_gnocchi | bool
- include_role:
role: grafana
tasks_from: loadbalancer
tags: grafana
when: enable_grafana | bool
- include_role:
role: heat
tasks_from: loadbalancer
tags: heat
when: enable_heat | bool
- include_role:
role: horizon
tasks_from: loadbalancer
tags: horizon
when: enable_horizon | bool
- include_role:
role: influxdb
tasks_from: loadbalancer
tags: influxdb
when: enable_influxdb | bool
- include_role:
role: ironic
tasks_from: loadbalancer
tags: ironic
when: enable_ironic | bool
- include_role:
role: karbor
tasks_from: loadbalancer
tags: karbor
when: enable_karbor | bool
- include_role:
role: keystone
tasks_from: loadbalancer
tags: keystone
when: enable_keystone | bool
- include_role:
role: kibana
tasks_from: loadbalancer
tags: kibana
when: enable_kibana | bool
- include_role:
role: magnum
tasks_from: loadbalancer
tags: magnum
when: enable_magnum | bool
- include_role:
role: manila
tasks_from: loadbalancer
tags: manila
when: enable_manila | bool
- include_role:
role: mariadb
tasks_from: loadbalancer
tags: mariadb
when: enable_mariadb | bool
- include_role:
role: memcached
tasks_from: loadbalancer
tags: memcached
when: enable_memcached | bool
- include_role:
role: mistral
tasks_from: loadbalancer
tags: mistral
when: enable_mistral | bool
- include_role:
role: monasca
tasks_from: loadbalancer
tags: monasca
when: enable_monasca | bool
- include_role:
role: mongodb
tasks_from: loadbalancer
tags: mongodb
when: enable_mongodb | bool
- include_role:
role: murano
tasks_from: loadbalancer
tags: murano
when: enable_murano | bool
- include_role:
role: neutron
tasks_from: loadbalancer
tags: neutron
when: enable_neutron | bool
- include_role:
role: nova
tasks_from: loadbalancer
tags: nova
when: enable_nova | bool
- include_role:
role: octavia
tasks_from: loadbalancer
tags: octavia
when: enable_octavia | bool
- include_role:
role: opendaylight
tasks_from: loadbalancer
tags: opendaylight
when: enable_opendaylight | bool
- include_role:
role: panko
tasks_from: loadbalancer
tags: panko
when: enable_panko | bool
- include_role:
role: prometheus
tasks_from: loadbalancer
tags: prometheus
when: enable_prometheus | bool
- include_role:
role: rabbitmq
tasks_from: loadbalancer
tags: rabbitmq
vars:
role_rabbitmq_cluster_cookie:
role_rabbitmq_groups:
when: enable_rabbitmq | bool or enable_outward_rabbitmq | bool
- include_role:
role: sahara
tasks_from: loadbalancer
tags: sahara
when: enable_sahara | bool
- include_role:
role: searchlight
tasks_from: loadbalancer
tags: searchlight
when: enable_searchlight | bool
- include_role:
role: senlin
tasks_from: loadbalancer
tags: senlin
when: enable_senlin | bool
- include_role:
role: skydive
tasks_from: loadbalancer
tags: skydive
when: enable_skydive | bool
- include_role:
role: solum
tasks_from: loadbalancer
tags: solum
when: enable_solum | bool
- include_role:
role: swift
tasks_from: loadbalancer
tags: swift
when: enable_swift | bool
- include_role:
role: tacker
tasks_from: loadbalancer
tags: tacker
when: enable_tacker | bool
- include_role:
role: trove
tasks_from: loadbalancer
tags: trove
when: enable_trove | bool
- include_role:
role: vitrage
tasks_from: loadbalancer
tags: vitrage
when: enable_vitrage | bool
- include_role:
role: watcher
tasks_from: loadbalancer
tags: watcher
when: enable_watcher | bool
- include_role:
role: zun
tasks_from: loadbalancer
tags: zun
when: enable_zun | bool
when:
- enable_haproxy | bool
- kolla_action in ['deploy', 'reconfigure', 'upgrade', 'config']
hosts:
- collectd
- '&enable_collectd_True'
roles:
- { role: collectd,
tags: collectd,
when: enable_collectd | bool }
- name: Apply role zookeeper
gather_facts: false
hosts:
- zookeeper
- '&enable_zookeeper_True'
roles:
- { role: zookeeper,
tags: zookeeper,
when: enable_zookeeper | bool }
hosts:
- elasticsearch
- '&enable_elasticsearch_True'
roles:
- { role: elasticsearch,
tags: elasticsearch,
when: enable_elasticsearch | bool }
hosts:
- influxdb
- '&enable_influxdb_True'
roles:
- { role: influxdb,
tags: influxdb,
when: enable_influxdb | bool }
roles:
- { role: telegraf,
tags: telegraf,
when: enable_telegraf | bool }
- name: Apply role redis
gather_facts: false
hosts:
- redis
roles:
- { role: redis,
tags: redis,
when: enable_redis | bool }
hosts:
- kibana
- '&enable_kibana_True'
roles:
- { role: kibana,
tags: kibana,
when: enable_kibana | bool }
- name: Apply role mariadb
gather_facts: false
hosts:
- mariadb
- '&enable_mariadb_True'
roles:
- { role: mariadb,
tags: mariadb,
when: enable_mariadb | bool }
hosts:
- memcached
- '&enable_memcached_True'
- { role: memcached,
tags: [memcache, memcached],
when: enable_memcached | bool }
- name: Apply role prometheus
gather_facts: false
hosts:
- prometheus
- prometheus-node-exporter
- prometheus-mysqld-exporter
- prometheus-haproxy-exporter
- '&enable_prometheus_True'
roles:
- { role: prometheus,
tags: prometheus,
when: enable_prometheus | bool }
- iscsid
- tgtd
roles:
- { role: iscsi,
tags: iscsi,
when: enable_iscsid | bool }
- '&enable_multipathd_True'
roles:
- { role: multipathd,
tags: multipathd,
when: enable_multipathd | bool }
hosts:
- rabbitmq
- '&enable_rabbitmq_True'
role_rabbitmq_cluster_cookie: '{{ rabbitmq_cluster_cookie }}',
role_rabbitmq_cluster_port: '{{ rabbitmq_cluster_port }}',
role_rabbitmq_epmd_port: '{{ rabbitmq_epmd_port }}',
role_rabbitmq_groups: rabbitmq,
role_rabbitmq_management_port: '{{ rabbitmq_management_port }}',
role_rabbitmq_monitoring_password: '{{ rabbitmq_monitoring_password }}',
role_rabbitmq_monitoring_user: '{{ rabbitmq_monitoring_user }}',
role_rabbitmq_password: '{{ rabbitmq_password }}',
role_rabbitmq_port: '{{ rabbitmq_port }}',
role_rabbitmq_user: '{{ rabbitmq_user }}',
- name: Apply role rabbitmq (outward)
gather_facts: false
hosts:
- outward-rabbitmq
- '&enable_outward_rabbitmq_True'
roles:
- { role: rabbitmq,
tags: rabbitmq,
project_name: outward_rabbitmq,
role_rabbitmq_cluster_cookie: '{{ outward_rabbitmq_cluster_cookie }}',
role_rabbitmq_cluster_port: '{{ outward_rabbitmq_cluster_port }}',
role_rabbitmq_epmd_port: '{{ outward_rabbitmq_epmd_port }}',
role_rabbitmq_groups: outward-rabbitmq,
role_rabbitmq_management_port: '{{ outward_rabbitmq_management_port }}',
role_rabbitmq_password: '{{ outward_rabbitmq_password }}',
role_rabbitmq_port: '{{ outward_rabbitmq_port }}',
role_rabbitmq_user: '{{ outward_rabbitmq_user }}',
when: enable_outward_rabbitmq | bool }
- name: Apply role qdrouterd
gather_facts: false
hosts:
- qdrouterd
- '&enable_qdrouterd_True'
roles:
- { role: qdrouterd,
tags: qdrouterd,
when: enable_qdrouterd | bool }
hosts:
- etcd
- '&enable_etcd_True'
roles:
- { role: etcd,
tags: etcd,
when: enable_etcd | bool }
hosts:
- keystone
- '&enable_keystone_True'
- { role: keystone,
tags: keystone,
when: enable_keystone | bool }
roles:
- { role: ceph,
tags: ceph,
when: enable_ceph | bool }
- name: Apply role kafka
gather_facts: false
hosts:
- kafka
- '&enable_kafka_True'
roles:
- { role: kafka,
tags: kafka,
when: enable_kafka | bool }
hosts:
- storm-worker
- storm-nimbus
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: storm,
tags: storm,
when: enable_storm | bool }
hosts:
- karbor
- '&enable_karbor_True'
roles:
- { role: karbor,
tags: karbor,
when: enable_karbor | bool }
- swift-account-server
- swift-container-server
- swift-object-server
- swift-proxy-server
- { role: swift,
tags: swift,
when: enable_swift | bool }
- ceph-mon
- glance-api
- glance-registry
- { role: glance,
tags: glance,
when: enable_glance | bool }
- ironic-api
- ironic-conductor
- ironic-inspector
- ironic-pxe
roles:
- { role: ironic,
tags: ironic,
when: enable_ironic | bool }
- name: Apply role cinder
gather_facts: false
hosts:
- ceph-mon
- cinder-api
- cinder-backup
- cinder-scheduler
- cinder-volume
roles:
- { role: cinder,
tags: cinder,
when: enable_cinder | bool }
- ceph-mon
- compute
- nova-api
- nova-conductor
- nova-consoleauth
- nova-novncproxy
- nova-scheduler
- { role: nova,
tags: nova,
when: enable_nova | bool }
- name: Apply role opendaylight
gather_facts: false
hosts:
- opendaylight
- '&enable_opendaylight_True'
roles:
- { role: opendaylight,
tags: opendaylight,
when: enable_opendaylight | bool }
- '&enable_openvswitch_True_enable_ovs_dpdk_False'
roles:
- { role: openvswitch,
tags: openvswitch,
when: "(enable_openvswitch | bool) and not (enable_ovs_dpdk | bool)"}
- name: Apply role ovs-dpdk
- '&enable_openvswitch_True_enable_ovs_dpdk_True'
roles:
- { role: ovs-dpdk,
tags: ovs-dpdk,
when: "(enable_openvswitch | bool) and (enable_ovs_dpdk | bool)"}
- name: Apply role nova-hyperv
roles:
- { role: nova-hyperv,
tags: nova-hyperv,
when: enable_hyperv | bool }
# NOTE(gmmaha): Please do not change the order listed here. The current order is a
# workaround to fix the bug https://bugs.launchpad.net/kolla/+bug/1546789
- neutron-dhcp-agent
- neutron-l3-agent
- compute
- manila-share
- { role: neutron,
tags: neutron,
when: enable_neutron | bool }
roles:
- { role: kuryr,
tags: kuryr,
when: enable_kuryr | bool }
- { role: heat,
tags: heat,
when: enable_heat | bool }
- { role: horizon,
tags: horizon,
when: enable_horizon | bool }
- { role: murano,
tags: murano,
when: enable_murano | bool }
- solum-api
- solum-worker
- solum-deployer
- solum-conductor
roles:
- { role: solum,
tags: solum,
when: enable_solum | bool }
roles:
- { role: magnum,
tags: magnum,
when: enable_magnum | bool }
- mistral-api
- mistral-engine
- mistral-executor
roles:
- { role: mistral,
tags: mistral,
when: enable_mistral | bool }
roles:
- { role: sahara,
tags: sahara,
when: enable_sahara | bool }
roles:
- { role: mongodb,
tags: mongodb,
when: enable_mongodb | bool }
hosts:
- panko-api
- '&enable_panko_True'
roles:
- { role: panko,
tags: panko,
when: enable_panko | bool }
roles:
- { role: manila,
tags: manila,
when: enable_manila | bool }
- gnocchi-api
- gnocchi-metricd
- gnocchi-statsd
roles:
- { role: gnocchi,
tags: gnocchi,
when: enable_gnocchi | bool }
vars_files:
- "roles/panko/defaults/main.yml"
- ceilometer-central
- ceilometer-notification
- ceilometer-compute
- '&enable_ceilometer_True'
roles:
- { role: ceilometer,
tags: ceilometer,
when: enable_ceilometer | bool }
- name: Apply role monasca
gather_facts: false
hosts:
- monasca
- monasca-agent
- monasca-api
- monasca-grafana
- monasca-log-api
- monasca-log-transformer
- monasca-log-persister
- monasca-log-metrics
- monasca-thresh
- monasca-notification
- monasca-persister
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: monasca,
tags: monasca,
when: enable_monasca | bool }
- aodh-api
- aodh-evaluator
- aodh-listener
- aodh-notifier
roles:
- { role: aodh,
tags: aodh,
when: enable_aodh | bool }
- barbican-api
- barbican-keystone-listener
- barbican-worker
roles:
- { role: barbican,
tags: barbican,
when: enable_barbican | bool }