blob: ac824ced402b8828649b420f8c08a1f291c62776 [file] [log] [blame]
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05001{
2 "variables": {
3 "ansible_roles_path": ".galaxy",
Anil Belur0931f242022-04-23 09:02:23 +10004 "arch": "x86_64",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05005 "base_image": null,
6 "distro": null,
7 "cloud_auth_url": null,
8 "cloud_user": null,
9 "cloud_pass": null,
10 "cloud_network": null,
11 "cloud_tenant": null,
12 "cloud_user_data": null,
Anil Belur0931f242022-04-23 09:02:23 +100013 "flavor": "v3-standard-2",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050014 "ssh_user": null,
15 "ssh_proxy_host": ""
16 },
17 "builders": [
18 {
Anil Belura2d7fbb2021-03-18 15:17:00 +100019 "name": "openstack",
Anil Belura108f102018-09-27 19:09:50 +053020 "image_name": "ZZCI - {{user `distro`}} - helm - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
21 "instance_name": "{{user `distro`}}-builder-{{uuid}}",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050022 "source_image_name": "{{user `base_image`}}",
23 "type": "openstack",
24 "identity_endpoint": "{{user `cloud_auth_url`}}",
25 "username": "{{user `cloud_user`}}",
26 "password": "{{user `cloud_pass`}}",
27 "tenant_name": "{{user `cloud_tenant`}}",
28 "domain_name": "Default",
29 "region": "ca-ymq-1",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050030 "networks": [
31 "{{user `cloud_network`}}"
32 ],
33 "user_data_file": "{{user `cloud_user_data`}}",
34 "ssh_username": "{{user `ssh_user`}}",
35 "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
Anil Belur0931f242022-04-23 09:02:23 +100036 "flavor": "{{user `flavor`}}",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050037 "metadata": {
38 "ci_managed": "yes"
39 }
40 }
41 ],
42 "provisioners": [
43 {
44 "type": "shell",
Anil Belurb8115c82023-03-22 22:14:28 +053045 "scripts": ["common-packer/provision/install-python.sh"],
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050046 "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",
Anil Belurb8115c82023-03-22 22:14:28 +053054 "command": "./common-packer/ansible-playbook.sh",
55 "skip_version_check": true,
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050056 "playbook_file": "provision/helm.yaml",
57 "ansible_env_vars": [
58 "ANSIBLE_NOCOWS=1",
59 "ANSIBLE_PIPELINING=True",
60 "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
61 "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
62 "ANSIBLE_STDOUT_CALLBACK=debug"
63 ]
64 }
65 ]
66}