blob: 9568c0146a6b8f408513cfbcc6771df6348f11ae [file] [log] [blame]
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05001{
2 "variables": {
3 "ansible_roles_path": ".galaxy",
4 "base_image": null,
5 "distro": null,
6 "cloud_auth_url": null,
7 "cloud_user": null,
8 "cloud_pass": null,
9 "cloud_network": null,
10 "cloud_tenant": null,
11 "cloud_user_data": null,
12 "ssh_user": null,
13 "ssh_proxy_host": ""
14 },
15 "builders": [
16 {
Anil Belura2d7fbb2021-03-18 15:17:00 +100017 "name": "openstack",
Anil Belura108f102018-09-27 19:09:50 +053018 "image_name": "ZZCI - {{user `distro`}} - helm - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
19 "instance_name": "{{user `distro`}}-builder-{{uuid}}",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050020 "source_image_name": "{{user `base_image`}}",
21 "type": "openstack",
22 "identity_endpoint": "{{user `cloud_auth_url`}}",
23 "username": "{{user `cloud_user`}}",
24 "password": "{{user `cloud_pass`}}",
25 "tenant_name": "{{user `cloud_tenant`}}",
26 "domain_name": "Default",
27 "region": "ca-ymq-1",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050028 "networks": [
29 "{{user `cloud_network`}}"
30 ],
31 "user_data_file": "{{user `cloud_user_data`}}",
32 "ssh_username": "{{user `ssh_user`}}",
33 "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
34 "flavor": "v1-standard-1",
35 "metadata": {
36 "ci_managed": "yes"
37 }
38 }
39 ],
40 "provisioners": [
41 {
42 "type": "shell",
43 "scripts": [
44 "common-packer/provision/install-python.sh"
45 ],
46 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
47 },
48 {
49 "type": "shell-local",
50 "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
51 },
52 {
53 "type": "ansible",
54 "playbook_file": "provision/helm.yaml",
55 "ansible_env_vars": [
56 "ANSIBLE_NOCOWS=1",
57 "ANSIBLE_PIPELINING=True",
58 "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
59 "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
60 "ANSIBLE_STDOUT_CALLBACK=debug"
61 ]
62 }
63 ]
64}