#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
This commit is contained in:
Rach Belaid 2013-08-10 16:16:21 +01:00 committed by Rachid Belaid
parent a542ff967b
commit a4c555a5b7
2 changed files with 8 additions and 12 deletions

View File

@ -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

View File

@ -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