EC2, register, . , ec2_tag. :
- name: Set up metric alerts
hosts: 127.0.0.1
connection: local
tasks:
- name: Create CPU utilization metric alarm
ec2_metric_alarm:
args:
state: present
name: '{{ hostvars[item].ec_tag_Name }}'
metric: CPUUtilization
statistic: Average
comparison: ">="
threshold: 80.0
unit: Percent
period: 300
evaluation_periods: 1
description: >
Triggered when CPU utilization is more than
80% for 5 minutes
with_items: groups['your_targets']
, ( local_action), hostvars[item] , ec2_tag_Name .
: AFAIK Ansible. , Ansible , EC2 , ec2_tag_Foo , ansible-playbook , , ec2.py --refresh-cache . . , ec2_facts .