Merge "Fix Templater condition issue"

This commit is contained in:
Zuul 2021-10-01 16:28:18 +00:00 committed by Gerrit Code Review
commit 614f7fe3bc
2 changed files with 6 additions and 2 deletions

View File

@ -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 -}}

View File

@ -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 }}
-