X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=fdio.infra.packer%2Faws_c5n%2Fubuntu_focal.pkr.hcl;fp=fdio.infra.packer%2F2n_aws_c5n%2Fubuntu_focal.pkr.hcl;h=4a0916026103c4a605e1de1a8b37c46a4d14760e;hp=0fc3f3690780b0f8dfc98875388882f7f151a31d;hb=8f6c947912621fe8b8c870959e8025f0f3de5101;hpb=023ce436b2e651b697cd54005fb9c32e4b69e8c0 diff --git a/fdio.infra.packer/2n_aws_c5n/ubuntu_focal.pkr.hcl b/fdio.infra.packer/aws_c5n/ubuntu_focal.pkr.hcl similarity index 86% rename from fdio.infra.packer/2n_aws_c5n/ubuntu_focal.pkr.hcl rename to fdio.infra.packer/aws_c5n/ubuntu_focal.pkr.hcl index 0fc3f36907..4a09160261 100644 --- a/fdio.infra.packer/2n_aws_c5n/ubuntu_focal.pkr.hcl +++ b/fdio.infra.packer/aws_c5n/ubuntu_focal.pkr.hcl @@ -8,13 +8,21 @@ packer { } 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 @@ -43,7 +51,7 @@ source "amazon-ebs" "csit_c5n_ubuntu_focal_sut" { 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 @@ -60,7 +68,7 @@ source "amazon-ebs" "csit_c5n_ubuntu_focal_tg" { 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 @@ -91,6 +99,9 @@ build { "--extra-vars", "aws=true" ] } + provisioner "shell" { + inline = var.last_run_commands + } } build { @@ -111,4 +122,7 @@ build { "--extra-vars", "aws=true" ] } + provisioner "shell" { + inline = var.last_run_commands + } }