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
Comment: An exception occurred in this state: Traceback (most recent call last): | |
File "venv/src/salt/salt/state.py", line 1563, in call | |
**cdata['kwargs']) | |
File "mymodules/states/boto_dynamodb.py", line 371, in present | |
s3_base_location=config['s3_base_location'], | |
File "mymodules/states/boto_dynamodb.py", line 462, in _ensure_backup_datapipeline_present | |
return __states__['boto_datapipeline.present'](**kwargs) | |
File "venv/src/salt/salt/utils/lazy.py", line 87, in __getitem__ | |
return self._dict[key] | |
KeyError: 'boto_datapipeline.present' |
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
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
{{ (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() |
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
$script = <<SCRIPT | |
# Install salt dependencies | |
sudo apt-get -y update | |
sudo apt-get install -y build-essential libssl-dev python-dev python-m2crypto \ | |
python-pip python-virtualenv python-zmq swig virtualenvwrapper git-core python-apt | |
if [ ! -d /srv/salt/venv ] | |
then | |
sudo mkdir -p /srv/salt/venv | |
fi |
OlderNewer