blob: 6bf7b17f31cf29bcb5392d2632a4cc4eb5c26d82 [file] [log] [blame]
Gary Wue5f3fc72017-08-04 07:09:26 -07001{
2 "variables": {
Jessica Wagantall79059b02018-07-20 20:30:09 -07003 "ansible_roles_path": ".galaxy",
Gary Wue5f3fc72017-08-04 07:09:26 -07004 "base_image": null,
Gary Wue5f3fc72017-08-04 07:09:26 -07005 "distro": null,
Jessica Wagantall79059b02018-07-20 20:30:09 -07006 "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 Wue5f3fc72017-08-04 07:09:26 -070014 },
15 "builders": [
16 {
Anil Belura2d7fbb2021-03-18 15:17:00 +100017 "name": "openstack",
Jessica Wagantall6d248e42018-10-25 15:43:41 -070018 "image_name": "{{user `distro`}} - redis - {{user `arch`}} - {{isotime \"20180101-1003\"}}",
Gary Wue5f3fc72017-08-04 07:09:26 -070019 "source_image_name": "{{user `base_image`}}",
Jessica Wagantall79059b02018-07-20 20:30:09 -070020 "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",
Gary Wue5f3fc72017-08-04 07:09:26 -070027 "networks": [
Jessica Wagantall79059b02018-07-20 20:30:09 -070028 "{{user `cloud_network`}}"
Gary Wue5f3fc72017-08-04 07:09:26 -070029 ],
Jessica Wagantall79059b02018-07-20 20:30:09 -070030 "user_data_file": "{{user `cloud_user_data`}}",
31 "ssh_username": "{{user `ssh_user`}}",
32 "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
33 "flavor": "v1-standard-1",
34 "metadata": {
35 "ci_managed": "yes"
36 }
Gary Wue5f3fc72017-08-04 07:09:26 -070037 }
38 ],
39 "provisioners": [
40 {
41 "type": "shell",
Gary Wue5f3fc72017-08-04 07:09:26 -070042 "scripts": [
Jessica Wagantall79059b02018-07-20 20:30:09 -070043 "common-packer/provision/install-python.sh"
Gary Wue5f3fc72017-08-04 07:09:26 -070044 ],
45 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
Jessica Wagantall79059b02018-07-20 20:30:09 -070046 },
47 {
48 "type": "shell-local",
49 "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
50 },
51 {
52 "type": "ansible",
53 "playbook_file": "provision/redis.yaml",
54 "ansible_env_vars": [
55 "ANSIBLE_NOCOWS=1",
56 "ANSIBLE_PIPELINING=True",
57 "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
58 "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
59 "ANSIBLE_STDOUT_CALLBACK=debug"
60 ]
Gary Wue5f3fc72017-08-04 07:09:26 -070061 }
62 ]
63}