I'm getting the following error when running my task. For some reason Ansible is complaining about >= characters, but it is ok with <= characters in the same file. I tried single quotes and double quotes around the characters but it causes other errors. Files and error message are as follows: Thank you for your help.
---
# -----------------------------------------------------
# AWS CloudWatch Alarms
# -----------------------------------------------------
- include_vars: ec2-alarms.yml
- debug: var=ec2-alarms
- name: ec2-alarms
with_items: ec2-alarms
local_action:
module: ec2_metric_alarm
state: present
region: "{{ item.region }}"
name: "{{ item.region }}-{{
item.name }}-{{ item.metric }}-instanceId-{{ item.instanceId }}"
metric: "{{ item.metric }}"
namespace: "AWS/EC2"
statistic: Average
comparison: "{{ item.comparison }}"
threshold: "{{ item.threshold }}"
period: 300
evaluation_periods: 1
unit: "{{ item.unit }}"
description: ""
dimensions: {"InstanceId":"{{ item.instanceId }}"}
alarm_actions: ["{{ item.alarm }}"]
tags: alarm
- name: ec2-ebs-alarms
local_action:
module: ec2_metric_alarm
state: present
region: "{{ item.region }}"
name: "{{ item.region }}-{{
item.name }}-{{ item.metric }}-volumeId-{{ item.volumeId }}"
metric: "{{ item.metric }}"
namespace: "AWS/EBS"
statistic: Average
comparison: "{{ item.comparison }}"
threshold: "{{ item.threshold }}"
period: "{{ item.period }}"
evaluation_periods: 1
unit: "{{ item.unit }}"
description: ""
dimensions: {"VolumeId":"{{ item.volumeId }}"}
alarm_actions: ["{{ item.alarm }}"]
with_items:
- { name: 'chanakatest4', region: 'us-west-2', metric: 'VolumeReadOps', comparison: '>=', threshold: '1350', period: '3600', unit: 'None', volumeId: 'vol-69907266', alarm: 'arn:aws:sns:us-west-2:779200210943:sysalerts' }
- { name: 'chanakatest5', region: 'us-west-2', metric: 'VolumeWriteOps', comparison: '>=', threshold: '1350', period: '3600', unit: 'None', volumeId: 'vol-69907266', alarm: 'arn:aws:sns:us-west-2:779200210943:sysalerts' }
tags: alarm