Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
3bfeb548
Commit
3bfeb548
authored
Jul 25, 2014
by
yveslaroche
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Ansible inventory path on Windows
Convert the path to use a '/' separator.
parent
ca53d7e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
provisioner/ansible-local/provisioner.go
provisioner/ansible-local/provisioner.go
+2
-2
No files found.
provisioner/ansible-local/provisioner.go
View file @
3bfeb548
...
@@ -191,7 +191,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
...
@@ -191,7 +191,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
if
len
(
p
.
config
.
InventoryFile
)
>
0
{
if
len
(
p
.
config
.
InventoryFile
)
>
0
{
ui
.
Message
(
"Uploading inventory file..."
)
ui
.
Message
(
"Uploading inventory file..."
)
src
:=
p
.
config
.
InventoryFile
src
:=
p
.
config
.
InventoryFile
dst
:=
filepath
.
Join
(
p
.
config
.
StagingDir
,
filepath
.
Base
(
src
))
dst
:=
filepath
.
ToSlash
(
filepath
.
Join
(
p
.
config
.
StagingDir
,
filepath
.
Base
(
src
)
))
if
err
:=
p
.
uploadFile
(
ui
,
comm
,
dst
,
src
);
err
!=
nil
{
if
err
:=
p
.
uploadFile
(
ui
,
comm
,
dst
,
src
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Error uploading inventory file: %s"
,
err
)
return
fmt
.
Errorf
(
"Error uploading inventory file: %s"
,
err
)
}
}
...
@@ -259,7 +259,7 @@ func (p *Provisioner) executeAnsible(ui packer.Ui, comm packer.Communicator) err
...
@@ -259,7 +259,7 @@ func (p *Provisioner) executeAnsible(ui packer.Ui, comm packer.Communicator) err
// with a single host.
// with a single host.
inventory
:=
"
\"
127.0.0.1,
\"
"
inventory
:=
"
\"
127.0.0.1,
\"
"
if
len
(
p
.
config
.
InventoryFile
)
>
0
{
if
len
(
p
.
config
.
InventoryFile
)
>
0
{
inventory
=
filepath
.
Join
(
p
.
config
.
StagingDir
,
filepath
.
Base
(
p
.
config
.
InventoryFile
))
inventory
=
filepath
.
ToSlash
(
filepath
.
Join
(
p
.
config
.
StagingDir
,
filepath
.
Base
(
p
.
config
.
InventoryFile
)
))
}
}
extraArgs
:=
""
extraArgs
:=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment