Gary Wu | e5f3fc7 | 2017-08-04 07:09:26 -0700 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 3 | "ansible_roles_path": ".galaxy", |
Gary Wu | e5f3fc7 | 2017-08-04 07:09:26 -0700 | [diff] [blame] | 4 | "base_image": null, |
Gary Wu | e5f3fc7 | 2017-08-04 07:09:26 -0700 | [diff] [blame] | 5 | "distro": null, |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 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": "" |
Gary Wu | e5f3fc7 | 2017-08-04 07:09:26 -0700 | [diff] [blame] | 14 | }, |
| 15 | "builders": [ |
| 16 | { |
Anil Belur | a2d7fbb | 2021-03-18 15:17:00 +1000 | [diff] [blame] | 17 | "name": "openstack", |
Jessica Wagantall | 6d248e4 | 2018-10-25 15:43:41 -0700 | [diff] [blame] | 18 | "image_name": "{{user `distro`}} - redis - {{user `arch`}} - {{isotime \"20180101-1003\"}}", |
Gary Wu | e5f3fc7 | 2017-08-04 07:09:26 -0700 | [diff] [blame] | 19 | "source_image_name": "{{user `base_image`}}", |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 20 | "type": "openstack", |
| 21 | "identity_endpoint": "{{user `cloud_auth_url`}}", |
| 22 | "username": "{{user `cloud_user`}}", |
| 23 | "password": "{{user `cloud_pass`}}", |
| 24 | "tenant_name": "{{user `cloud_tenant`}}", |
| 25 | "domain_name": "Default", |
| 26 | "region": "ca-ymq-1", |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 27 | "networks": ["{{user `cloud_network`}}"], |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 28 | "user_data_file": "{{user `cloud_user_data`}}", |
| 29 | "ssh_username": "{{user `ssh_user`}}", |
| 30 | "ssh_proxy_host": "{{user `ssh_proxy_host`}}", |
| 31 | "flavor": "v1-standard-1", |
| 32 | "metadata": { |
| 33 | "ci_managed": "yes" |
| 34 | } |
Gary Wu | e5f3fc7 | 2017-08-04 07:09:26 -0700 | [diff] [blame] | 35 | } |
| 36 | ], |
| 37 | "provisioners": [ |
| 38 | { |
| 39 | "type": "shell", |
Anil Belur | 7881def | 2023-03-22 21:49:11 +0530 | [diff] [blame] | 40 | "scripts": ["common-packer/provision/install-python.sh"], |
Gary Wu | e5f3fc7 | 2017-08-04 07:09:26 -0700 | [diff] [blame] | 41 | "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 42 | }, |
| 43 | { |
| 44 | "type": "shell-local", |
| 45 | "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}" |
| 46 | }, |
| 47 | { |
| 48 | "type": "ansible", |
Anil Belur | 7881def | 2023-03-22 21:49:11 +0530 | [diff] [blame] | 49 | "command": "./common-packer/ansible-playbook.sh", |
| 50 | "skip_version_check": true, |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 51 | "playbook_file": "provision/redis.yaml", |
| 52 | "ansible_env_vars": [ |
| 53 | "ANSIBLE_NOCOWS=1", |
| 54 | "ANSIBLE_PIPELINING=True", |
| 55 | "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}", |
| 56 | "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", |
| 57 | "ANSIBLE_STDOUT_CALLBACK=debug" |
| 58 | ] |
Gary Wu | e5f3fc7 | 2017-08-04 07:09:26 -0700 | [diff] [blame] | 59 | } |
| 60 | ] |
| 61 | } |