fix builder to set image version and hostname on build

This commit is contained in:
Cassiano Aquino
2019-10-08 19:36:17 +01:00
parent 47654660ee
commit 4916b3bf7c
4 changed files with 5 additions and 7 deletions

View File

@ -1,7 +1,4 @@
{
"variables": {
"home": "{{env `HOME`}}"
},
"builders": [{
"name": "pwnagotchi",
"type": "arm-image",
@ -22,7 +19,8 @@
},
{
"type":"ansible-local",
"playbook_file": "pwnagotchi.yml"
"playbook_file": "pwnagotchi.yml",
"command": "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 PWN_VERSION={{user `pwn_version`}} PWN_HOSTNAME={{user `pwn_hostname`}} ansible-playbook"
},
{
"type": "shell",

View File

@ -5,7 +5,7 @@
vars:
pwnagotchi:
hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}"
version: "{{ lookup('env', 'PWN_VERSION') | default('master', true) }} "
version: "{{ lookup('env', 'PWN_VERSION') | default('master', true) }}"
system:
boot_options:
- "dtoverlay=dwc2"