Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29250

I am getting an error when I am trying to runn ansible playbook that creates a ec2 security group

$
0
0
---
- 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


Viewing all articles
Browse latest Browse all 29250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>