Skip to content

Commit 06dd910

Browse files
committed
Adds support for disabling the generation of partitions.yml
This allows you to manually create your own variant. You can use the autogenerated one as a template.
1 parent 611513c commit 06dd910

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

environments/skeleton/{{cookiecutter.environment}}/tofu/inventory.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ resource "local_file" "hosts" {
1313
}
1414

1515
resource "local_file" "partitions" {
16+
count = var.autogenerated_partitions_enabled ? 1: 0
1617
content = templatefile("${path.module}/partitions.tpl",
1718
{
1819
"compute_groups": module.compute,

environments/skeleton/{{cookiecutter.environment}}/tofu/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ variable "key_pair" {
2424
description = "Name of an existing keypair in OpenStack"
2525
}
2626

27+
variable "autogenerated_partitions_enabled" {
28+
type = bool
29+
description = "Whether or not to template partitions.yml"
30+
default = true
31+
}
32+
2733
variable "control_node_flavor" {
2834
type = string
2935
description = "Flavor name for control node"

0 commit comments

Comments
 (0)