Commit Graph

17 Commits

Author SHA1 Message Date
Mitchell Hashimoto 812ba35479 fmt 2014-09-08 10:28:21 -07:00
Mitchell Hashimoto 9a0f92c5ad Merge branch 'template-timefmt' of github.com:njones/packer into njones-template-timefmt
Conflicts:
	packer/config_template.go
	website/source/docs/templates/configuration-templates.html.markdown
2014-09-05 16:21:30 -07:00
Nika Jones cd29c8d586 Fixes #1092, Adds a format option to the {{isotime}} variable.
Now using the golang magic date: Mon Jan 2 15:04:05 -0700 MST 2006
One can format the time like:

    {{isotime "2006-01-02"}} == "YYYY-MM-DD"
    {{isotime "060102-15"}}  == "YYMMDD-HH" (24-hour clock)
    {{isotime "060102-3"}}   == "YYMMDD-H"  (12-hour clock)

Using {{isotime}} as a standalone variable doesn't change. It still returns RFC3339 formatted time.
2014-05-06 06:18:16 -07:00
Nika Jones 13135cbf34 Fixes #1114, Adds upper and lower as filters for the template engine. 2014-05-06 04:10:44 -07:00
Mitchell Hashimoto e38c0424b9 packer: allow environmental variables within user vars [GH-633] 2013-12-28 09:34:17 -07:00
Mitchell Hashimoto 4c8b8d4fa7 packer: add `pwd` function with working directory [GH-762] 2013-12-27 20:46:10 -07:00
Mitchell Hashimoto 9239b6a25e packer: {{timestamp}} is the same for an entire build [GH-744] 2013-12-26 17:29:21 -07:00
Mitchell Hashimoto 386d72c31a packer: no more asserts lib 2013-10-16 21:09:27 -10:00
Mitchell Hashimoto 4bd3f09099 Merge branch 'master' of https://github.com/armon/packer into armon-master
Conflicts:
	packer/config_template.go
2013-09-05 17:12:15 -07:00
Mitchell Hashimoto 4642a6aee1 packer: uuid function 2013-09-05 12:19:56 -07:00
Armon Dadgar fab369bf15 Adding support for isotime template variable 2013-09-05 11:09:37 -07:00
Mitchell Hashimoto 71379bc8d7 packer: pass tests 2013-08-30 16:07:06 -07:00
Mitchell Hashimoto 662e74d070 provisioner/chef-solo: properly escape user vars for JSON
/cc @mwhooker - I moved the processing up into Prepare so that any
errors will be shown during a validate pass. Also, I escape some stuff
in keys. Tests moved as well.
2013-08-30 16:05:04 -07:00
Matthew Hooker d2e8bf476f reuse jsonString instead of opaque result var. 2013-08-28 20:16:06 -07:00
Matthew Hooker 9537f085ae clean up and retab. 2013-08-28 17:35:43 -07:00
Matthew Hooker 4b76b2d9e3 template expansion of `json` in chef-solo
Fixes #362
2013-08-28 17:27:22 -07:00
Mitchell Hashimoto 1e520b161b packer: ConfigTemplate, move from common 2013-08-15 19:11:27 -07:00