Thanks On Friday, 6 December 2019 22:43:58 UTC+5:30, Dick Visser wrote: > > that module has just been introduced (or more accurate renamed) so it may > be that your ansible is pre 2.9 and doesn’t know about it. > If so upgrade, or use the old module name (facts instead of info) > > On Fri, 6 Dec 2019 at 15:17, P. Varsha <[email protected] <javascript:>> > wrote: > >> give one space before - name:EC2 Facts >> >> On Fri, Dec 6, 2019 at 7:22 PM S.Mahesh Kumar <[email protected] >> <javascript:>> wrote: >> >>> I am receiving error. >>> can someone pls help me. >>> code >>> --- >>> - 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 }}" >>> >>> >>> getting below error, >>> >>> ERROR! no action detected in task. This often indicates a misspelled >>> module name, or incorrect module path. >>> 11 >>> 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. >>> 14 >>> 15 >>> The offending line appears to be: >>> 16 >>> 17 >>> 18 >>> - name: EC2 Facts >>> 19 >>> ^ here >>> 20 >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ansible Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/ansible-project/eb114ac0-9898-4471-9fec-3e7a20800da6%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/ansible-project/eb114ac0-9898-4471-9fec-3e7a20800da6%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/CAA3T03%2B0y6Oo1S8BijJwNH3s1omA84tNnGsDb694uKCpkgz-2g%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/ansible-project/CAA3T03%2B0y6Oo1S8BijJwNH3s1omA84tNnGsDb694uKCpkgz-2g%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > Sent from a mobile device - please excuse the brevity, spelling and > punctuation. >
-- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f139fe67-1fa5-4c2f-a326-2fdc6c062401%40googlegroups.com.
