Performance: site.yml remove redundant 'when'

Facts define the group key to judge in incloud roles,
remove when statement does not execute to speed up execution

Partially-Implements: blueprint performance-improvements
Change-Id: If22255f1adc07ab16b46f8ad1280efdf7d713d28
This commit is contained in:
LinPeiWen 2022-04-25 18:40:55 +08:00
parent 756792e512
commit 322e288368

View File

@ -111,8 +111,7 @@
- keepalived
- loadbalancer
roles:
- { role: loadbalancer,
when: enable_loadbalancer | bool }
- { role: loadbalancer }
tasks:
- block:
- include_role:
@ -358,8 +357,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: collectd,
tags: collectd,
when: enable_collectd | bool }
tags: collectd }
- name: Apply role zookeeper
gather_facts: false
@ -369,8 +367,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: zookeeper,
tags: zookeeper,
when: enable_zookeeper | bool }
tags: zookeeper }
- name: Apply role influxdb
gather_facts: false
@ -380,8 +377,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: influxdb,
tags: influxdb,
when: enable_influxdb | bool }
tags: influxdb }
- name: Apply role telegraf
gather_facts: false
@ -391,8 +387,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: telegraf,
tags: telegraf,
when: enable_telegraf | bool }
tags: telegraf }
- name: Apply role redis
gather_facts: false
@ -402,8 +397,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: redis,
tags: redis,
when: enable_redis | bool }
tags: redis }
- name: Apply role mariadb
gather_facts: false
@ -412,8 +406,7 @@
- '&enable_mariadb_True'
roles:
- { role: mariadb,
tags: mariadb,
when: enable_mariadb | bool }
tags: mariadb }
- name: Apply role memcached
gather_facts: false
@ -423,8 +416,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: memcached,
tags: [memcache, memcached],
when: enable_memcached | bool }
tags: [memcache, memcached] }
- name: Apply role prometheus
gather_facts: false
@ -444,8 +436,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: prometheus,
tags: prometheus,
when: enable_prometheus | bool }
tags: prometheus }
- name: Apply role iscsi
gather_facts: false
@ -456,8 +447,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: iscsi,
tags: iscsi,
when: enable_iscsid | bool }
tags: iscsi }
- name: Apply role multipathd
gather_facts: false
@ -467,8 +457,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: multipathd,
tags: multipathd,
when: enable_multipathd | bool }
tags: multipathd }
- name: Apply role rabbitmq
gather_facts: false
@ -488,8 +477,7 @@
role_rabbitmq_password: '{{ rabbitmq_password }}',
role_rabbitmq_port: '{{ rabbitmq_port }}',
role_rabbitmq_prometheus_port: '{{ rabbitmq_prometheus_port }}',
role_rabbitmq_user: '{{ rabbitmq_user }}',
when: enable_rabbitmq | bool }
role_rabbitmq_user: '{{ rabbitmq_user }}' }
- name: Apply role rabbitmq (outward)
gather_facts: false
@ -508,8 +496,7 @@
role_rabbitmq_password: '{{ outward_rabbitmq_password }}',
role_rabbitmq_port: '{{ outward_rabbitmq_port }}',
role_rabbitmq_prometheus_port: '{{ outward_rabbitmq_prometheus_port }}',
role_rabbitmq_user: '{{ outward_rabbitmq_user }}',
when: enable_outward_rabbitmq | bool }
role_rabbitmq_user: '{{ outward_rabbitmq_user }}' }
- name: Apply role etcd
gather_facts: false
@ -519,8 +506,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: etcd,
tags: etcd,
when: enable_etcd | bool }
tags: etcd }
- name: Apply role keystone
gather_facts: false
@ -530,8 +516,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: keystone,
tags: keystone,
when: enable_keystone | bool }
tags: keystone }
- name: Apply role elasticsearch
gather_facts: false
@ -541,8 +526,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: elasticsearch,
tags: elasticsearch,
when: enable_elasticsearch | bool }
tags: elasticsearch }
- name: Apply role kibana
gather_facts: false
@ -552,8 +536,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: kibana,
tags: kibana,
when: enable_kibana | bool }
tags: kibana }
- name: Apply role kafka
gather_facts: false
@ -563,8 +546,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: kafka,
tags: kafka,
when: enable_kafka | bool }
tags: kafka }
- name: Apply role storm
gather_facts: false
@ -575,8 +557,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: storm,
tags: storm,
when: enable_storm | bool }
tags: storm }
- name: Apply role swift
gather_facts: false
@ -589,8 +570,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: swift,
tags: swift,
when: enable_swift | bool }
tags: swift }
- name: Apply role ceph-rgw
gather_facts: false
@ -602,8 +582,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: ceph-rgw,
tags: ceph-rgw,
when: enable_ceph_rgw | bool }
tags: ceph-rgw }
- name: Apply role glance
gather_facts: false
@ -613,8 +592,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: glance,
tags: glance,
when: enable_glance | bool }
tags: glance }
- name: Apply role ironic
gather_facts: false
@ -628,8 +606,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: ironic,
tags: ironic,
when: enable_ironic | bool }
tags: ironic }
- name: Apply role cinder
gather_facts: false
@ -642,8 +619,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: cinder,
tags: cinder,
when: enable_cinder | bool }
tags: cinder }
- name: Apply role placement
gather_facts: false
@ -653,8 +629,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: placement,
tags: placement,
when: enable_placement | bool }
tags: placement }
# Nova deployment is more complicated than other services, so is covered in its
# own playbook.
@ -693,8 +668,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: ovn,
tags: ovn,
when: enable_ovn | bool }
tags: ovn }
- name: Apply role neutron
gather_facts: false
@ -714,8 +688,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: neutron,
tags: neutron,
when: enable_neutron | bool }
tags: neutron }
- name: Apply role kuryr
gather_facts: false
@ -725,8 +698,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: kuryr,
tags: kuryr,
when: enable_kuryr | bool }
tags: kuryr }
- name: Apply role hacluster
gather_facts: false
@ -737,8 +709,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: hacluster,
tags: hacluster,
when: enable_hacluster | bool }
tags: hacluster }
- name: Apply role heat
gather_facts: false
@ -750,8 +721,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: heat,
tags: heat,
when: enable_heat | bool }
tags: heat }
- name: Apply role horizon
gather_facts: false
@ -761,8 +731,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: horizon,
tags: horizon,
when: enable_horizon | bool }
tags: horizon }
- name: Apply role murano
gather_facts: false
@ -773,8 +742,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: murano,
tags: murano,
when: enable_murano | bool }
tags: murano }
- name: Apply role solum
gather_facts: false
@ -789,8 +757,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: solum,
tags: solum,
when: enable_solum | bool }
tags: solum }
- name: Apply role magnum
gather_facts: false
@ -801,8 +768,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: magnum,
tags: magnum,
when: enable_magnum | bool }
tags: magnum }
- name: Apply role mistral
gather_facts: false
@ -815,8 +781,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: mistral,
tags: mistral,
when: enable_mistral | bool }
tags: mistral }
- name: Apply role sahara
gather_facts: false
@ -827,8 +792,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: sahara,
tags: sahara,
when: enable_sahara | bool }
tags: sahara }
- name: Apply role manila
gather_facts: false
@ -841,8 +805,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: manila,
tags: manila,
when: enable_manila | bool }
tags: manila }
- name: Apply role gnocchi
gather_facts: false
@ -854,8 +817,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: gnocchi,
tags: gnocchi,
when: enable_gnocchi | bool }
tags: gnocchi }
- name: Apply role ceilometer
gather_facts: false
@ -868,8 +830,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: ceilometer,
tags: ceilometer,
when: enable_ceilometer | bool }
tags: ceilometer }
- name: Apply role monasca
gather_facts: false
@ -887,8 +848,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: monasca,
tags: monasca,
when: enable_monasca | bool }
tags: monasca }
- name: Apply role aodh
gather_facts: false
@ -901,8 +861,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: aodh,
tags: aodh,
when: enable_aodh | bool }
tags: aodh }
- name: Apply role barbican
gather_facts: false
@ -914,8 +873,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: barbican,
tags: barbican,
when: enable_barbican | bool }
tags: barbican }
- name: Apply role cyborg
gather_facts: false
@ -927,8 +885,7 @@
serial: '{{ serial|default("0") }}'
roles:
- { role: cyborg,
tags: cyborg,
when: enable_cyborg | bool }
tags: cyborg }
- name: Apply role designate
gather_facts: false
@ -944,8 +901,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: designate,
tags: designate,
when: enable_designate | bool }
tags: designate }
- name: Apply role trove
gather_facts: false
@ -957,8 +913,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: trove,
tags: trove,
when: enable_trove | bool }
tags: trove }
- name: Apply role watcher
gather_facts: false
@ -970,8 +925,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: watcher,
tags: watcher,
when: enable_watcher | bool }
tags: watcher }
- name: Apply role grafana
gather_facts: false
@ -981,8 +935,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: grafana,
tags: grafana,
when: enable_grafana | bool }
tags: grafana }
- name: Apply role cloudkitty
gather_facts: false
@ -993,8 +946,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: cloudkitty,
tags: cloudkitty,
when: enable_cloudkitty | bool }
tags: cloudkitty }
- name: Apply role freezer
gather_facts: false
@ -1005,8 +957,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: freezer,
tags: freezer,
when: enable_freezer | bool }
tags: freezer }
- name: Apply role senlin
gather_facts: false
@ -1019,8 +970,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: senlin,
tags: senlin,
when: enable_senlin | bool }
tags: senlin }
- name: Apply role tacker
gather_facts: false
@ -1031,8 +981,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: tacker,
tags: tacker,
when: enable_tacker | bool }
tags: tacker }
- name: Apply role octavia
gather_facts: false
@ -1045,8 +994,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: octavia,
tags: octavia,
when: enable_octavia | bool }
tags: octavia }
- name: Apply role zun
gather_facts: false
@ -1059,8 +1007,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: zun,
tags: zun,
when: enable_zun | bool }
tags: zun }
- name: Apply role skydive
gather_facts: false
@ -1071,8 +1018,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: skydive,
tags: skydive,
when: enable_skydive | bool }
tags: skydive }
- name: Apply role vitrage
gather_facts: false
@ -1086,8 +1032,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: vitrage,
tags: vitrage,
when: enable_vitrage | bool }
tags: vitrage }
- name: Apply role blazar
gather_facts: false
@ -1098,8 +1043,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: blazar,
tags: blazar,
when: enable_blazar | bool }
tags: blazar }
- name: Apply role masakari
gather_facts: false
@ -1112,8 +1056,7 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: masakari,
tags: masakari,
when: enable_masakari | bool }
tags: masakari }
- name: Apply role venus
gather_facts: false
@ -1124,5 +1067,4 @@
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: venus,
tags: venus,
when: enable_venus | bool }
tags: venus }