I am receiving error.
---
- hosts: all
gather_facts: yes
vars:
aws_region: us-east-1b
tasks:
- import_tasks: ../Global/aws.yml
vars:
- aws_env: "{{ aws_env }}"
- region: "{{ aws_region }}"
- name: EC2 Facts
ec2_instance_info:
aws_access_key: "{{ AWS_ACCESS_KEY_ID }}"
aws_secret_key: "{{ AWS_SECRET_ACCESS_KEY }}"
security_token: "{{ AWS_SESSION_TOKEN }}"
region: "{{ aws_region }}"
filters:
"tag:Name": TimeZone
"tag:Value": IST_TEST
register: ec2
- name: Kill EC2 Instance
ec2:
instance_ids: "{{ ec2.instances[0].id }}"
state: "{{ state }}"
region: "{{ lookup('env', 'AWS_REGION') }}"
aws_access_key: "{{ lookup('env', 'AWS_ACCESS_KEY_ID') }}"
aws_secret_key: "{{ lookup('env', 'AWS_SECRET_ACCESS_KEY') }}"
security_token: "{{ AWS_SESSION_TOKEN }}"
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
12
The error appears to be in '/tmp/awx_47171_pw8uryez/project/EC2/Ec2 scheduled stop.yml': line 12, column 5, but may
13
be elsewhere in the file depending on the exact syntax problem.
15
The offending line appears to be: