forked from pawelgrzeda/packer-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vault-consul-server.yml
31 lines (31 loc) · 1.02 KB
/
vault-consul-server.yml
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
---
description: Vault and Consul Server template
variables:
gce_account_file: "{{ env `GCE_ACCOUNT_FILE` }}"
gce_project_id: "{{ env `GCE_PROJECT_ID` }}"
consul_version: 0.6.4
consul_sha: abdf0e1856292468e2c9971420d73b805e93888e006c76324ae39416edcf0627
vault_version: 0.6.1
vault_sha: 4f248214e4e71da68a166de60cc0c1485b194f4a2197da641187b745c8d5b8be
builders:
- type: googlecompute
account_file: "{{ user `gce_account_file` }}"
project_id: "{{ user `gce_project_id` }}"
source_image: ubuntu-1604-xenial-v20170619a
zone: us-central1-b
image_name: vault-consul-{{ timestamp }}-<%= git_desc %>
machine_type: g1-small
ssh_username: ubuntu
tags:
- vault
provisioners:
- type: shell
scripts:
- packer-scripts/consul-install
- packer-scripts/vault-install
environment_vars:
- CONSUL_VERSION={{ user `consul_version` }}
- CONSUL_SHA={{ user `consul_sha` }}
- VAULT_VERSION={{ user `vault_version` }}
- VAULT_SHA={{ user `vault_sha` }}
execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'"