Skip to content

Commit

Permalink
Improve inventory template variables names
Browse files Browse the repository at this point in the history
Move all variables names from dash to underscore
  • Loading branch information
mpagot committed Oct 13, 2023
1 parent bbd73a3 commit 14956fa
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 42 deletions.
14 changes: 7 additions & 7 deletions terraform/aws/inventory.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ all:
children:
hana:
hosts:
%{ for index, value in hana-pip ~}
${hana_hostname}${format("%02d", index + 1)}:
%{ for index, value in hana_pip ~}
${hana_name}${format("%02d", index + 1)}:
ansible_host: ${value}
ansible_python_interpreter: ${hana-remote-python}
ansible_python_interpreter: ${hana_remote_python}
%{ endfor ~}
%{ if iscsi-enabled }
%{ if iscsi_enabled }
iscsi:
hosts:
%{ for index, value in iscsi-pip ~}
${iscsi_hostname}${format("%02d", index + 1)}:
%{ for index, value in iscsi_pip ~}
${iscsi_name}${format("%02d", index + 1)}:
ansible_host: ${value}
ansible_python_interpreter: ${iscsi-remote-python}
ansible_python_interpreter: ${iscsi_remote_python}
%{ endfor ~}
%{ endif }
hosts: null
14 changes: 7 additions & 7 deletions terraform/aws/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ output "netweaver_public_name" {
resource "local_file" "ansible_inventory" {
content = templatefile("inventory.tmpl",
{
hana_hostname = var.hana_name,
hana-pip = module.hana_node.hana_public_ip,
hana-remote-python = var.hana_remote_python,
iscsi_hostname = var.iscsi_name,
iscsi-pip = module.iscsi_server.iscsisrv_public_ip,
iscsi-enabled = local.iscsi_enabled,
iscsi-remote-python = var.iscsi_remote_python
hana_name = var.hana_name,
hana_pip = module.hana_node.hana_public_ip,
hana_remote_python = var.hana_remote_python,
iscsi_name = var.iscsi_name,
iscsi_pip = module.iscsi_server.iscsisrv_public_ip,
iscsi_enabled = local.iscsi_enabled,
iscsi_remote_python = var.iscsi_remote_python,
use_sbd = local.use_sbd
})
filename = "inventory.yaml"
Expand Down
14 changes: 7 additions & 7 deletions terraform/azure/inventory.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ all:
children:
hana:
hosts:
%{ for index, value in hana-pip ~}
${hana-name[index]}:
%{ for index, value in hana_pip ~}
${hana_name[index]}:
ansible_host: ${value}
ansible_python_interpreter: ${hana-remote-python}
ansible_python_interpreter: ${hana_remote_python}
%{ endfor ~}
%{ if iscsi-enabled }
%{ if iscsi_enabled }
iscsi:
hosts:
%{ for index, value in iscsi-pip ~}
${iscsi-name[index]}:
%{ for index, value in iscsi_pip ~}
${iscsi_name[index]}:
ansible_host: ${value}
ansible_python_interpreter: ${iscsi-remote-python}
ansible_python_interpreter: ${iscsi_remote_python}
%{ endfor ~}
%{ endif }
hosts: null
14 changes: 7 additions & 7 deletions terraform/azure/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ output "netweaver_public_name" {
resource "local_file" "ansible_inventory" {
content = templatefile("inventory.tmpl",
{
hana-name = module.hana_node.hana_name,
hana-pip = module.hana_node.hana_public_ip,
hana_name = module.hana_node.hana_name,
hana_pip = module.hana_node.hana_public_ip,
cluster_ip = local.cluster_ip,
hana-remote-python = var.hana_remote_python,
iscsi-name = module.iscsi_server.iscsisrv_name,
iscsi-pip = module.iscsi_server.iscsisrv_public_ip,
iscsi-enabled = local.iscsi_enabled,
iscsi-remote-python = var.iscsi_remote_python
hana_remote_python = var.hana_remote_python,
iscsi_name = module.iscsi_server.iscsisrv_name,
iscsi_pip = module.iscsi_server.iscsisrv_public_ip,
iscsi_enabled = local.iscsi_enabled,
iscsi_remote_python = var.iscsi_remote_python
use_sbd = local.use_sbd
})
filename = "inventory.yaml"
Expand Down
14 changes: 7 additions & 7 deletions terraform/gcp/inventory.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ all:
children:
hana:
hosts:
%{ for index, value in hana-pip ~}
${hana-name[index]}:
%{ for index, value in hana_pip ~}
${hana_name[index]}:
ansible_host: ${value}
ansible_python_interpreter: ${hana-remote-python}
ansible_python_interpreter: ${hana_remote_python}
%{ endfor ~}
%{ if iscsi-enabled }
%{ if iscsi_enabled }
iscsi:
hosts:
%{ for index, value in iscsi-pip ~}
${iscsi-name[index]}:
%{ for index, value in iscsi_pip ~}
${iscsi_name[index]}:
ansible_host: ${value}
ansible_python_interpreter: ${iscsi-remote-python}
ansible_python_interpreter: ${iscsi_remote_python}
%{ endfor ~}
%{ endif }
vars:
Expand Down
14 changes: 7 additions & 7 deletions terraform/gcp/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ output "netweaver_public_name" {
resource "local_file" "ansible_inventory" {
content = templatefile("inventory.tmpl",
{
hana-name = module.hana_node.hana_name,
hana-pip = module.hana_node.hana_public_ip,
hana_name = module.hana_node.hana_name,
hana_pip = module.hana_node.hana_public_ip,
hana-vip = module.hana_node.hana_vip,
hana-remote-python = var.hana_remote_python,
hana_remote_python = var.hana_remote_python,
name_prefix = local.deployment_name,
iscsi-name = module.iscsi_server.iscsisrv_name,
iscsi-pip = module.iscsi_server.iscsisrv_public_ip,
iscsi-enabled = local.iscsi_enabled,
iscsi-remote-python = var.iscsi_remote_python
iscsi_name = module.iscsi_server.iscsisrv_name,
iscsi_pip = module.iscsi_server.iscsisrv_public_ip,
iscsi_enabled = local.iscsi_enabled,
iscsi_remote_python = var.iscsi_remote_python
use_sbd = local.use_sbd
})
filename = "inventory.yaml"
Expand Down

0 comments on commit 14956fa

Please sign in to comment.