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 a = 'world' %} | |
{% set b = 'hello-{test}' %} | |
test: | |
file.touch: | |
- name: /tmp/{{ b.format(test=a) }} |
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
MYENVVAR="world" salt-call state.template test.sls |
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
{% if pillar.environment == 'production' %} | |
Ensure instance1 is configured: | |
file.managed: | |
- name /var/local/instance1/context.xml | |
- source: salt://instance.xml.tmpl | |
- template: jinja | |
- context: | |
somesetting: testme | |
{% else %} | |
Ensure instance1 is configured: |
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
saltmastertest_role: | |
boto_iam_role.present: | |
- name: saltmastertest | |
- region: us-east-1 | |
- policies: | |
saltmastertest: | |
Version: '2012-10-17' | |
Statement: | |
- Action: | |
- 'ec2:*' |
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
Ensure instance1 is configured: | |
file.managed: | |
- name /var/local/instance1/context.xml | |
- source: salt://instance.xml.tmpl | |
- template: jinja | |
- context: | |
var1: some content | |
var2: more content | |
Ensure instance2 is configured: |
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
users: | |
testuser: | |
full_name: Test User | |
id: 1001 | |
disabled: False |
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
base: | |
'*': | |
- base | |
- service-common | |
- order: 1 | |
{% for root in opts['pillar_roots']['base'] -%} | |
{% set service_group_sls = '{0}/{1}.sls'.format(root, grains['service_group']) -%} | |
{% if salt['file.file_exists'](service_group_sls) %} | |
'service_group:{{ grains["service_group"] }}': | |
- match: grain |
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
default: | |
url: https://confidant.example.com | |
auth_key: alias/confidant-production | |
auth_context: | |
# from context will be auto-set | |
to: confidant-production | |
user_type: user | |
token_cache_file: '/Users/myhomedir/.confidant_token' | |
region: us-east-1 |
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
Ensure {{ grains.workers.web.cluster_name }} asg exists: | |
boto_asg.present: | |
- name: {{ grains.workers.web.cluster_name }} | |
- launch_config_name: {{ grains.workers.web.cluster_name }} | |
- launch_config: | |
- image_id: {{ pillar.ec2_ami.iad.ubuntu14.hvm_ssd }} | |
- key_name: sshunusablekey | |
- security_groups: | |
- {{ grains.service_name }} | |
- instance_profile_name: {{ grains.workers.web.cluster_name }} |
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
Ensure {{ grains.workers.web.cluster_name }} elb exists: | |
boto_elb.present: | |
- name: {{ grains.workers.web.cluster_name }} | |
- listeners: | |
- elb_port: 80 | |
instance_port: 80 | |
elb_protocol: HTTP | |
- elb_port: 443 | |
instance_port: 80 | |
elb_protocol: HTTPS |
NewerOlder