Comments (5)
That would be great. I'm still working on integration tests so it's no
wonder there a couple of bugs. Also... I need to verify nothing is broken
on 0.8.2.
On Aug 10, 2015 19:53, "Alex White" [email protected] wrote:
After a clean pip install of python-packer (which is pretty neat by the
by), I noticed that validating json would fail when using a var-file.
Packer is actually looking for -var-file, rather than -vars-file.[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Python shell history and tab completion are enabled.import packer
packerfile = '/home/prata/code/packer/templates/webserver.json'
exc = []
vars_file = '/home/prata/code/packer/environment/kuei-jin.json'
packer_exec_path = '/opt/packer/packer'
p = packer.Pack(packerfile, exc=exc, vars_file=vars_file,
exec_path=packer_exec_path)
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'Pack'
p = packer.Packer(packerfile, exc=exc, vars_file=vars_file,
exec_path=packer_exec_path)
p.validate(syntax_only=False)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/packer/init.py", line 124, in
validate
return command()
File "/usr/lib/python2.7/site-packages/sh.py", line 1021, in call
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/lib/python2.7/site-packages/sh.py", line 486, in init
self.wait()
File "/usr/lib/python2.7/site-packages/sh.py", line 500, in wait
self.handle_command_exit_code(exit_code)
File "/usr/lib/python2.7/site-packages/sh.py", line 516, in
handle_command_exit_code
raise exc(self.ran, self.process.stdout, self.process.stderr)
sh.ErrorReturnCode_1:RAN: '/opt/packer/packer validate
-vars-file=/home/prata/code/packer/environment/kuei-jin.json
/home/prata/code/packer/templates/webserver.json'Options:
-syntax-only Only check syntax. Do not verify config of the template.
-except=foo,bar,baz Validate all builds other than these
-only=foo,bar,baz Validate only these builds
-var 'key=value' Variable for templates, can be used multiple times.
-var-file=path JSON file containing user variables.I removed the Usage info and just copied the Options section from the
error. Below is my version of packer being used.[prata@kusanagi packer]$ /opt/packer/packer version
Packer v0.7.5Your version of Packer is out of date! The latest version
is 0.8.2. You can update by downloading from www.packer.io
[prata@kusanagi packer]$Would you like me to submit a pull request for this? It's a pretty simple
change. Thanks!—
Reply to this email directly or view it on GitHub
#1.
from python-packer.
I have just hit exactly this bug! Did the pull request ever happen? If not I am more than happy to submit one
from python-packer.
That would be wonderful.
On Apr 1, 2016 17:31, "andyjp94" [email protected] wrote:
I have just hit exactly this bug! Did the pull request ever happen? If not
I am more than happy to submit one—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1 (comment)
from python-packer.
I've submitted pull requests #4 and #5 that should fix the -var-file syntax. Please accept soon, really want to use this module! I've been using subprocess hideously up until now to achieve the same thing.
from python-packer.
Merged.
from python-packer.
Related Issues (7)
- Remove installer HOT 1
- Remove `sh` dependency HOT 1
- Support --on-error HOT 1
- Still there? HOT 1
- Open for contributions?
- no output to stdout HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-packer.