5 source = "github.com/hashicorp/openstack"
9 variable "ansible_roles_path" {
19 variable "base_image" {
24 variable "cloud_network" {
29 variable "cloud_region" {
34 variable "cloud_auth_url" {
39 variable "cloud_tenant" {
44 variable "cloud_user" {
49 variable "cloud_pass" {
54 variable "cloud_user_data" {
64 variable "docker_source_image" {
71 default = "v3-standard-2"
74 variable "ssh_proxy_host" {
79 variable "source_ami_filter_name" {
84 variable "source_ami_filter_product_code" {
89 variable "source_ami_filter_owner" {
98 variable "vm_image_disk_format" {
103 variable "vm_use_block_storage" {
108 variable "vm_volume_size" {
113 source "docker" "mininet-ovs-28" {
114 changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
116 image = "${var.docker_source_image}"
119 source "openstack" "mininet-ovs-28" {
120 flavor = "${var.flavor}"
121 image_disk_format = "${var.vm_image_disk_format}"
122 image_name = "ZZCI - ${var.distro} - mininet-ovs-28 - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
123 instance_name = "${var.distro}-mininet-ovs-28-${uuidv4()}"
127 networks = ["${var.cloud_network}"]
128 region = "${var.cloud_region}"
129 source_image_name = "${var.base_image}"
130 ssh_proxy_host = "${var.ssh_proxy_host}"
131 ssh_username = "${var.ssh_user}"
132 use_blockstorage_volume = "${var.vm_use_block_storage}"
133 user_data_file = "${var.cloud_user_data}"
134 volume_size = "${var.vm_volume_size}"
138 sources = ["source.docker.mininet-ovs-28", "source.openstack.mininet-ovs-28"]
140 provisioner "shell" {
141 execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
142 scripts = ["common-packer/provision/install-python.sh"]
145 provisioner "shell-local" {
146 command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
149 provisioner "ansible" {
150 ansible_env_vars = ["ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}", "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", "ANSIBLE_STDOUT_CALLBACK=debug"]
151 command = "./common-packer/ansible-playbook.sh"
152 extra_arguments = ["--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"]
153 playbook_file = "provision/mininet-ovs-2.8.yaml"
154 skip_version_check = true