diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-02-18 15:38:07 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-02-18 15:39:57 +0100 |
commit | 94f99be1ddd263506231ec5b72b576a6c63d82c6 (patch) | |
tree | a5242fd478aa54d78bb37792f6b51c906cdc3cea /config/installers/fuel | |
parent | d387c6a0b3fc3637b230edc987c45bce2e0ff3a3 (diff) |
[fuel] Skip baremetal cmp cfg if scenario lacks it
Some upcoming scenarios do not define any compute nodes, so
skip adding the nodes to MaaS machine list too.
Change-Id: I895d8c7cb54783a57667d20f672b8ff870105cfc
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'config/installers/fuel')
-rw-r--r-- | config/installers/fuel/pod_config.yml.j2 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2 index edb63eec..7f53b59c 100644 --- a/config/installers/fuel/pod_config.yml.j2 +++ b/config/installers/fuel/pod_config.yml.j2 @@ -13,9 +13,10 @@ parameters: region: machines: {%- set ctl_roles = 3 if 'virtual' not in conf else conf.virtual.nodes.control | length %} + {%- set has_cmp = True if 'virtual' not in conf else 'compute' in conf.virtual.nodes %} {%- for node in conf.nodes %} {%- if (node.node.type == 'baremetal' and ( - loop.index > nm.cmp001.idx or loop.index0 < ctl_roles)) %} + (has_cmp and loop.index > nm.cmp001.idx) or loop.index0 < ctl_roles)) %} {%- if loop.index > nm.cmp001.idx %} cmp{{ '%03d' | format(loop.index - nm.cmp001.idx) }}: {%- elif 'virtual' not in conf %} {#- strictly for Pharos verify job #} |