-
-
Save jalons/63466ce310dc3627743b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
salt SERVER state.sls dep.port "pillar={deployment:{'Application':'AppName', 'destination':'/opt/local/AppName', 'foo':'baz', 'version':'somestring', 'application_directory':'/opt/local/'}}" env=Staging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set application_name = pillar['deployment']['Application'] %} | |
{{ application_name }}_sync_states: | |
module.run: | |
- name: saltutil.sync_states | |
- env: Staging | |
{{ application_name }}_sync_modules: | |
module.run: | |
- name: saltutil.sync_modules | |
- env: Staging | |
port_{{ application_name }}: | |
deploy_port.deploy: | |
- name: {{ application_name }} | |
- version: {{ salt['pillar.get']('deployment:version') }} | |
- destination: {{ salt['pillar.get']('deployment:destination', '/opt/local/') }} | |
- user: {{ salt['pillar.get']('deployment:user', 'root') }} | |
- current: {{ salt['pillar.get']('deployment:set_current_directory', 'True') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So, rather than repeat AppName at both Application and destination, I'd like to beable to append Application value to the end of destination, something like: | |
port_{{ application_name }}: | |
deploy_port.deploy: | |
- name: {{ application_name }} | |
- destination: {{ salt['pillar.get']('deployment:destination')salt['pillar.get']('deployment:application') }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment