Commit 3c7e8fd
committed
gen_tfvars: add default for Azure accelerated networking variable
The Ansible template terraform.tfvars.j2 fails with an undefined
variable error when generating Azure terraform configuration:
AnsibleUndefinedVariable: 'terraform_azure_accelerated_networking_enabled' is undefined
This occurs because the Kconfig variable TERRAFORM_AZURE_ACCELERATED_NETWORKING_ENABLED
is a hidden bool (no user prompt) that uses conditional defaults based on VM size.
When a VM size like Standard_B2s is selected, the variable defaults to 'n' via
the condition "default n if TERRAFORM_AZURE_VM_SIZE_STANDARD_B2S".
Kconfig's "output yaml" mechanism only writes variables to the yaml output file
when they are explicitly set in .config or when hidden bools evaluate to 'y'.
Hidden bools that evaluate to 'n' through conditional defaults are never written
to the yaml output, leaving the Ansible variable undefined at template render time.
The kernel-builder defconfig works because it explicitly sets the variable to 'y',
which causes Kconfig to write it to the yaml. The nfsd-fstests defconfig relies
on the conditional default, which evaluates to 'n' and is never output.
Add a fallback default of 'false' in the gen_tfvars role defaults, following the
existing pattern used for AWS variables. This ensures the variable is always
defined regardless of whether Kconfig outputs it.
Generated-by: Claude AI
Signed-off-by: Chuck Lever <[email protected]>1 parent a68e50e commit 3c7e8fd
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
0 commit comments