Merge "trigger distribution build for Neon SR1 release"
[releng/builder.git] / packer / templates / mininet-ovs-2.5.json
1 {
2   "variables": {
3     "ansible_roles_path": ".galaxy",
4     "base_image": null,
5     "distro": null,
6     "cloud_network": null,
7     "cloud_user_data": null,
8     "ssh_user": null,
9     "ssh_proxy_host": ""
10   },
11   "builders": [
12     {
13       "name": "vexxhost",
14       "image_name": "ZZCI - {{user `distro`}} - mininet-ovs-25 - {{isotime \"20060102-150405.000\"}}",
15       "instance_name": "{{user `distro`}}-mininet-ovs-25-{{uuid}}",
16       "source_image_name": "{{user `base_image`}}",
17       "type": "openstack",
18       "region": "ca-ymq-1",
19       "availability_zone": "ca-ymq-2",
20       "networks": [
21         "{{user `cloud_network`}}"
22       ],
23       "user_data_file": "{{user `cloud_user_data`}}",
24       "ssh_username": "{{user `ssh_user`}}",
25       "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
26       "flavor": "v1-standard-1",
27       "metadata": {
28         "ci_managed": "yes"
29       }
30     }
31   ],
32   "provisioners": [
33     {
34       "type": "shell",
35       "scripts": [
36         "common-packer/provision/install-python.sh"
37       ],
38       "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
39     },
40     {
41       "type": "shell-local",
42       "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
43     },
44     {
45       "type": "ansible",
46       "playbook_file": "provision/mininet-ovs-2.5.yaml",
47       "ansible_env_vars": [
48         "ANSIBLE_NOCOWS=1",
49         "ANSIBLE_PIPELINING=True",
50         "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
51         "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
52         "ANSIBLE_STDOUT_CALLBACK=debug"
53       ]
54     }
55   ]
56 }