Auto-generated patches to resolve prettier / yamllint
[releng/builder.git] / packer / templates / gbp.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     "cloud_availability_zone": "ca-ymq-2",
10     "vm_use_block_storage": "true",
11     "vm_volume_size": "20",
12     "vm_image_disk_format": "",
13     "distro": null,
14     "flavor": "v2-highcpu-1",
15     "ssh_user": null,
16     "ssh_proxy_host": ""
17   },
18   "builders": [
19     {
20       "name": "vexxhost",
21       "image_name": "ZZCI - {{user `distro`}} - gbp - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
22       "instance_name": "{{user `distro`}}-gbp-{{uuid}}",
23       "source_image_name": "{{user `base_image`}}",
24       "type": "openstack",
25       "region": "{{user `cloud_region`}}",
26       "availability_zone": "{{user `cloud_availability_zone`}}",
27       "networks": ["{{user `cloud_network`}}"],
28       "user_data_file": "{{user `cloud_user_data`}}",
29       "ssh_username": "{{user `ssh_user`}}",
30       "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
31       "flavor": "{{user `flavor`}}",
32       "metadata": {
33         "ci_managed": "yes"
34       },
35       "use_blockstorage_volume": "{{user `vm_use_block_storage`}}",
36       "volume_size": "{{user `vm_volume_size`}}",
37       "image_disk_format": "{{user `vm_image_disk_format`}}"
38     }
39   ],
40   "provisioners": [
41     {
42       "type": "shell",
43       "inline": ["mkdir -p /tmp/packer"]
44     },
45     {
46       "type": "file",
47       "source": "provision/gbp_puppet/",
48       "destination": "/tmp/packer"
49     },
50     {
51       "type": "shell",
52       "scripts": [
53         "provision/baseline.sh",
54         "provision/gbp.sh",
55         "provision/system_reseal_local_env.sh",
56         "provision/system_reseal.sh"
57       ],
58       "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
59     }
60   ]
61 }