forked from William-Yeh/ansible-prometheus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
packer.json
46 lines (42 loc) · 2 KB
/
packer.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"builders": [{
"type": "openstack",
"identity_endpoint": "https://api.entercloudsuite.com/v2.0",
"tenant_name": "{{user `ecs_tenant`}}",
"username": "{{user `ecs_username`}}",
"password": "{{user `ecs_password`}}",
"region": "{{user `ecs_region`}}",
"image_name": "{{user `image_name`}}",
"instance_name": "{{user `instance_name`}}",
"source_image": "6a1e4c2b-d663-492a-a828-205f4b28d9e0",
"ssh_username": "ubuntu",
"flavor": "{{user `ecs_flavor`}}",
"networks": [ "{{user `ecs_network`}}" ],
"floating_ip_pool": "PublicNetwork"
}],
"provisioners": [
{
"type": "shell",
"inline_shebang": "/bin/bash -e",
"inline": [
"until [[ -f /var/lib/cloud/instance/boot-finished ]]; do sleep 1; done",
"sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y python2.7 python && sudo apt-get clean"
]
},
{
"type": "ansible",
"playbook_file": "./molecule/default/playbook.yml",
"ansible_env_vars": [ "ANSIBLE_BECOME=True", "ANSIBLE_BECOME_METHOD=sudo", "ANSIBLE_BECOME_USER=root", "ANSIBLE_ROLES_PATH=:/home/travis/build/entercloudsuite/", "ANSIBLE_HOST_KEY_CHECKING=False", "ANSIBLE_SSH_ARGS='-o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s'", "ANSIBLE_NOCOLOR=True" ]
}
],
"variables": {
"image_name": "ecs-prometheus {{env `TRAVIS_BRANCH`}}",
"instance_name": "ecs-prometheus",
"ecs_flavor": "e3standard.x2",
"ecs_region": "nl-ams1",
"ecs_tenant": "{{env `OS_TENANT`}}",
"ecs_username": "{{env `OS_USERNAME`}}",
"ecs_password": "{{env `OS_PASSWORD`}}",
"ecs_network": "{{env `OS_NETWORK`}}"
}
}