kolla-ansible/ansible/site.yml
2017-01-06 19:33:28 +00:00

529 lines
11 KiB
YAML

---
# 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
serial: '{{ serial|default("0") }}'
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
serial: '{{ serial|default("0") }}'
gather_facts: false
tasks:
- setup:
delegate_facts: True
delegate_to: "{{ item }}"
with_items: "{{ groups['all'] }}"
when:
- (play_hosts | length) != (groups['all'] | length)
- name: Apply role prechecks
hosts:
- all
roles:
- role: prechecks
when: action == "precheck"
- name: Apply role collectd
hosts: collectd
serial: '{{ serial|default("0") }}'
roles:
- { role: collectd,
tags: collectd,
when: enable_collectd | bool }
- name: Apply role elasticsearch
hosts: elasticsearch
serial: '{{ serial|default("0") }}'
roles:
- { role: elasticsearch,
tags: elasticsearch,
when: enable_elasticsearch | bool }
- name: Apply role influxdb
hosts: influxdb
serial: '{{ serial|default("0") }}'
roles:
- { role: influxdb,
tags: influxdb,
when: enable_influxdb | bool }
- name: Apply role telegraf
hosts:
- telegraf
serial: '{{ serial|default("0") }}'
roles:
- { role: telegraf,
tags: telegraf,
when: enable_telegraf | bool }
- name: Apply role haproxy
hosts:
- haproxy
roles:
- { role: haproxy,
tags: haproxy,
when: enable_haproxy | bool }
- name: Apply role kibana
hosts: kibana
serial: '{{ serial|default("0") }}'
roles:
- { role: kibana,
tags: kibana,
when: enable_kibana | bool }
- name: Apply role memcached
hosts: memcached
serial: '{{ serial|default("0") }}'
roles:
- { role: memcached,
tags: [memcache, memcached],
when: enable_memcached | bool }
- name: Apply role mariadb
hosts: mariadb
serial: '{{ serial|default("0") }}'
roles:
- { role: mariadb,
tags: mariadb,
when: enable_mariadb | bool }
- name: Apply role iscsi
hosts:
- iscsid
- tgtd
serial: '{{ serial|default("0") }}'
roles:
- { role: iscsi,
tags: iscsi,
when: enable_iscsid | bool }
- name: Apply role multipathd
hosts:
- multipathd
serial: '{{ serial|default("0") }}'
roles:
- { role: multipathd,
tags: multipathd,
when: enable_multipathd | bool }
- name: Apply role rabbitmq
hosts: rabbitmq
roles:
- { role: rabbitmq,
tags: rabbitmq,
when: enable_rabbitmq | bool }
- name: Apply role etcd
hosts: etcd
serial: '{{ serial|default("0") }}'
roles:
- { role: etcd,
tags: etcd,
when: enable_etcd | bool }
- name: Apply role keystone
hosts: keystone
serial: '{{ serial|default("0") }}'
roles:
- { role: keystone,
tags: keystone,
when: enable_keystone | bool }
- name: Apply role ceph
hosts:
- ceph-mon
- ceph-osd
- ceph-rgw
serial: '{{ serial|default("0") }}'
roles:
- { role: ceph,
tags: ceph,
when: enable_ceph | bool }
- name: Apply role karbor
hosts: karbor
serial: '{{ serial|default("0") }}'
roles:
- { role: karbor,
tags: karbor,
when: enable_karbor | bool }
- name: Apply role swift
hosts:
- swift-account-server
- swift-container-server
- swift-object-server
- swift-proxy-server
serial: '{{ serial|default("0") }}'
roles:
- { role: swift,
tags: swift,
when: enable_swift | bool }
- name: Apply role glance
hosts:
- ceph-mon
- glance-api
- glance-registry
serial: '{{ serial|default("0") }}'
roles:
- { role: glance,
tags: glance,
when: enable_glance | bool }
- name: Apply role ironic
hosts:
- ironic-api
- ironic-conductor
- ironic-inspector
- ironic-pxe
serial: '{{ serial|default("0") }}'
roles:
- { role: ironic,
tags: ironic,
when: enable_ironic | bool }
- name: Apply role nova
hosts:
- ceph-mon
- compute
- nova-api
- nova-conductor
- nova-consoleauth
- nova-novncproxy
- nova-scheduler
serial: '{{ serial|default("0") }}'
roles:
- { role: nova,
tags: nova,
when: enable_nova | bool }
- name: Apply role panko
hosts: panko-api
serial: '{{ serial|default("0") }}'
roles:
- { role: panko,
tags: panko,
when: enable_panko | bool }
- name: Apply role kuryr
hosts:
- compute
roles:
- { role: kuryr,
tags: kuryr,
when: enable_kuryr | bool }
# (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
hosts:
- neutron-server
- neutron-dhcp-agent
- neutron-l3-agent
- neutron-lbaas-agent
- neutron-metadata-agent
- neutron-vpnaas-agent
- compute
- manila-share
serial: '{{ serial|default("0") }}'
roles:
- { role: neutron,
tags: neutron,
when: enable_neutron | bool }
- name: Apply role cinder
hosts:
- ceph-mon
- cinder-api
- cinder-backup
- cinder-scheduler
- cinder-volume
serial: '{{ serial|default("0") }}'
roles:
- { role: cinder,
tags: cinder,
when: enable_cinder | bool }
- name: Apply role heat
hosts:
- heat-api
- heat-api-cfn
- heat-engine
serial: '{{ serial|default("0") }}'
roles:
- { role: heat,
tags: heat,
when: enable_heat | bool }
- name: Apply role horizon
hosts:
- horizon
serial: '{{ serial|default("0") }}'
roles:
- { role: horizon,
tags: horizon,
when: enable_horizon | bool }
- name: Apply role murano
hosts:
- murano-api
- murano-engine
serial: '{{ serial|default("0") }}'
roles:
- { role: murano,
tags: murano,
when: enable_murano | bool }
- name: Apply role solum
hosts:
- solum-api
- solum-worker
- solum-deployer
- solum-conductor
serial: '{{ serial|default("0") }}'
roles:
- { role: solum,
tags: solum,
when: enable_solum | bool }
- name: Apply role magnum
hosts:
- magnum-api
- magnum-conductor
serial: '{{ serial|default("0") }}'
roles:
- { role: magnum,
tags: magnum,
when: enable_magnum | bool }
- name: Apply role mistral
hosts:
- mistral-api
- mistral-engine
- mistral-executor
serial: '{{ serial|default("0") }}'
roles:
- { role: mistral,
tags: mistral,
when: enable_mistral | bool }
- name: Apply role sahara
hosts:
- sahara-api
- sahara-engine
serial: '{{ serial|default("0") }}'
roles:
- { role: sahara,
tags: sahara,
when: enable_sahara | bool }
- name: Apply role mongodb
hosts:
- mongodb
serial: '{{ serial|default("0") }}'
roles:
- { role: mongodb,
tags: mongodb,
when: enable_mongodb | bool }
- name: Apply role manila
hosts:
- manila-api
- manila-data
- manila-share
- manila-scheduler
serial: '{{ serial|default("0") }}'
roles:
- { role: manila,
tags: manila,
when: enable_manila | bool }
- name: Apply role gnocchi
hosts:
- gnocchi-api
- gnocchi-metricd
- gnocchi-statsd
serial: '{{ serial|default("0") }}'
roles:
- { role: gnocchi,
tags: gnocchi,
when: enable_gnocchi | bool }
- name: Apply role ceilometer
hosts:
- ceilometer
- compute
serial: '{{ serial|default("0") }}'
roles:
- { role: ceilometer,
tags: ceilometer,
when: enable_ceilometer | bool }
- name: Apply role aodh
hosts:
- aodh
serial: '{{ serial|default("0") }}'
roles:
- { role: aodh,
tags: aodh,
when: enable_aodh | bool }
- name: Apply role barbican
hosts:
- barbican-api
- barbican-keystone-listener
- barbican-worker
serial: '{{ serial|default("0") }}'
roles:
- { role: barbican,
tags: barbican,
when: enable_barbican | bool }
- name: Apply role congress
hosts:
- congress-api
- congress-policy-engine
- congress-datasource
serial: '{{ serial|default("0") }}'
roles:
- { role: congress,
tags: congress,
when: enable_congress | bool }
- name: Apply role tempest
hosts:
- tempest
serial: '{{ serial|default("0") }}'
roles:
- { role: tempest,
tags: tempest,
when: enable_tempest | bool }
- name: Apply role designate
hosts:
- designate-api
- designate-central
- designate-mdns
- designate-worker
- designate-sink
serial: '{{ serial|default("0") }}'
roles:
- { role: designate,
tags: designate,
when: enable_designate | bool }
- name: Apply role rally
hosts: rally
serial: '{{ serial|default("0") }}'
roles:
- { role: rally,
tags: rally,
when: enable_rally | bool }
- name: Apply role vmtp
hosts:
- vmtp
serial: '{{ serial|default("0") }}'
roles:
- { role: vmtp,
tags: vmtp,
when: enable_vmtp | bool }
- name: Apply role trove
hosts:
- trove-api
- trove-conductor
- trove-taskmanager
serial: '{{ serial|default("0") }}'
roles:
- { role: trove,
tags: trove,
when: enable_trove | bool }
- name: Apply role watcher
hosts:
- watcher-api
- watcher-engine
- watcher-applier
serial: '{{ serial|default("0") }}'
roles:
- { role: watcher,
tags: watcher,
when: enable_watcher | bool }
- name: Apply role grafana
hosts:
- grafana
serial: '{{ serial|default("0") }}'
roles:
- { role: grafana,
tags: grafana,
when: enable_grafana | bool }
- name: Apply role cloudkitty
hosts:
- cloudkitty-api
- cloudkitty-processor
serial: '{{ serial|default("0") }}'
roles:
- { role: cloudkitty,
tags: cloudkitty,
when: enable_cloudkitty | bool }
- name: Apply role senlin
hosts:
- senlin-api
- senlin-engine
serial: '{{ serial|default("0") }}'
roles:
- { role: senlin,
tags: senlin,
when: enable_senlin | bool }
- name: Apply role searchlight
hosts:
- searchlight-api
- searchlight-listener
serial: '{{ serial|default("0") }}'
roles:
- { role: searchlight,
tags: searchlight,
when: enable_searchlight | bool }
- name: Apply role tacker
hosts: tacker
serial: '{{ serial|default("0") }}'
roles:
- { role: tacker,
tags: tacker,
when: enable_tacker | bool }
- name: Apply role octavia
hosts:
- octavia-api
- octavia-health-manager
- octavia-housekeeping
- octavia-worker
serial: '{{ serial|default("0") }}'
roles:
- { role: octavia,
tags: octavia,
when: enable_octavia | bool }