Use masakari-api group for setup tasks

Rather than use the 'all' group, use the masakari-api group.
This will becoe more important when the role extends to also
apply to compute nodes.

Co-Authored-By: Dmitriy R <dmitriy.r@sitevalley.com>
Change-Id: I434caf7d40385d481321c19748d91ecdcb6ae12e
This commit is contained in:
Jesse Pretorius 2018-07-27 14:56:37 +01:00 committed by Jesse Pretorius (odyssey4me)
parent e517634e1e
commit b0c609f90e
1 changed files with 6 additions and 5 deletions

View File

@ -43,7 +43,8 @@
- include_tasks: mq_setup.yml
when:
- inventory_hostname == groups['masakari_all'][0]
- "masakari_services['masakari-api']['group'] in group_names"
- "inventory_hostname == ((groups[masakari_services['masakari-api']['group']] | intersect(ansible_play_hosts)) | list)[0]"
with_items:
- oslomsg_setup_host: "{{ masakari_oslomsg_rpc_setup_host }}"
oslomsg_userid: "{{ masakari_oslomsg_rpc_userid }}"
@ -62,14 +63,14 @@
- include: masakari_db_setup.yml
static: no
when:
- inventory_hostname == groups['masakari_all'][0]
tags:
- masakari-config
- "masakari_services['masakari-api']['group'] in group_names"
- "inventory_hostname == ((groups[masakari_services['masakari-api']['group']] | intersect(ansible_play_hosts)) | list)[0]"
- include: masakari_service_setup.yml
static: no
when:
- inventory_hostname == groups['masakari_all'][0]
- "masakari_services['masakari-api']['group'] in group_names"
- "inventory_hostname == ((groups[masakari_services['masakari-api']['group']] | intersect(ansible_play_hosts)) | list)[0]"
tags:
- masakari-config