5 source = "github.com/hashicorp/openstack"
10 variable "cloud_auth_url" {
15 variable "cloud_tenant" {
20 variable "cloud_user" {
25 variable "cloud_pass" {
30 variable "source_ami_filter_name" {
35 variable "source_ami_filter_product_code" {
40 variable "source_ami_filter_owner" {
45 variable "ansible_roles_path" {
55 variable "base_image" {
60 variable "cloud_network" {
65 variable "cloud_region" {
70 variable "cloud_user_data" {
80 variable "docker_source_image" {
87 default = "v2-highcpu-1"
90 variable "ssh_proxy_host" {
100 variable "vm_image_disk_format" {
105 variable "vm_use_block_storage" {
110 variable "vm_volume_size" {
115 source "docker" "helm" {
116 changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
118 image = "${var.docker_source_image}"
121 source "openstack" "helm" {
122 domain_name = "Default"
123 flavor = "${var.flavor}"
124 identity_endpoint = "${var.cloud_auth_url}"
125 image_name = "ZZCI - ${var.distro} - helm - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
126 instance_name = "${var.distro}-builder-${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 user_data_file = "${var.cloud_user_data}"
138 username = "${var.cloud_user}"
142 sources = ["source.docker.helm", "source.openstack.helm"]
144 provisioner "shell" {
145 execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
146 scripts = ["common-packer/provision/install-python.sh"]
149 provisioner "shell-local" {
150 command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
153 provisioner "ansible" {
156 "ANSIBLE_PIPELINING=True",
157 "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}",
158 "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
159 "ANSIBLE_STDOUT_CALLBACK=debug"
161 command = "./common-packer/ansible-playbook.sh"
163 "--scp-extra-args", "'-O'",
164 "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
166 playbook_file = "provision/helm.yaml"
167 skip_version_check = true