}
variable "first_run_commands" {
- description = "Commands to run after deployment via remote-exec"
+ description = "Commands to run before deployment via remote-exec"
type = list(string)
default = [
""
]
}
+variable "last_run_commands" {
+ description = "Commands to run after deployment via remote-exec"
+ type = list(string)
+ default = [
+ "sudo sed -i 's/Unattended-Upgrade \"1\"/Unattended-Upgrade \"0\"/g' /etc/apt/apt.conf.d/20auto-upgrades"
+ ]
+}
+
variable "ansible_file_path" {
description = "Path to Ansible playbook"
type = string
ami_name = "csit_c5n_ubuntu_focal_sut"
ami_description = "CSIT SUT image based on Ubuntu Focal"
ena_support = true
- instance_type = "c5n.9xlarge"
+ instance_type = "c5n.4xlarge"
launch_block_device_mappings {
device_name = "/dev/sda1"
volume_size = 40
ami_name = "csit_c5n_ubuntu_focal_tg"
ami_description = "CSIT TG image based on Ubuntu Focal"
ena_support = true
- instance_type = "c5n.9xlarge"
+ instance_type = "c5n.4xlarge"
launch_block_device_mappings {
device_name = "/dev/sda1"
volume_size = 40
"--extra-vars", "aws=true"
]
}
+ provisioner "shell" {
+ inline = var.last_run_commands
+ }
}
build {
"--extra-vars", "aws=true"
]
}
+ provisioner "shell" {
+ inline = var.last_run_commands
+ }
}