Fix cell_v2 discover_hosts when Ironic enabled

When Ironic used the 'cell_v2 discover_hosts' should be executed
with '--by-service' option, otherwise the hosts doesn't discoverd.

Change-Id: I213be691187b261523c2d3b1c51b2da8a50b412a
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This commit is contained in:
Maksim Malchuk 2019-07-24 18:51:31 +03:00
parent 05fa8b3ff5
commit 8af53d4f9b
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
# This needs to be done after Compute hosts are added.
- name: Perform a cell_v2 discover
command: "{{ _db_nova_bin }}/nova-manage cell_v2 discover_hosts {{ (debug | bool) | ternary('--verbose', '') }}"
command: "{{ _db_nova_bin }}/nova-manage cell_v2 discover_hosts{{ (debug | bool) | ternary(' --verbose', '') }}{{ (nova_virt_type == 'ironic') | ternary(' --by-service', '') }}"
become: yes
become_user: "{{ _db_nova_system_user_name }}"
changed_when: false