Merge changes from topic "bashisms"
[releng/builder.git] / packer / templates / mininet-ovs-2.8.json
1 {
2   "variables": {
3     "ansible_roles_path": ".galaxy",
4     "arch": "x86_64",
5     "base_image": null,
6     "cloud_network": null,
7     "cloud_user_data": null,
8     "cloud_region": "ca-ymq-1",
9     "vm_use_block_storage": "true",
10     "vm_volume_size": "20",
11     "vm_image_disk_format": "",
12     "distro": null,
13     "docker_source_image": null,
14     "flavor": "v3-standard-2",
15     "ssh_user": null,
16     "ssh_proxy_host": ""
17   },
18   "builders": [
19     {
20       "name": "openstack",
21       "image_name": "ZZCI - {{user `distro`}} - mininet-ovs-28 - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
22       "instance_name": "{{user `distro`}}-mininet-ovs-28-{{uuid}}",
23       "source_image_name": "{{user `base_image`}}",
24       "type": "openstack",
25       "region": "{{user `cloud_region`}}",
26       "networks": ["{{user `cloud_network`}}"],
27       "user_data_file": "{{user `cloud_user_data`}}",
28       "ssh_username": "{{user `ssh_user`}}",
29       "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
30       "flavor": "{{user `flavor`}}",
31       "metadata": {
32         "ci_managed": "yes"
33       },
34       "use_blockstorage_volume": "{{user `vm_use_block_storage`}}",
35       "volume_size": "{{user `vm_volume_size`}}",
36       "image_disk_format": "{{user `vm_image_disk_format`}}"
37     },
38     {
39       "name": "docker",
40       "type": "docker",
41       "image": "{{ user `docker_source_image` }}",
42       "commit": true,
43       "changes": ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
44     }
45   ],
46   "provisioners": [
47     {
48       "type": "shell",
49       "scripts": ["common-packer/provision/install-python.sh"],
50       "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
51     },
52     {
53       "type": "shell-local",
54       "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
55     },
56     {
57       "type": "ansible",
58       "playbook_file": "provision/mininet-ovs-2.8.yaml",
59       "ansible_env_vars": [
60         "ANSIBLE_NOCOWS=1",
61         "ANSIBLE_PIPELINING=True",
62         "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
63         "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
64         "ANSIBLE_STDOUT_CALLBACK=debug"
65       ]
66     }
67   ]
68 }