---
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Create a security group
ec2_group:
- name: Ansible
description: Ansible security group
region: us-east-1
rules:
- proto: tcp
from_port: 80
to_port: 80
cidr_ip: 0.0.0.0/0
- proto: tcp
from_port: 22
to_port: 22
cidr_ip: 0.0.0.0/0
When I run this playbook I am getting the error below
[root]#ansible-playbook aws1.yaml ERROR! unexpected parameter type in action:
The error appears to be in '/root/Desktop/ansible_pro/aws/1/aws1.yaml': line 6, column 7, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: Create a security group
^ here
I am new with aws with ansible. Please help