Skip to content

Commit

Permalink
Last tech edit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nmelehan committed Nov 14, 2018
1 parent 68ffd33 commit 999b40a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ You can also supply pillar values as a dictionary through the command line, and

Another way to keep sensitive values out of version control is to use environment variables. The method for passing environment variables to your states is similar to how pillar data can be passed via the command line. The environment variable prefixes your salt command, as in this example:

LINODE_API_TOKEN="YOUR_API_TOKEN" salt '*' state.apply example.sls
LINODE_API_TOKEN="YOUR_API_TOKEN" salt 'appserver' state.apply setup_app

The environment variable is referenced by a Salt state file through the `salt['environ.get']('ENVIRONMENT_VARIABLE_NAME')` syntax. The previous `setup_app` example state can be adapted to use an environment variable as follows:

Expand Down

0 comments on commit 999b40a

Please sign in to comment.