Make nova manage options version specific
Change-Id: Iedb2d8424885609046f1b4852e964c8d154ced4b
Related-Prod: https://mirantis.jira.com/browse/PROD-29403
(cherry picked from commit 5f7178176b150b56fc91d527032e9f59d6019371)
diff --git a/nova/controller.sls b/nova/controller.sls
index cf342ae..dfd33ff 100644
--- a/nova/controller.sls
+++ b/nova/controller.sls
@@ -2,6 +2,11 @@
{%- if controller.get('enabled') %}
+{%- set nova_manage_cell_v2_discover_hosts_args = ["--verbose"] %}
+{%- if controller.version not in ["juno", "kilo", "liberty", "mitaka", "newton", "ocata"] %}
+{%- do nova_manage_cell_v2_discover_hosts_args.append("--by-service") %}
+{%- endif %}
+
include:
{%- if controller.version not in ["juno", "kilo", "liberty", "mitaka", "newton"] %}
- apache
@@ -458,7 +463,7 @@
nova_controller_discover_hosts:
cmd.run:
- - name: nova-manage cell_v2 discover_hosts --verbose --by-service
+ - name: nova-manage cell_v2 discover_hosts {{ nova_manage_cell_v2_discover_hosts_args | join(' ') }}
{%- if grains.get('noservices') %}
- onlyif: /bin/false
{%- endif %}