kenn/sunzi — pull request #31 by JoeSouthan (2014-05-29 00:46:25+00:00)
Title: Load a "secrets" YAML file for use in Sunzi

An easy way to import "secret" YAML files so that all secrets stay in one place.

To use:

Add an ```environment_file``` (with a path string) under ```attributes``` and use ```@environment.SOMETHING``` to output whatever is needed

eg:

```
# sunzi.yml
attributes:
environment: production
ruby_version: 2.1.1
postgres_version: 9.3
environment_file: "../application.yml"
```

```
# application.yml
PRODUCTION_USER: deploy
```

```
# adduser.sh
if [ -d /home/<%= @environment.PRODUCTION_USER %> ]; then
echo "User already created skipping"
else
# etc
fi
```