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:
|
||||
name: {{ .name }}
|
||||
spec:
|
||||
{{- if and (.macAddresses) (.macAddresses.oam) }}
|
||||
{{- if .macAddresses }}
|
||||
{{- if .macAddresses.oam }}
|
||||
bootMACAddress: {{ .macAddresses.oam }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end -}}
|
||||
|
@ -92,10 +92,12 @@ template: |
|
||||
{{- range $envAll.commonNetworking.links }}
|
||||
-
|
||||
{{ 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 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
networks:
|
||||
{{- range $envAll.commonNetworking.networks }}
|
||||
-
|
||||
|
Loading…
Reference in New Issue
Block a user