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
f3331afb
Commit
f3331afb
authored
Jul 31, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provisioner/salt-masterless: don't capitalize Ui
/cc @rgarcia - Not sure why this was capitalized to begin with
parent
7e5c64ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
provisioner/salt-masterless/provisioner.go
provisioner/salt-masterless/provisioner.go
+6
-7
No files found.
provisioner/salt-masterless/provisioner.go
View file @
f3331afb
...
...
@@ -59,42 +59,41 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
func
(
p
*
Provisioner
)
Provision
(
ui
packer
.
Ui
,
comm
packer
.
Communicator
)
error
{
var
err
error
Ui
=
ui
if
!
p
.
config
.
SkipBootstrap
{
cmd
:=
&
packer
.
RemoteCmd
{
Command
:
fmt
.
Sprintf
(
"wget -O - http://bootstrap.saltstack.org | sudo sh -s %s"
,
p
.
config
.
BootstrapArgs
),
}
U
i
.
Say
(
fmt
.
Sprintf
(
"Installing Salt with command %s"
,
cmd
))
u
i
.
Say
(
fmt
.
Sprintf
(
"Installing Salt with command %s"
,
cmd
))
if
err
=
cmd
.
StartWithUi
(
comm
,
ui
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Unable to install Salt: %d"
,
err
)
}
}
U
i
.
Say
(
fmt
.
Sprintf
(
"Creating remote directory: %s"
,
p
.
config
.
TempConfigDir
))
u
i
.
Say
(
fmt
.
Sprintf
(
"Creating remote directory: %s"
,
p
.
config
.
TempConfigDir
))
cmd
:=
&
packer
.
RemoteCmd
{
Command
:
fmt
.
Sprintf
(
"mkdir -p %s"
,
p
.
config
.
TempConfigDir
)}
if
err
=
cmd
.
StartWithUi
(
comm
,
ui
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Error creating remote salt state directory: %s"
,
err
)
}
U
i
.
Say
(
fmt
.
Sprintf
(
"Uploading local state tree: %s"
,
p
.
config
.
LocalStateTree
))
u
i
.
Say
(
fmt
.
Sprintf
(
"Uploading local state tree: %s"
,
p
.
config
.
LocalStateTree
))
if
err
=
UploadLocalDirectory
(
p
.
config
.
LocalStateTree
,
p
.
config
.
TempConfigDir
,
comm
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Error uploading local state tree to remote: %s"
,
err
)
}
U
i
.
Say
(
fmt
.
Sprintf
(
"Moving %s to /srv/salt"
,
p
.
config
.
TempConfigDir
))
u
i
.
Say
(
fmt
.
Sprintf
(
"Moving %s to /srv/salt"
,
p
.
config
.
TempConfigDir
))
cmd
=
&
packer
.
RemoteCmd
{
Command
:
fmt
.
Sprintf
(
"sudo mv %s /srv/salt"
,
p
.
config
.
TempConfigDir
)}
if
err
=
cmd
.
StartWithUi
(
comm
,
ui
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Unable to move %s to /srv/salt: %d"
,
p
.
config
.
TempConfigDir
,
err
)
}
U
i
.
Say
(
"Running highstate"
)
u
i
.
Say
(
"Running highstate"
)
cmd
=
&
packer
.
RemoteCmd
{
Command
:
"sudo salt-call --local state.highstate -l info"
}
if
err
=
cmd
.
StartWithUi
(
comm
,
ui
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Error executing highstate: %s"
,
err
)
}
U
i
.
Say
(
"Removing /srv/salt"
)
u
i
.
Say
(
"Removing /srv/salt"
)
cmd
=
&
packer
.
RemoteCmd
{
Command
:
"sudo rm -r /srv/salt"
}
if
err
=
cmd
.
StartWithUi
(
comm
,
ui
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Unable to remove /srv/salt: %d"
,
err
)
...
...
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