Skip to content

Commit 59a7d28

Browse files
committed
Allow home and state volume paths to be set
1 parent be77d80 commit 59a7d28

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

group_vars/openstack.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ terraform_project_path: "{{ playbook_dir }}/terraform"
1717
terraform_state: "{{ cluster_state | default('present') }}"
1818
cluster_ssh_user: rocky
1919

20-
state_volume_size: 150 # GB
20+
state_volume_size: 150 # GB
21+
22+
state_volume_device_path: "{{ cluster_state_volume_device_path | default('/dev/vdb') }}"
23+
home_volume_device_path: "{{ cluster_home_volume_device_path | default('/dev/vdc') }}"

roles/cluster_infra/templates/resources.tf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ resource "openstack_compute_instance_v2" "control" {
162162
fs_setup:
163163
- label: state
164164
filesystem: ext4
165-
device: /dev/vdb
165+
device: {{ state_volume_device_path }}
166166
partition: auto
167167
- label: home
168168
filesystem: ext4
169-
device: /dev/vdc
169+
device: {{ home_volume_device_path }}
170170
partition: auto
171171
mounts:
172172
- [LABEL=state, /var/lib/state]

0 commit comments

Comments
 (0)