Skip to content

Commit e5ee197

Browse files
Run the bastion.sh later to avoid package issues
1 parent e216d3d commit e5ee197

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

bastion.tf

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -173,23 +173,6 @@ resource "null_resource" "bastion" {
173173
private_key = tls_private_key.ssh.private_key_pem
174174
}
175175
}
176-
177-
178-
provisioner "remote-exec" {
179-
inline = [
180-
"#!/bin/bash",
181-
"chmod 600 /home/${var.bastion_username}/.ssh/cluster.key",
182-
"cp /home/${var.bastion_username}/.ssh/cluster.key /home/${var.bastion_username}/.ssh/id_rsa",
183-
"chmod a+x /opt/oci-hpc/bin/*.sh",
184-
"timeout --foreground 60m /opt/oci-hpc/bin/bastion.sh"
185-
]
186-
connection {
187-
host = local.host
188-
type = "ssh"
189-
user = var.bastion_username
190-
private_key = tls_private_key.ssh.private_key_pem
191-
}
192-
}
193176
}
194177
resource "null_resource" "cluster" {
195178
depends_on = [null_resource.bastion, null_resource.backup, oci_core_cluster_network.cluster_network, oci_core_instance.bastion, oci_core_volume_attachment.bastion_volume_attachment ]
@@ -438,6 +421,10 @@ provisioner "file" {
438421
provisioner "remote-exec" {
439422
inline = [
440423
"#!/bin/bash",
424+
"chmod 600 /home/${var.bastion_username}/.ssh/cluster.key",
425+
"cp /home/${var.bastion_username}/.ssh/cluster.key /home/${var.bastion_username}/.ssh/id_rsa",
426+
"chmod a+x /opt/oci-hpc/bin/*.sh",
427+
"timeout --foreground 60m /opt/oci-hpc/bin/bastion.sh",
441428
"chmod 755 /opt/oci-hpc/autoscaling/crontab/*.sh",
442429
"chmod 600 /opt/oci-hpc/autoscaling/credentials/key.pem",
443430
"echo ${var.configure} > /tmp/configure.conf",

0 commit comments

Comments
 (0)