Skip to content

Commit

Permalink
Fixed curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Fenske committed Jun 7, 2016
1 parent 8aacb1f commit 6e00d48
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
16 changes: 8 additions & 8 deletions provision-basic-asg-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
vars:
image: '{{ ami }}'
architecture: 'workshop-basic'
loadb: '{{architecture}}-lb'
auto_sc: '{{architecture}}_asg'
lc: '{{architecture}}_lc'
loadb: '{{ architecture }}-lb'
auto_sc: '{{ architecture }}_asg'
lc: '{{ architecture }}_lc'

vars_files:
- amiKeys.yml
Expand All @@ -19,9 +19,9 @@
ec2_elb_lb:
aws_access_key: '{{ ami_access }}'
aws_secret_key: '{{ ami_secret }}'
security_group_ids: '{{group}}'
name: '{{loadb}}'
region: '{{regi}}'
security_group_ids: '{{ group }}'
name: '{{ loadb }}'
region: '{{ regi }}'
subnets: '{{ subnetID }}'
state: '{{ state }}'
listeners:
Expand All @@ -35,8 +35,8 @@
ec2_lc:
aws_access_key: '{{ ami_access }}'
aws_secret_key: '{{ ami_secret }}'
region: '{{regi}}'
name: '{{lc}}'
region: '{{ regi }}'
name: '{{ lc }}'
image_id: '{{ image }}'
key_name: '{{ keypair }}'
security_groups: '{{ group }}'
Expand Down
12 changes: 6 additions & 6 deletions provision-elb-custom-healthcheks-asg-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
vars:
image: '{{ ami }}'
architecture: 'workshop-ec2-healthchecks'
loadb: '{{architecture}}-lb'
auto_sc: '{{architecture}}-asg'
lc: '{{architecture}}-lc'
loadb: '{{ architecture }}-lb'
auto_sc: '{{ architecture }}-asg'
lc: '{{ architecture }}-lc'

vars_files:
- amiKeys.yml
Expand All @@ -20,9 +20,9 @@
scheme: internal
aws_access_key: '{{ ami_access }}'
aws_secret_key: '{{ ami_secret }}'
security_group_ids: '{{group}}'
name: '{{loadb}}'
region: '{{regi}}'
security_group_ids: '{{ group }}'
name: '{{ loadb }}'
region: '{{ regi }}'
health_check:
ping_protocol: http
ping_port: 8080
Expand Down
40 changes: 20 additions & 20 deletions provision-elb-ec2-metric-alarm-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
vars:
image: '{{ ami }}'
architecture: 'workshop-ec2-healthchecks'
loadb: '{{architecture}}-lb'
auto_sc: '{{architecture}}-asg'
lc: '{{architecture}}-lc'
loadb: '{{ architecture }}-lb'
auto_sc: '{{ architecture }}-asg'
lc: '{{ architecture }}-lc'

vars_files:
- amiKeys.yml
Expand All @@ -21,8 +21,8 @@
aws_access_key: '{{ ami_access }}'
aws_secret_key: '{{ ami_secret }}'
security_group_ids: '{{group}}'
name: '{{loadb}}'
region: '{{regi}}'
name: '{{ loadb }}'
region: '{{ regi }}'
health_check:
ping_protocol: http
ping_port: 8080
Expand Down Expand Up @@ -85,28 +85,28 @@
ec2_scaling_policy:
aws_access_key: '{{ ami_access }}'
aws_secret_key: '{{ ami_secret }}'
region: '{{regi}}'
region: '{{ regi }}'
state: '{{ state }}'
name: '{{item.pol_name}}'
name: '{{item.pol_name }}'
adjustment_type: 'ChangeInCapacity'
asg_name: '{{auto_sc}}'
scaling_adjustment: '{{item.changes}}'
asg_name: '{{ auto_sc }}'
scaling_adjustment: '{{ item.changes }}'
min_adjustment_step: 1
cooldown: 300
register: policies
with_items:
- pol_name: 'cpuUP_{{auto_sc}}_policy'
- pol_name: 'cpuUP_{{ auto_sc }}_policy'
changes: +1
- pol_name: 'cpuDown_{{auto_sc}}_policy'
- pol_name: 'cpuDown_{{ auto_sc }}_policy'
changes: -1

- name: Metric Alarms
ec2_metric_alarm:
aws_access_key: '{{ ami_access }}'
aws_secret_key: '{{ ami_secret }}'
state: '{{ state }}'
region: '{{regi}}'
name: '{{item.names}}'
region: '{{ regi }}'
name: '{{ item.names }}'
metric: 'CPUUtilization'
namespace: 'AWS/EC2'
statistic: Average
Expand All @@ -115,17 +115,17 @@
period: 60
evaluation_periods: 1
unit: 'Percent'
description: '{{item.desc}}'
dimensions: {'AutoScalingGroupName':'{{auto_sc}}'}
alarm_actions: '{{item.pol}}'
description: '{{ item.desc }}'
dimensions: {'AutoScalingGroupName':'{{ auto_sc }}'}
alarm_actions: '{{ item.pol }}'
with_items:
- names: 'cpuUP_{{auto_sc}}'
- names: 'cpuUP_{{ auto_sc }}'
compare: '>='
limits: '20.0'
desc: 'This will alarm when the average cpu usage of the ASG is greater than 20% for 1 minute'
pol: "{{policies.results[0]['arn']}}"
- names: 'cpuDown_{{auto_sc}}'
pol: "{{ policies.results[0]['arn'] }}"
- names: 'cpuDown_{{ auto_sc }}'
compare: '<='
limits: '10.0'
desc: 'This will alarm when the average cpu usage of the ASG is less than 10% for 1 minute'
pol: "{{policies.results[1]['arn']}}"
pol: "{{ policies.results[1]['arn'] }}"

0 comments on commit 6e00d48

Please sign in to comment.