Fix Templater condition issue
* for some reason the one liner with multiple conditions is not working and due to which the generation of ethernet_mac_address is completely ignored Change-Id: I642fc744c039cafbbd9cea48f861931fb67948c1
This commit is contained in:
parent
23ccec608c
commit
8b9f1b4fd0
@ -36,7 +36,9 @@ template: |
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ .name }}
|
name: {{ .name }}
|
||||||
spec:
|
spec:
|
||||||
{{- if and (.macAddresses) (.macAddresses.oam) }}
|
{{- if .macAddresses }}
|
||||||
|
{{- if .macAddresses.oam }}
|
||||||
bootMACAddress: {{ .macAddresses.oam }}
|
bootMACAddress: {{ .macAddresses.oam }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
@ -92,10 +92,12 @@ template: |
|
|||||||
{{- range $envAll.commonNetworking.links }}
|
{{- range $envAll.commonNetworking.links }}
|
||||||
-
|
-
|
||||||
{{ toYaml . | indent 6 }}
|
{{ toYaml . | indent 6 }}
|
||||||
{{- if and ($host.macAddresses) (index $host.macAddresses .id) }}
|
{{- if $host.macAddresses }}
|
||||||
|
{{- if index $host.macAddresses .id }}
|
||||||
ethernet_mac_address: {{ index $host.macAddresses .id }}
|
ethernet_mac_address: {{ index $host.macAddresses .id }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
networks:
|
networks:
|
||||||
{{- range $envAll.commonNetworking.networks }}
|
{{- range $envAll.commonNetworking.networks }}
|
||||||
-
|
-
|
||||||
|
Loading…
Reference in New Issue
Block a user