theforeman/foreman_salt — pull request #5 by bechtoldt (2014-09-20 19:23:35+00:00)
Title: Set environment in the Salt ENC output for Salt's salt.tops.ext_nodes

The output should be like

```
---
classes:
- class1
- class2
- class3
environment: prod
parameters:
puppetmaster: ''
domainname: ''
hostgroup:

root_pw:

foreman_env: prod
salt_master:

```

The Salt master top module salt.tops.ext_nodes can use it in https://github.com/saltstack/salt/blob/develop/salt/tops/ext_nodes.py#L83 to tell Salt in which environment to look for the states.

```
# salt 'minion1.*' state.show_top
Executing job with jid 20140920211440447223
-------------------------------------------

minion1.domain.de:
----------
prod:
- class1
- class2
- class3
```

Salt's default environment is always "base".