This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ print(p.fix(output_file))
5656The ` output_file ` parameter will write the output of the ` fix ` function to a file.
5757
5858
59- ### [ Packer.inspect()] ( https://www.packer.io/docs/command-line/inspect.html )
59+ ### [ Packer.inspect()] ( https://www.packer.io/docs/command-line/inspect.html )
6060
6161A ` -machine-readable ` (mrf) argument is provided.
6262
@@ -152,6 +152,19 @@ p = packer.Packer(packerfile, ...)
152152print (p.version())
153153```
154154
155+ ### PackerInstaller.install()
156+
157+ This installs packer to ` packer_path ` using the ` installer_path ` and verifies that the installation was successful.
158+
159+ ``` python
160+
161+ packer_path = ' /usr/bin/'
162+ installer_path = ' Downloads/packer_0.7.5_linux_amd64.zip'
163+
164+ p = packer.Installer(packer_path, installer_path)
165+ p.install()
166+ ```
167+
155168## Shell Interaction
156169
157170The [ sh] ( http://amoffat.github.io/sh/ ) Python module is used to execute Packer.
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ def _parse_inspection_output(self, output):
204204 return parts
205205
206206
207- class Install ():
207+ class Installer ():
208208 def __init__ (self , packer_path , installer_path ):
209209 self .packer_path = packer_path
210210 self .installer_path = installer_path
@@ -232,6 +232,3 @@ class ValidationObject():
232232
233233class PackerException (Exception ):
234234 pass
235-
236-
237- # 0587508070
Original file line number Diff line number Diff line change 99vars = {}
1010vars_file = '/x'
1111
12- p = packer .Install ('packer_executables/' , 'packer_0.7.5_linux_amd64.zip' )
12+ p = packer .Installer ('packer_executables/' , 'packer_0.7.5_linux_amd64.zip' )
1313# If we installed packer using the provided installer, it will return
1414# packer's executable path. We can use it below:
1515# packer_exec = p.install()
You can’t perform that action at this time.
0 commit comments