Use group_names to check a host belongs to group

Change-Id: I64b6dadeafb062d70659d2944864780c86720c29
This commit is contained in:
Cuong Nguyen 2017-11-17 14:21:33 +07:00 committed by Jesse Pretorius (odyssey4me)
parent 3e7377b4df
commit d43068c4b5
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@
- ironic-config
- include: ironic_conductor_post_install.yml
when: inventory_hostname in groups['ironic_conductor']
when: "ironic_services['ironic-conductor']['group'] in group_names"
tags:
- ironic-config

View File

@ -20,10 +20,10 @@ ironic_packages_list: >
{%- if ironic_developer_mode | bool %}
{%- set package_list = package_list + ironic_developer_mode_distro_packages %}
{%- endif %}
{%- if inventory_hostname in groups['ironic_api'] %}
{%- if ironic_services['ironic-api']['group'] in group_names %}
{%- set package_list = package_list + ironic_api_distro_packages %}
{%- endif %}
{%- if inventory_hostname in groups['ironic_conductor'] %}
{%- if ironic_services['ironic-conductor']['group'] in group_names %}
{%- set package_list = package_list + ironic_conductor_distro_packages %}
{%- if ironic_standalone | bool %}
{%- set package_list = package_list + ironic_conductor_standalone_distro_packages %}