commit c92325d0102da4b7b377e89f491cbaa299d17dc0 Author: Mark Goddard Date: Tue Jul 7 17:14:37 2020 +0100 Performance: use import_tasks for register and bootstrap Including tasks has a performance penalty when compared with importing tasks. If the include has a condition associated with it, then the overhead of the include may be lower than the overhead of skipping all imported tasks. In the case of the register.yml and bootstrap.yml includes, all of the tasks in the included file use run_once: True. The run_once flag improves performance at scale drastically, so importing these tasks unconditionally will have a lower overhead than a conditional include task. It therefore makes sense to switch to use import_tasks there. See [1] for benchmarks of run_once. [1] https://github.com/stackhpc/ansible-scaling/blob/master/doc/run-once.md Change-Id: Ic67631ca3ea3fb2081a6f8978e85b1522522d40d Partially-Implements: blueprint performance-improvements (cherry picked from commit 496904d650d340cd78fd0bd3f1863a38e6661633) diff --git a/ansible/roles/aodh/tasks/deploy.yml b/ansible/roles/aodh/tasks/deploy.yml index 6898309..df86282 100644 --- a/ansible/roles/aodh/tasks/deploy.yml +++ b/ansible/roles/aodh/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['aodh-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: aodh_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['aodh-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/barbican/tasks/deploy.yml b/ansible/roles/barbican/tasks/deploy.yml index c46a0a0..c16604a 100644 --- a/ansible/roles/barbican/tasks/deploy.yml +++ b/ansible/roles/barbican/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['barbican-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: barbican_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['barbican-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/blazar/tasks/deploy.yml b/ansible/roles/blazar/tasks/deploy.yml index 66a0ade..a2b0cf2 100644 --- a/ansible/roles/blazar/tasks/deploy.yml +++ b/ansible/roles/blazar/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['blazar-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: blazar_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['blazar-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/ceilometer/tasks/deploy.yml b/ansible/roles/ceilometer/tasks/deploy.yml index 8748d35..e743691 100644 --- a/ansible/roles/ceilometer/tasks/deploy.yml +++ b/ansible/roles/ceilometer/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['ceilometer'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: ceilometer_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['ceilometer'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/cinder/tasks/deploy.yml b/ansible/roles/cinder/tasks/deploy.yml index ed8e556..07aa8b8 100644 --- a/ansible/roles/cinder/tasks/deploy.yml +++ b/ansible/roles/cinder/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['cinder-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: cinder_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['cinder-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/cloudkitty/tasks/bootstrap.yml b/ansible/roles/cloudkitty/tasks/bootstrap.yml index 29790ab..f066333 100644 --- a/ansible/roles/cloudkitty/tasks/bootstrap.yml +++ b/ansible/roles/cloudkitty/tasks/bootstrap.yml @@ -41,6 +41,8 @@ hostname: "{{ influxdb_address }}" port: "{{ influxdb_http_port }}" database_name: "{{ cloudkitty_influxdb_name }}" + run_once: True + delegate_to: "{{ groups['cloudkitty-api'][0] }}" when: cloudkitty_storage_backend == 'influxdb' - import_tasks: bootstrap_service.yml diff --git a/ansible/roles/cloudkitty/tasks/deploy.yml b/ansible/roles/cloudkitty/tasks/deploy.yml index 64c2a41..5ecbdb8 100644 --- a/ansible/roles/cloudkitty/tasks/deploy.yml +++ b/ansible/roles/cloudkitty/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['cloudkitty-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: cloudkitty_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['cloudkitty-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/cyborg/tasks/deploy.yml b/ansible/roles/cyborg/tasks/deploy.yml index e4ed69f..19c518a 100644 --- a/ansible/roles/cyborg/tasks/deploy.yml +++ b/ansible/roles/cyborg/tasks/deploy.yml @@ -1,11 +1,9 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['cyborg-api'] +- import_tasks: register.yml - import_tasks: config.yml -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['cyborg-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/designate/tasks/deploy.yml b/ansible/roles/designate/tasks/deploy.yml index 26e67ca..b6ec40d 100644 --- a/ansible/roles/designate/tasks/deploy.yml +++ b/ansible/roles/designate/tasks/deploy.yml @@ -1,17 +1,14 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['designate-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: designate_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['designate-central'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers -- include_tasks: update_pools.yml - when: inventory_hostname == groups['designate-worker'][0] +- import_tasks: update_pools.yml diff --git a/ansible/roles/designate/tasks/update_pools.yml b/ansible/roles/designate/tasks/update_pools.yml index 21d29ee..d89c684 100644 --- a/ansible/roles/designate/tasks/update_pools.yml +++ b/ansible/roles/designate/tasks/update_pools.yml @@ -2,4 +2,5 @@ - name: Update DNS pools become: true command: docker exec -t designate_worker designate-manage pool update --file /etc/designate/pools.yaml - when: inventory_hostname == groups['designate-worker'][0] + run_once: True + delegate_to: "{{ groups['designate-worker'][0] }}" diff --git a/ansible/roles/freezer/tasks/bootstrap.yml b/ansible/roles/freezer/tasks/bootstrap.yml index 39aec53..3399447 100644 --- a/ansible/roles/freezer/tasks/bootstrap.yml +++ b/ansible/roles/freezer/tasks/bootstrap.yml @@ -12,6 +12,7 @@ run_once: True delegate_to: "{{ groups['freezer-api'][0] }}" when: + - freezer_database_backend == 'mariadb' - not use_preconfigured_databases | bool - name: Creating Freezer database user and setting permissions @@ -31,6 +32,7 @@ run_once: True delegate_to: "{{ groups['freezer-api'][0] }}" when: + - freezer_database_backend == 'mariadb' - not use_preconfigured_databases | bool - import_tasks: bootstrap_service.yml diff --git a/ansible/roles/freezer/tasks/deploy.yml b/ansible/roles/freezer/tasks/deploy.yml index 426ec16..e33a163 100644 --- a/ansible/roles/freezer/tasks/deploy.yml +++ b/ansible/roles/freezer/tasks/deploy.yml @@ -1,17 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['freezer-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: freezer_dev_mode | bool -- include_tasks: bootstrap.yml - when: freezer_database_backend == 'mariadb' and inventory_hostname in groups['freezer-api'] - -- include_tasks: bootstrap_service.yml - when: inventory_hostname in groups['freezer-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/gnocchi/tasks/deploy.yml b/ansible/roles/gnocchi/tasks/deploy.yml index 04c4890..19c518a 100644 --- a/ansible/roles/gnocchi/tasks/deploy.yml +++ b/ansible/roles/gnocchi/tasks/deploy.yml @@ -1,11 +1,9 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['gnocchi-api'] +- import_tasks: register.yml - import_tasks: config.yml -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['gnocchi-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/heat/tasks/deploy.yml b/ansible/roles/heat/tasks/deploy.yml index 9d87180..1adc6a8 100644 --- a/ansible/roles/heat/tasks/deploy.yml +++ b/ansible/roles/heat/tasks/deploy.yml @@ -1,6 +1,5 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['heat-api'] +- import_tasks: register.yml - import_tasks: config.yml @@ -8,8 +7,7 @@ when: - heat_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['heat-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/ironic/tasks/deploy.yml b/ansible/roles/ironic/tasks/deploy.yml index 2e31fd5..1d0a639 100644 --- a/ansible/roles/ironic/tasks/deploy.yml +++ b/ansible/roles/ironic/tasks/deploy.yml @@ -1,8 +1,6 @@ --- -- include_tasks: register.yml - when: enable_keystone | bool and - (inventory_hostname in groups['ironic-api'] or - inventory_hostname in groups['ironic-inspector']) +- import_tasks: register.yml + when: enable_keystone | bool - import_tasks: config-host.yml @@ -11,10 +9,7 @@ - include_tasks: clone.yml when: ironic_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['ironic-api'] or - inventory_hostname in groups['ironic-inspector'] or - inventory_hostname in groups['ironic-pxe'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/karbor/tasks/deploy.yml b/ansible/roles/karbor/tasks/deploy.yml index e9b54a0..19c518a 100644 --- a/ansible/roles/karbor/tasks/deploy.yml +++ b/ansible/roles/karbor/tasks/deploy.yml @@ -1,11 +1,9 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['karbor-api'] +- import_tasks: register.yml - import_tasks: config.yml -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['karbor-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/magnum/tasks/deploy.yml b/ansible/roles/magnum/tasks/deploy.yml index 75b8916..8b4eba8 100644 --- a/ansible/roles/magnum/tasks/deploy.yml +++ b/ansible/roles/magnum/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['magnum-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: magnum_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['magnum-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/manila/tasks/deploy.yml b/ansible/roles/manila/tasks/deploy.yml index c0360bd..94a68a6 100644 --- a/ansible/roles/manila/tasks/deploy.yml +++ b/ansible/roles/manila/tasks/deploy.yml @@ -2,13 +2,11 @@ - include_tasks: clone.yml when: manila_dev_mode | bool -- include_tasks: register.yml - when: inventory_hostname in groups['manila-api'] +- import_tasks: register.yml - import_tasks: config.yml -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['manila-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/masakari/tasks/deploy.yml b/ansible/roles/masakari/tasks/deploy.yml index 158af3a..90cb893 100644 --- a/ansible/roles/masakari/tasks/deploy.yml +++ b/ansible/roles/masakari/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['masakari-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: masakari_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['masakari-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/mistral/tasks/deploy.yml b/ansible/roles/mistral/tasks/deploy.yml index 58aa4e1..05886fc 100644 --- a/ansible/roles/mistral/tasks/deploy.yml +++ b/ansible/roles/mistral/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['mistral-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: mistral_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['mistral-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/monasca/tasks/deploy.yml b/ansible/roles/monasca/tasks/deploy.yml index 3b9525e..b3912ad 100644 --- a/ansible/roles/monasca/tasks/deploy.yml +++ b/ansible/roles/monasca/tasks/deploy.yml @@ -1,14 +1,9 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['monasca-agent'] or - inventory_hostname in groups['monasca-api'] or - inventory_hostname in groups['monasca-log-api'] +- import_tasks: register.yml - import_tasks: config.yml -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['monasca-api'] or - inventory_hostname in groups['monasca-grafana'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/murano/tasks/deploy.yml b/ansible/roles/murano/tasks/deploy.yml index dff474d..7c092c2 100644 --- a/ansible/roles/murano/tasks/deploy.yml +++ b/ansible/roles/murano/tasks/deploy.yml @@ -1,6 +1,5 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['murano-api'] +- import_tasks: register.yml - import_tasks: config.yml @@ -8,8 +7,7 @@ when: - murano_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['murano-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/neutron/tasks/deploy.yml b/ansible/roles/neutron/tasks/deploy.yml index fd69598..70ec741 100644 --- a/ansible/roles/neutron/tasks/deploy.yml +++ b/ansible/roles/neutron/tasks/deploy.yml @@ -1,6 +1,5 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['neutron-server'] +- import_tasks: register.yml - include_tasks: clone.yml when: neutron_dev_mode | bool @@ -14,8 +13,7 @@ - enable_nova_fake | bool - inventory_hostname in groups['compute'] -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['neutron-server'] +- import_tasks: bootstrap.yml - name: Flush Handlers meta: flush_handlers diff --git a/ansible/roles/nova/tasks/deploy.yml b/ansible/roles/nova/tasks/deploy.yml index 96549f4..aa0718b 100644 --- a/ansible/roles/nova/tasks/deploy.yml +++ b/ansible/roles/nova/tasks/deploy.yml @@ -1,6 +1,5 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['nova-api'] +- import_tasks: register.yml - import_tasks: config.yml diff --git a/ansible/roles/octavia/tasks/deploy.yml b/ansible/roles/octavia/tasks/deploy.yml index 2018b79..19c518a 100644 --- a/ansible/roles/octavia/tasks/deploy.yml +++ b/ansible/roles/octavia/tasks/deploy.yml @@ -1,11 +1,9 @@ --- -- include_tasks: "register.yml" - when: inventory_hostname in groups['octavia-api'] +- import_tasks: register.yml - import_tasks: config.yml -- include_tasks: "bootstrap.yml" - when: inventory_hostname in groups['octavia-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/placement/tasks/deploy.yml b/ansible/roles/placement/tasks/deploy.yml index 5b5a905..035a67e 100644 --- a/ansible/roles/placement/tasks/deploy.yml +++ b/ansible/roles/placement/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['placement-api'] +- import_tasks: register.yml - include_tasks: clone.yml when: placement_dev_mode | bool - import_tasks: config.yml -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['placement-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/placement/tasks/upgrade.yml b/ansible/roles/placement/tasks/upgrade.yml index 3968fe7..06be0b3 100644 --- a/ansible/roles/placement/tasks/upgrade.yml +++ b/ansible/roles/placement/tasks/upgrade.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['placement-api'] +- import_tasks: register.yml - include_tasks: clone.yml when: placement_dev_mode | bool - import_tasks: config.yml -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['placement-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/qinling/tasks/deploy.yml b/ansible/roles/qinling/tasks/deploy.yml index 63525f2..4316e67 100644 --- a/ansible/roles/qinling/tasks/deploy.yml +++ b/ansible/roles/qinling/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['qinling-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: qinling_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['qinling-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/sahara/tasks/deploy.yml b/ansible/roles/sahara/tasks/deploy.yml index 5d2fdc7..c859769 100644 --- a/ansible/roles/sahara/tasks/deploy.yml +++ b/ansible/roles/sahara/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['sahara-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: sahara_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['sahara-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/senlin/tasks/deploy.yml b/ansible/roles/senlin/tasks/deploy.yml index 9b4d96e..9abd1ce 100644 --- a/ansible/roles/senlin/tasks/deploy.yml +++ b/ansible/roles/senlin/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['senlin-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: senlin_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['senlin-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/solum/tasks/deploy.yml b/ansible/roles/solum/tasks/deploy.yml index 13c6259..e888713 100644 --- a/ansible/roles/solum/tasks/deploy.yml +++ b/ansible/roles/solum/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['solum-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: solum_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['solum-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/tacker/tasks/deploy.yml b/ansible/roles/tacker/tasks/deploy.yml index 3628da2..743fb8c 100644 --- a/ansible/roles/tacker/tasks/deploy.yml +++ b/ansible/roles/tacker/tasks/deploy.yml @@ -1,6 +1,5 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['tacker-server'] +- import_tasks: register.yml - import_tasks: config.yml @@ -8,8 +7,7 @@ when: - tacker_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['tacker-server'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/trove/tasks/deploy.yml b/ansible/roles/trove/tasks/deploy.yml index 514f837..1a845e8 100644 --- a/ansible/roles/trove/tasks/deploy.yml +++ b/ansible/roles/trove/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['trove-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: trove_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['trove-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/vitrage/tasks/deploy.yml b/ansible/roles/vitrage/tasks/deploy.yml index 726289a..91e701b 100644 --- a/ansible/roles/vitrage/tasks/deploy.yml +++ b/ansible/roles/vitrage/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['vitrage-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: vitrage_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['vitrage-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/watcher/tasks/deploy.yml b/ansible/roles/watcher/tasks/deploy.yml index f04b4bc..650560a 100644 --- a/ansible/roles/watcher/tasks/deploy.yml +++ b/ansible/roles/watcher/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['watcher-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: watcher_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['watcher-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/zun/tasks/deploy.yml b/ansible/roles/zun/tasks/deploy.yml index 574c5c6..85e2a8b 100644 --- a/ansible/roles/zun/tasks/deploy.yml +++ b/ansible/roles/zun/tasks/deploy.yml @@ -1,14 +1,12 @@ --- -- include_tasks: register.yml - when: inventory_hostname in groups['zun-api'] +- import_tasks: register.yml - import_tasks: config.yml - include_tasks: clone.yml when: zun_dev_mode | bool -- include_tasks: bootstrap.yml - when: inventory_hostname in groups['zun-api'] +- import_tasks: bootstrap.yml - name: Flush handlers meta: flush_handlers