Commit 23b85633 authored by Rach Belaid's avatar Rach Belaid Committed by Rachid Belaid

#269 Make local_state_tree option not mandatory

Update and rename salt.html.markdown to salt-masterless.html.markdown
salt.html.markdown had a better history and formatting
And remove local_state_tree from required option from code and docs
parent df641d59
...@@ -68,13 +68,12 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { ...@@ -68,13 +68,12 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
} }
} }
if p.config.LocalStateTree == "" { if p.config.LocalStateTree != "" {
errs = packer.MultiErrorAppend(errs, if _, err := os.Stat(p.config.LocalStateTree); err != nil {
errors.New("Please specify a local_state_tree"))
} else if _, err := os.Stat(p.config.LocalStateTree); err != nil {
errs = packer.MultiErrorAppend(errs, errs = packer.MultiErrorAppend(errs,
errors.New("local_state_tree must exist and be accessible")) errors.New("local_state_tree must exist and be accessible"))
} }
}
if errs != nil && len(errs.Errors) > 0 { if errs != nil && len(errs.Errors) > 0 {
return errs return errs
......
...@@ -24,14 +24,11 @@ The example below is fully functional. ...@@ -24,14 +24,11 @@ The example below is fully functional.
The reference of available configuration options is listed below. The only required argument is the path to your local salt state tree. The reference of available configuration options is listed below. The only required argument is the path to your local salt state tree.
Required: Optional:
* `local_state_tree` (string) - The path to your local * `local_state_tree` (string) - The path to your local
[state tree](http://docs.saltstack.com/ref/states/highstate.html#the-salt-state-tree). [state tree](http://docs.saltstack.com/ref/states/highstate.html#the-salt-state-tree).
This will be uploaded to the `/srv/salt` on the remote, and removed before This will be uploaded to the `/srv/salt` on the remote.
shutdown.
Optional:
* `skip_bootstrap` (boolean) - By default the salt provisioner runs * `skip_bootstrap` (boolean) - By default the salt provisioner runs
[salt bootstrap](https://github.com/saltstack/salt-bootstrap) to install [salt bootstrap](https://github.com/saltstack/salt-bootstrap) to install
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment