4a127d4bd9
'in' expresion matches substrings, therefore it is possible that following expression will fail: inventory_hostname in groups['groupname'][0] for example when: inventory_hostname = 'my-host-a' groups['groupname'][0] = 'my-host-a1' The result is running task on multiple hosts rather than single one. Such action might result in playbook failure Change-Id: Ibe2d5ca2f9502a8140a895ab3ac7abc5076ce2ff Signed-off-by: Maciej Kucia <m.kucia@partner.samsung.com>
25 lines
831 B
YAML
25 lines
831 B
YAML
---
|
|
- include_tasks: register.yml
|
|
when: inventory_hostname in groups['designate-api']
|
|
|
|
- include_tasks: config.yml
|
|
when: inventory_hostname in groups['designate-api'] or
|
|
inventory_hostname in groups['designate-central'] or
|
|
inventory_hostname in groups['designate-producer'] or
|
|
inventory_hostname in groups['designate-mdns'] or
|
|
inventory_hostname in groups['designate-worker'] or
|
|
inventory_hostname in groups['designate-sink'] or
|
|
inventory_hostname in groups['designate-backend-bind9']
|
|
|
|
- include_tasks: clone.yml
|
|
when: designate_dev_mode | bool
|
|
|
|
- include_tasks: bootstrap.yml
|
|
when: inventory_hostname in groups['designate-central']
|
|
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|
|
|
|
- include_tasks: update_pools.yml
|
|
when: inventory_hostname == groups['designate-worker'][0]
|