6 source = "github.com/hashicorp/amazon"
10 variable "first_run_commands" {
11 description = "Commands to run before deployment via remote-exec"
17 variable "last_run_commands" {
18 description = "Commands to run after deployment via remote-exec"
21 "sudo sed -i 's/Unattended-Upgrade \"1\"/Unattended-Upgrade \"0\"/g' /etc/apt/apt.conf.d/20auto-upgrades"
24 variable "ansible_file_path" {
25 description = "Path to Ansible playbook"
27 default = "../../fdio.infra.ansible/site.yaml"
29 variable "ansible_python_executable" {
30 description = "Path to Python interpreter"
32 default = "/usr/bin/python3"
34 variable "ansible_topology_path" {
35 description = "Path to Ansible playbook which creates a topology file"
37 default = "../../fdio.infra.ansible/cloud_topology.yaml"
39 variable "ansible_provision_pwd" {
40 description = "Password used for ansible provisioning (ansible_ssh_pass)"
44 source "amazon-ebs" "csit_c6gn_ubuntu_focal_sut" {
45 ami_name = "csit_c6gn_ubuntu_focal_sut"
46 ami_description = "CSIT SUT image based on Ubuntu Focal"
48 instance_type = "c6gn.4xlarge"
49 launch_block_device_mappings {
50 device_name = "/dev/sda1"
54 force_deregister = true
55 region = "eu-central-1"
56 skip_create_ami = false
57 source_ami = "ami-0a875db8a031a9efb"
58 ssh_username = "ubuntu"
60 source "amazon-ebs" "csit_c6gn_ubuntu_focal_tg" {
61 ami_name = "csit_c6gn_ubuntu_focal_tg"
62 ami_description = "CSIT TG image based on Ubuntu Focal"
64 instance_type = "c6gn.4xlarge"
65 launch_block_device_mappings {
66 device_name = "/dev/sda1"
70 force_deregister = true
71 region = "eu-central-1"
72 skip_create_ami = false
73 source_ami = "ami-0a875db8a031a9efb"
74 ssh_username = "ubuntu"
77 name = "csit_c6gn_ubuntu_focal_sut-packer"
79 "source.amazon-ebs.csit_c6gn_ubuntu_focal_sut"
82 inline = var.first_run_commands
84 provisioner "ansible" {
85 playbook_file = var.ansible_file_path
89 "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
90 "--extra-vars", "ansible_python_interpreter=${var.ansible_python_executable}",
91 "--extra-vars", "aws=true"
95 inline = var.last_run_commands
99 name = "csit_c6gn_ubuntu_focal_tg-packer"
101 "source.amazon-ebs.csit_c6gn_ubuntu_focal_tg"
103 provisioner "shell" {
104 inline = var.first_run_commands
106 provisioner "ansible" {
107 playbook_file = var.ansible_file_path
111 "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
112 "--extra-vars", "ansible_python_interpreter=${var.ansible_python_executable}",
113 "--extra-vars", "aws=true"
116 provisioner "shell" {
117 inline = var.last_run_commands