Skip to content

Commit cef0d18

Browse files
committed
set appliances state dir when using skeleton terraform
1 parent d0655f7 commit cef0d18

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ resource "local_file" "hosts" {
66
"control_instances": openstack_compute_instance_v2.control
77
"login_instances": openstack_compute_instance_v2.login
88
"compute_groups": module.compute
9+
"state_dir": var.state_dir
910
},
1011
)
1112
filename = "../inventory/hosts.yml"

environments/skeleton/{{cookiecutter.environment}}/terraform/inventory.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ control:
1010
ansible_host: ${[for n in control.network: n.fixed_ip_v4 if n.access_network][0]}
1111
instance_id: ${ control.id }
1212
%{ endfor ~}
13+
vars:
14+
appliances_state_dir: ${state_dir} # NB needs to be set on group not host otherwise it is ignored in packer build!
1315

1416
login:
1517
hosts:

0 commit comments

Comments
 (0)