c9991c2e31
With I57047682cfa82ba6ca4affff54fab5216e9ba51c Heat has added a new template version for wallaby. This would allow us to use 2-argument variant of the ``if`` function that would allow for e.g. conditional definition of resource properties and help cleanup templates. If only two arguments are passed to ``if`` function, the entire enclosing item is removed when the condition is false. Change-Id: I25f981b60c6a66b39919adc38c02a051b6c51269
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
heat_template_version: wallaby
|
|
|
|
description: >
|
|
DEPRECATED! Configure os-net-config mappings for specific nodes
|
|
|
|
DEPRECATION NOTE:
|
|
This template has been replaced by an ansible module in tripleo-ansible.
|
|
The parameter NetConfigDataLookup is still used, and the input format remain the same for compatibility.
|
|
|
|
parameters:
|
|
# Note this requires a liberty heat or newer in the undercloud due to
|
|
# the 2015-10-15 (which is required to enable str_replace serializing
|
|
# the json parameter to json, another approch with a string parameter
|
|
# will be required for older heat versions)
|
|
NetConfigDataLookup:
|
|
type: json
|
|
default: {}
|
|
description: >
|
|
Configure os-net-config mappings for specific nodes
|
|
Your environment file needs to look like:
|
|
parameter_defaults:
|
|
NetConfigDataLookup:
|
|
node1:
|
|
nic1: "00:c8:7c:e6:f0:2e"
|
|
node2:
|
|
nic1: "00:18:7d:99:0c:b6"
|
|
node3:
|
|
dmiString: 'system-uuid'
|
|
id: 'A8C85861-1B16-4803-8689-AFC62984F8F6'
|
|
nic1: em3
|
|
# Dell PowerEdge
|
|
nodegroup1:
|
|
dmiString: "system-product-name"
|
|
id: "PowerEdge R630"
|
|
nic1: em3
|
|
nic2: em1
|
|
nic3: em2
|
|
# Cisco UCS B200-M4"
|
|
nodegroup2:
|
|
dmiString: "system-product-name"
|
|
id: "UCSB-B200-M4"
|
|
nic1: enp7s0
|
|
nic2: enp6s0
|
|
|
|
This will result in the first node* entry where either a mac matches a
|
|
local device or a DMI String matches the specified id being written as a
|
|
mapping file for os-net-config. (/etc/os-net-config/mapping.yaml)
|
|
|
|
resources:
|
|
OsNetConfigMappings:
|
|
type: OS::Heat::None
|