Skip to content
Snippets Groups Projects
site.yml 31.7 KiB
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
  hosts: all
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  gather_facts: false
  tasks:
    - setup:
# 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
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  gather_facts: false
  tasks:
    - setup:
      delegate_facts: True
      delegate_to: "{{ item }}"
      with_items: "{{ groups['all'] }}"
      when:
        - (ansible_play_batch | length) != (groups['all'] | length)
  tags: always
# 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
- name: Apply role prechecks
  gather_facts: false
  # Apply only when kolla action is 'precheck'.
  hosts: kolla_action_precheck
  roles:
    - role: prechecks

Jeffrey Zhang's avatar
Jeffrey Zhang committed
- name: Apply role chrony
  gather_facts: false
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  hosts:
    - chrony-server
    - chrony
    - '&enable_chrony_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  roles:
    - { role: chrony,
        tags: chrony,
        when: enable_chrony | bool }

- name: Apply role haproxy
  gather_facts: false
  hosts:
    - haproxy
    - '&enable_haproxy_True'
  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']

- name: Apply role collectd
  gather_facts: false
  hosts:
    - collectd
    - '&enable_collectd_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: collectd,
        tags: collectd,
        when: enable_collectd | bool }

- name: Apply role zookeeper
  gather_facts: false
  hosts:
    - zookeeper
    - '&enable_zookeeper_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: zookeeper,
        tags: zookeeper,
        when: enable_zookeeper | bool }

- name: Apply role elasticsearch
  gather_facts: false
  hosts:
    - elasticsearch
    - '&enable_elasticsearch_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: elasticsearch,
        tags: elasticsearch,
        when: enable_elasticsearch | bool }
- name: Apply role influxdb
  gather_facts: false
  hosts:
    - influxdb
    - '&enable_influxdb_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Mathias Ewald's avatar
Mathias Ewald committed
  roles:
    - { role: influxdb,
        tags: influxdb,
        when: enable_influxdb | bool }

- name: Apply role telegraf
  gather_facts: false
Mathias Ewald's avatar
Mathias Ewald committed
    - telegraf
    - '&enable_telegraf_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Mathias Ewald's avatar
Mathias Ewald committed
  roles:
    - { role: telegraf,
        tags: telegraf,
        when: enable_telegraf | bool }

Mathias Ewald's avatar
Mathias Ewald committed
- name: Apply role redis
  gather_facts: false
  hosts:
    - redis
    - '&enable_redis_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Mathias Ewald's avatar
Mathias Ewald committed
  roles:
    - { role: redis,
        tags: redis,
        when: enable_redis | bool }

- name: Apply role kibana
  gather_facts: false
  hosts:
    - kibana
    - '&enable_kibana_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: kibana,
        tags: kibana,
- name: Apply role mariadb
  gather_facts: false
  hosts:
    - mariadb
    - '&enable_mariadb_True'
  roles:
    - { role: mariadb,
        tags: mariadb,
        when: enable_mariadb | bool }

- name: Apply role memcached
  gather_facts: false
  hosts:
    - memcached
    - '&enable_memcached_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Sam Yaple's avatar
Sam Yaple committed
    - { 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
    - prometheus-cadvisor
    - '&enable_prometheus_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: prometheus,
        tags: prometheus,
        when: enable_prometheus | bool }

- name: Apply role iscsi
  gather_facts: false
    - '&enable_iscsid_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
        when: enable_iscsid | bool }
- name: Apply role multipathd
  gather_facts: false
    - '&enable_multipathd_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: multipathd,
        tags: multipathd,
        when: enable_multipathd | bool }

- name: Apply role rabbitmq
  gather_facts: false
  hosts:
    - rabbitmq
    - '&enable_rabbitmq_True'
Sam Yaple's avatar
Sam Yaple committed
    - { role: rabbitmq,
        tags: rabbitmq,
        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 }}',
Sam Yaple's avatar
Sam Yaple committed
        when: enable_rabbitmq | bool }
- 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'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: qdrouterd,
        tags: qdrouterd,
        when: enable_qdrouterd | bool }

- name: Apply role etcd
  gather_facts: false
  hosts:
    - etcd
    - '&enable_etcd_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Hui Kang's avatar
Hui Kang committed
  roles:
    - { role: etcd,
        tags: etcd,
        when: enable_etcd | bool }

- name: Apply role keystone
  gather_facts: false
  hosts:
    - keystone
    - '&enable_keystone_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Fang Fenghua's avatar
Fang Fenghua committed
  roles:
Sam Yaple's avatar
Sam Yaple committed
    - { role: keystone,
        tags: keystone,
        when: enable_keystone | bool }
junbo's avatar
junbo committed
- name: Apply role ceph
  gather_facts: false
junbo's avatar
junbo committed
  hosts:
    - ceph-mds
    - ceph-mgr
junbo's avatar
junbo committed
    - ceph-mon
junbo's avatar
junbo committed
    - ceph-osd
    - ceph-rgw
    - '&enable_ceph_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
junbo's avatar
junbo committed
  roles:
    - { role: ceph,
        tags: ceph,
        when: enable_ceph | bool }

- name: Apply role kafka
  gather_facts: false
  hosts:
    - kafka
    - '&enable_kafka_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: kafka,
        tags: kafka,
        when: enable_kafka | bool }

- name: Apply role storm
  gather_facts: false
  hosts:
    - storm-worker
    - storm-nimbus
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: storm,
        tags: storm,
        when: enable_storm | bool }

caowei's avatar
caowei committed
- name: Apply role karbor
  gather_facts: false
  hosts:
    - karbor
    - '&enable_karbor_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
caowei's avatar
caowei committed
  roles:
    - { role: karbor,
        tags: karbor,
        when: enable_karbor | bool }

- name: Apply role swift
  gather_facts: false
Sam Yaple's avatar
Sam Yaple committed
    - swift-account-server
    - swift-container-server
    - swift-object-server
    - swift-proxy-server
    - '&enable_swift_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Sam Yaple's avatar
Sam Yaple committed
    - { role: swift,
        tags: swift,
        when: enable_swift | bool }
- name: Apply role glance
  gather_facts: false
Sam Yaple's avatar
Sam Yaple committed
    - ceph-mon
    - glance-api
    - glance-registry
    - '&enable_glance_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Sam Yaple's avatar
Sam Yaple committed
  roles:
Sam Yaple's avatar
Sam Yaple committed
    - { role: glance,
        tags: glance,
        when: enable_glance | bool }
- name: Apply role ironic
  gather_facts: false
    - ironic-api
    - ironic-conductor
    - ironic-inspector
    - ironic-pxe
    - '&enable_ironic_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  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
    - '&enable_cinder_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: cinder,
        tags: cinder,
        when: enable_cinder | bool }

- name: Apply role nova
  gather_facts: false
Sam Yaple's avatar
Sam Yaple committed
    - ceph-mon
    - compute
    - nova-api
    - nova-conductor
    - nova-consoleauth
    - nova-novncproxy
    - nova-scheduler
    - '&enable_nova_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
Sam Yaple's avatar
Sam Yaple committed
    - { role: nova,
        tags: nova,
        when: enable_nova | bool }
- name: Apply role opendaylight
  gather_facts: false
  hosts:
    - opendaylight
    - '&enable_opendaylight_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: opendaylight,
        tags: opendaylight,
        when: enable_opendaylight | bool }

- name: Apply role openvswitch
  gather_facts: false
  hosts:
    - openvswitch
    - '&enable_openvswitch_True_enable_ovs_dpdk_False'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: openvswitch,
        tags: openvswitch,
        when: "(enable_openvswitch | bool) and not (enable_ovs_dpdk | bool)"}

- name: Apply role ovs-dpdk
  gather_facts: false
  hosts:
    - openvswitch
    - '&enable_openvswitch_True_enable_ovs_dpdk_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: ovs-dpdk,
        tags: ovs-dpdk,
        when: "(enable_openvswitch | bool) and (enable_ovs_dpdk | bool)"}
- name: Apply role nova-hyperv
Dan Ardelean's avatar
Dan Ardelean committed
  gather_facts: false
  hosts:
    - hyperv
    - '&enable_hyperv_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Dan Ardelean's avatar
Dan Ardelean committed
  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
- name: Apply role neutron
  gather_facts: false
    - neutron-server
    - neutron-dhcp-agent
    - neutron-l3-agent
    - neutron-lbaas-agent
    - ironic-neutron-agent
    - neutron-metadata-agent
    - neutron-metering-agent
    - compute
    - manila-share
    - '&enable_neutron_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Sam Yaple's avatar
Sam Yaple committed
  roles:
Sam Yaple's avatar
Sam Yaple committed
    - { role: neutron,
        tags: neutron,
        when: enable_neutron | bool }
- name: Apply role kuryr
  gather_facts: false
    - '&enable_kuryr_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: kuryr,
        tags: kuryr,
        when: enable_kuryr | bool }

- name: Apply role heat
  gather_facts: false
Sam Yaple's avatar
Sam Yaple committed
    - heat-api
    - heat-api-cfn
    - heat-engine
    - '&enable_heat_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
Sam Yaple's avatar
Sam Yaple committed
    - { role: heat,
        tags: heat,
        when: enable_heat | bool }
- name: Apply role horizon
  gather_facts: false
    - '&enable_horizon_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
Sam Yaple's avatar
Sam Yaple committed
    - { role: horizon,
        tags: horizon,
        when: enable_horizon | bool }
- name: Apply role murano
  gather_facts: false
Sam Yaple's avatar
Sam Yaple committed
    - murano-api
    - murano-engine
    - '&enable_murano_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
Sam Yaple's avatar
Sam Yaple committed
    - { role: murano,
        tags: murano,
        when: enable_murano | bool }
- name: Apply role solum
  gather_facts: false
caowei's avatar
caowei committed
    - solum-api
    - solum-worker
    - solum-deployer
    - solum-conductor
    - '&enable_solum_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
caowei's avatar
caowei committed
  roles:
    - { role: solum,
        tags: solum,
        when: enable_solum | bool }

- name: Apply role magnum
  gather_facts: false
    - magnum-api
    - magnum-conductor
    - '&enable_magnum_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: magnum,
        tags: magnum,
        when: enable_magnum | bool }
- name: Apply role mistral
  gather_facts: false
    - mistral-api
    - mistral-engine
    - mistral-executor
    - '&enable_mistral_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: mistral,
        tags: mistral,
        when: enable_mistral | bool }
- name: Apply role sahara
  gather_facts: false
zhubingbing's avatar
zhubingbing committed
    - sahara-api
    - sahara-engine
    - '&enable_sahara_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
zhubingbing's avatar
zhubingbing committed
  roles:
    - { role: sahara,
        tags: sahara,
        when: enable_sahara | bool }

- name: Apply role mongodb
  gather_facts: false
    - mongodb
    - '&enable_mongodb_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: mongodb,
        tags: mongodb,
        when: enable_mongodb | bool }
- name: Apply role panko
  gather_facts: false
  hosts:
    - panko-api
    - '&enable_panko_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: panko,
        tags: panko,
        when: enable_panko | bool }

- name: Apply role manila
  gather_facts: false
    - manila-api
Mauricio Lima's avatar
Mauricio Lima committed
    - manila-data
    - manila-share
    - manila-scheduler
    - '&enable_manila_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: manila,
        tags: manila,
        when: enable_manila | bool }
- name: Apply role gnocchi
  gather_facts: false
zhubingbing's avatar
zhubingbing committed
    - gnocchi-api
    - gnocchi-metricd
    - gnocchi-statsd
    - '&enable_gnocchi_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
zhubingbing's avatar
zhubingbing committed
  roles:
    - { role: gnocchi,
        tags: gnocchi,
        when: enable_gnocchi | bool }

- name: Apply role ceilometer
  gather_facts: false
  vars_files:
    - "roles/panko/defaults/main.yml"
    - ceilometer-central
    - ceilometer-notification
    - ceilometer-compute
    - '&enable_ceilometer_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
  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
    - '&enable_monasca_True'
  serial: '{{ kolla_serial|default("0") }}'
  roles:
    - { role: monasca,
        tags: monasca,
        when: enable_monasca | bool }

- name: Apply role aodh
  gather_facts: false
    - aodh-api
    - aodh-evaluator
    - aodh-listener
    - aodh-notifier
    - '&enable_aodh_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
zhubingbing's avatar
zhubingbing committed
  roles:
    - { role: aodh,
        tags: aodh,
        when: enable_aodh | bool }

- name: Apply role barbican
  gather_facts: false
zhubingbing's avatar
zhubingbing committed
    - barbican-api
    - barbican-keystone-listener
    - barbican-worker
    - '&enable_barbican_True'
Jeffrey Zhang's avatar
Jeffrey Zhang committed
  serial: '{{ kolla_serial|default("0") }}'
zhubingbing's avatar
zhubingbing committed
  roles:
    - { role: barbican,
        tags: barbican,
        when: enable_barbican | bool }

- name: Apply role congress
  gather_facts: false