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
# Two inconsistent and unclear ways of defining a state: | |
pkg.installed: | |
- name: mypackage | |
apache2: | |
pkg | |
- installed | |
service: | |
- running |
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 my launch config exists: | |
boto_launch_config.present: | |
- name: my-launch-config-name | |
- ami: ami-887i9080 | |
- instance_type: c3.2xlarge | |
- register: my_launch_config | |
Ensure my autoscale group exists: | |
boto_autoscale_group.present: | |
- name: my-autoscale-group-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
{% 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
Ensure myelb exists: | |
boto_elb.present: | |
- name: myelb | |
- availability_zones: | |
- us-east-1a | |
- listeners: | |
- elb_port: 80 | |
instance_port: 8210 | |
elb_protocol: HTTP | |
- elb_port: 443 |
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
Run apt-get update on ppa additions: | |
module.wait: | |
- name: pkg.refresh_db | |
Ensure openstack ppa: | |
pkgrepo.managed: | |
- ppa: openstack-ubuntu-testing/juno | |
- refresh_db: False | |
- watch_in: | |
- module: pkg.refresh_db |
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
{{ (grains['mem_total'] * 1024) * 0.1 | round(1, 'floor') | int }} | |
0 | |
{{ (grains['mem_total'] * 1024) / 10 | round(1, 'floor') | int }} | |
383795.2 | |
{{ ((grains['mem_total'] * 1024) * 0.1) | round(1, 'floor') | int }} |
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
def testme(): | |
if not 'testme.testme' in __context__: | |
__context__['testme.testme'] = 1 | |
else: | |
__context__['testme.testme'] = __context__['testme.testme'] + 1 | |
return __context__['testme.testme'] |
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
### Apache | |
Ensure apache packages are installed: | |
pkg.installed: | |
- pkgs: | |
- apache2 | |
- apache2-utils | |
- libapache2-mod-wsgi | |
Ensure apache is stopped on install: | |
cmd.wait: |
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
KeyError: 'file_|-Ensure statsd supervisor configuration exists_|-/etc/supervisor/conf.d/statsd.conf_|-managed' | |
Traceback (most recent call last): | |
File "/usr/bin/salt-call", line 11, in <module> | |
salt_call() | |
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 128, in salt_call | |
client.run() | |
File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 398, in run | |
caller.run() | |
File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 186, in run | |
ret = self.call() |
OlderNewer