blob: 6554fb613daceec4dd07df5959dbd667f2572041 [file] [log] [blame]
Gary Wuab1a4c92017-08-25 06:46:17 -07001{
2 "variables": {
Jessica Wagantall79059b02018-07-20 20:30:09 -07003 "ansible_roles_path": ".galaxy",
Anil Belurd0295bd2022-04-23 09:05:01 +10004 "arch": "x86_64",
Gary Wuab1a4c92017-08-25 06:46:17 -07005 "base_image": null,
Gary Wuab1a4c92017-08-25 06:46:17 -07006 "distro": null,
Jessica Wagantall79059b02018-07-20 20:30:09 -07007 "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 Belurd0295bd2022-04-23 09:05:01 +100013 "flavor": "v3-standard-2",
Jessica Wagantall79059b02018-07-20 20:30:09 -070014 "ssh_user": null,
15 "ssh_proxy_host": ""
Gary Wuab1a4c92017-08-25 06:46:17 -070016 },
17 "builders": [
18 {
Anil Belura2d7fbb2021-03-18 15:17:00 +100019 "name": "openstack",
Jessica Wagantall6d248e42018-10-25 15:43:41 -070020 "image_name": "{{user `distro`}} - memcached - {{user `arch`}} - {{isotime \"20180101-1003\"}}",
Gary Wuab1a4c92017-08-25 06:46:17 -070021 "source_image_name": "{{user `base_image`}}",
Jessica Wagantall79059b02018-07-20 20:30:09 -070022 "type": "openstack",
23 "identity_endpoint": "{{user `cloud_auth_url`}}",
24 "username": "{{user `cloud_user`}}",
25 "password": "{{user `cloud_pass`}}",
26 "tenant_name": "{{user `cloud_tenant`}}",
27 "domain_name": "Default",
28 "region": "ca-ymq-1",
Gary Wuab1a4c92017-08-25 06:46:17 -070029 "networks": [
Jessica Wagantall79059b02018-07-20 20:30:09 -070030 "{{user `cloud_network`}}"
Gary Wuab1a4c92017-08-25 06:46:17 -070031 ],
Jessica Wagantall79059b02018-07-20 20:30:09 -070032 "user_data_file": "{{user `cloud_user_data`}}",
33 "ssh_username": "{{user `ssh_user`}}",
34 "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
Anil Belurd0295bd2022-04-23 09:05:01 +100035 "flavor": "{{user `flavor`}}",
Jessica Wagantall79059b02018-07-20 20:30:09 -070036 "metadata": {
37 "ci_managed": "yes"
38 }
Gary Wuab1a4c92017-08-25 06:46:17 -070039 }
40 ],
41 "provisioners": [
42 {
43 "type": "shell",
Gary Wuab1a4c92017-08-25 06:46:17 -070044 "scripts": [
Jessica Wagantall79059b02018-07-20 20:30:09 -070045 "common-packer/provision/install-python.sh"
Gary Wuab1a4c92017-08-25 06:46:17 -070046 ],
47 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
Jessica Wagantall79059b02018-07-20 20:30:09 -070048 },
49 {
50 "type": "shell-local",
51 "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
52 },
53 {
54 "type": "ansible",
55 "playbook_file": "provision/memcached.yaml",
56 "ansible_env_vars": [
57 "ANSIBLE_NOCOWS=1",
58 "ANSIBLE_PIPELINING=True",
59 "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
60 "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
61 "ANSIBLE_STDOUT_CALLBACK=debug"
62 ]
Gary Wuab1a4c92017-08-25 06:46:17 -070063 }
64 ]
65}