2013-07-26 17:15:02 -04:00
|
|
|
---
|
2017-06-14 21:04:16 -04:00
|
|
|
description: |
|
|
|
|
The salt-masterless Packer provisioner provisions machines built by Packer
|
|
|
|
using Salt states, without connecting to a Salt master.
|
2015-07-22 22:31:00 -04:00
|
|
|
layout: docs
|
2017-06-14 21:04:16 -04:00
|
|
|
page_title: 'Salt Masterless - Provisioners'
|
|
|
|
sidebar_current: 'docs-provisioners-salt-masterless'
|
2017-03-25 18:13:52 -04:00
|
|
|
---
|
2013-07-26 17:15:02 -04:00
|
|
|
|
2013-07-29 02:30:03 -04:00
|
|
|
# Salt Masterless Provisioner
|
2013-07-26 17:15:02 -04:00
|
|
|
|
2013-07-29 02:30:03 -04:00
|
|
|
Type: `salt-masterless`
|
2013-07-26 17:15:02 -04:00
|
|
|
|
2015-07-22 22:31:00 -04:00
|
|
|
The `salt-masterless` Packer provisioner provisions machines built by Packer
|
|
|
|
using [Salt](http://saltstack.com/) states, without connecting to a Salt master.
|
2013-07-26 17:15:02 -04:00
|
|
|
|
|
|
|
## Basic Example
|
|
|
|
|
|
|
|
The example below is fully functional.
|
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
``` json
|
2013-07-26 17:15:02 -04:00
|
|
|
{
|
2014-10-20 13:55:16 -04:00
|
|
|
"type": "salt-masterless",
|
|
|
|
"local_state_tree": "/Users/me/salt"
|
2013-07-26 17:15:02 -04:00
|
|
|
}
|
2014-10-20 13:55:16 -04:00
|
|
|
```
|
2013-07-26 17:15:02 -04:00
|
|
|
|
|
|
|
## Configuration Reference
|
|
|
|
|
2015-07-22 22:31:00 -04:00
|
|
|
The reference of available configuration options is listed below. The only
|
2017-07-16 12:19:38 -04:00
|
|
|
required element is "local_state_tree".
|
|
|
|
|
|
|
|
Required:
|
|
|
|
|
|
|
|
- `local_state_tree` (string) - The path to your local [state
|
|
|
|
tree](http://docs.saltstack.com/ref/states/highstate.html#the-salt-state-tree).
|
|
|
|
This will be uploaded to the `remote_state_tree` on the remote.
|
2013-07-26 17:15:02 -04:00
|
|
|
|
2013-08-10 11:16:21 -04:00
|
|
|
Optional:
|
2013-07-27 02:36:14 -04:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `bootstrap_args` (string) - Arguments to send to the bootstrap script. Usage
|
2015-07-22 23:25:58 -04:00
|
|
|
is somewhat documented on
|
|
|
|
[github](https://github.com/saltstack/salt-bootstrap), but the [script
|
|
|
|
itself](https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh)
|
|
|
|
has more detailed usage instructions. By default, no arguments are sent to
|
|
|
|
the script.
|
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `disable_sudo` (boolean) - By default, the bootstrap install command is prefixed with `sudo`. When using a
|
2015-11-02 16:35:07 -05:00
|
|
|
Docker builder, you will likely want to pass `true` since `sudo` is often not pre-installed.
|
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `remote_pillar_roots` (string) - The path to your remote [pillar
|
2015-07-28 01:37:26 -04:00
|
|
|
roots](http://docs.saltstack.com/ref/configuration/master.html#pillar-configuration).
|
2015-08-23 07:56:16 -04:00
|
|
|
default: `/srv/pillar`. This option cannot be used with `minion_config`.
|
2015-07-28 01:37:26 -04:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `remote_state_tree` (string) - The path to your remote [state
|
2015-07-28 01:37:26 -04:00
|
|
|
tree](http://docs.saltstack.com/ref/states/highstate.html#the-salt-state-tree).
|
2015-08-23 07:56:16 -04:00
|
|
|
default: `/srv/salt`. This option cannot be used with `minion_config`.
|
2015-07-28 01:37:26 -04:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `local_pillar_roots` (string) - The path to your local [pillar
|
2015-07-22 23:25:58 -04:00
|
|
|
roots](http://docs.saltstack.com/ref/configuration/master.html#pillar-configuration).
|
2015-07-28 01:37:26 -04:00
|
|
|
This will be uploaded to the `remote_pillar_roots` on the remote.
|
2015-07-22 23:25:58 -04:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `custom_state` (string) - A state to be run instead of `state.highstate`.
|
2016-08-03 15:56:51 -04:00
|
|
|
Defaults to `state.highstate` if unspecified.
|
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `minion_config` (string) - The path to your local [minion config
|
2015-07-31 00:16:11 -04:00
|
|
|
file](http://docs.saltstack.com/ref/configuration/minion.html). This will be
|
2015-08-23 07:56:16 -04:00
|
|
|
uploaded to the `/etc/salt` on the remote. This option overrides the
|
|
|
|
`remote_state_tree` or `remote_pillar_roots` options.
|
2015-07-22 23:25:58 -04:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `grains_file` (string) - The path to your local [grains file](https://docs.saltstack.com/en/latest/topics/grains). This will be
|
2017-06-05 15:56:42 -04:00
|
|
|
uploaded to `/etc/salt/grains` on the remote.
|
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `skip_bootstrap` (boolean) - By default the salt provisioner runs [salt
|
2015-07-22 23:25:58 -04:00
|
|
|
bootstrap](https://github.com/saltstack/salt-bootstrap) to install salt. Set
|
|
|
|
this to true to skip this step.
|
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `temp_config_dir` (string) - Where your local state tree will be copied
|
2015-07-22 23:25:58 -04:00
|
|
|
before moving to the `/srv/salt` directory. Default is `/tmp/salt`.
|
2015-08-23 08:40:05 -04:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `no_exit_on_failure` (boolean) - Packer will exit if the `salt-call` command
|
2015-08-23 08:40:05 -04:00
|
|
|
fails. Set this option to true to ignore Salt failures.
|
2015-08-23 08:47:49 -04:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `log_level` (string) - Set the logging level for the `salt-call` run.
|
2016-11-11 09:15:16 -05:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `salt_call_args` (string) - Additional arguments to pass directly to `salt-call`. See
|
2016-11-11 09:15:16 -05:00
|
|
|
[salt-call](https://docs.saltstack.com/ref/cli/salt-call.html) documentation for more
|
|
|
|
information. By default no additional arguments (besides the ones Packer generates)
|
|
|
|
are passed to `salt-call`.
|
2017-06-06 11:03:03 -04:00
|
|
|
|
2017-06-14 21:04:16 -04:00
|
|
|
- `salt_bin_dir` (string) - Path to the `salt-call` executable. Useful if it is not
|
2017-06-06 11:03:03 -04:00
|
|
|
on the PATH.
|