blob: c05aeb2d7a4e5df2a85aa520a29c4b19001f7b8b [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",
Andrew Grimberga6b750c2023-05-03 08:47:44 -070029 "networks": ["{{user `cloud_network`}}"],
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`}}",
Anil Belurd0295bd2022-04-23 09:05:01 +100033 "flavor": "{{user `flavor`}}",
Jessica Wagantall79059b02018-07-20 20:30:09 -070034 "metadata": {
35 "ci_managed": "yes"
36 }
Gary Wuab1a4c92017-08-25 06:46:17 -070037 }
38 ],
39 "provisioners": [
40 {
41 "type": "shell",
Jessica Wagantall6b89f072023-03-29 12:22:57 -070042 "scripts": ["common-packer/provision/install-python.sh"],
Gary Wuab1a4c92017-08-25 06:46:17 -070043 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
Jessica Wagantall79059b02018-07-20 20:30:09 -070044 },
45 {
46 "type": "shell-local",
47 "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
48 },
49 {
50 "type": "ansible",
Jessica Wagantall6b89f072023-03-29 12:22:57 -070051 "command": "./common-packer/ansible-playbook.sh",
52 "skip_version_check": true,
Jessica Wagantall79059b02018-07-20 20:30:09 -070053 "playbook_file": "provision/memcached.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 Wuab1a4c92017-08-25 06:46:17 -070061 }
62 ]
63}