5 source = "github.com/hashicorp/openstack"
10 variable "ansible_roles_path" {
20 variable "base_image" {
25 variable "cloud_network" {
30 variable "cloud_region" {
35 variable "cloud_auth_url" {
40 variable "cloud_tenant" {
45 variable "cloud_user" {
50 variable "cloud_pass" {
55 variable "cloud_user_data" {
65 variable "docker_source_image" {
72 default = "v3-standard-2"
75 variable "ssh_proxy_host" {
80 variable "source_ami_filter_name" {
85 variable "source_ami_filter_product_code" {
90 variable "source_ami_filter_owner" {
99 variable "vm_image_disk_format" {
104 variable "vm_use_block_storage" {
109 variable "vm_volume_size" {
114 source "docker" "helm" {
115 changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
117 image = "${var.docker_source_image}"
120 source "openstack" "helm" {
121 domain_name = "Default"
122 flavor = "v1-standard-1"
123 identity_endpoint = "${var.cloud_auth_url}"
124 image_disk_format = "${var.vm_image_disk_format}"
125 image_name = "ZZCI - ${var.distro} - helm - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
126 instance_name = "${var.distro}-helm-${uuidv4()}"
130 networks = ["${var.cloud_network}"]
131 password = "${var.cloud_pass}"
133 source_image_name = "${var.base_image}"
134 ssh_proxy_host = "${var.ssh_proxy_host}"
135 ssh_username = "${var.ssh_user}"
136 tenant_name = "${var.cloud_tenant}"
137 use_blockstorage_volume = "${var.vm_use_block_storage}"
138 user_data_file = "${var.cloud_user_data}"
139 username = "${var.cloud_user}"
140 volume_size = "${var.vm_volume_size}"
144 sources = ["source.docker.helm", "source.openstack.helm"]
146 provisioner "shell" {
147 execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
148 scripts = ["common-packer/provision/install-python.sh"]
151 provisioner "shell-local" {
152 command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
155 provisioner "ansible" {
158 "ANSIBLE_PIPELINING=False",
159 "ANSIBLE_HOST_KEY_CHECKING=False",
160 "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}",
161 "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
162 "ANSIBLE_STDOUT_CALLBACK=debug"
164 command = "./common-packer/ansible-playbook.sh"
166 "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa"
168 playbook_file = "provision/helm.yaml"
169 skip_version_check = true