Ansible Playbook error
by pantdk from LinuxQuestions.org on (#5FQY8)
Hi All,
I am trying to create an instance on AWS using Ansible playbook.
Ansible is installed on the RHEL7 and I have allowed the localhost on /etc/ansible/hosts
[localhost]
localhost
Please find the details of the error and playbook. Kindly suggest where I need to check the issue.
Quote:
Quote:


I am trying to create an instance on AWS using Ansible playbook.
Ansible is installed on the RHEL7 and I have allowed the localhost on /etc/ansible/hosts
[localhost]
localhost
Please find the details of the error and playbook. Kindly suggest where I need to check the issue.
Quote:
--- - name: Working with AWS EC2 Instance hosts: localhost connection: local gather_facts: false tasks: - name: Working with AWS EC2 I ec2: key_name: IT_key region: us-west-2 instance_type: t2.micro image: ami-077475371a476c548 group-id: sg-bef855c3 vpc_subnet_id: subnet-db5ba982 assign_publc_ip: no count: 1 aws_access_key: xxxxx aws_secret_key: xxxxx wait: yes wait_timeout: 500 instance_tags: Component: NA Department: IT Name: Testing-Ansible ProjectCode: 85 ProjectOwner: Dk Managers: dk Owner: dk Environment: Testing-Ansible Product: Ansible RequestID: NA AuditID: NA Tech: NA monitoring: yes |
Quote:
[root@ip-172-31-44-212 project]# ansible-playbook ec2-server.yaml -C [WARNING]: Found both group and host with same name: localhost PLAY [Working with AWS EC2 Instance] **************************************************************************************************** **************************************************** TASK [Working with AWS EC2 I] **************************************************************************************************** *********************************************************** fatal: [localhost]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Unsupported parameters for (ec2) module: assign_publc_ip, group-id Supported parameters include: assign_public_ip, aws_access_key, aws_secret_key, count, count_tag, debug_botocore_endpoint_logs, ebs_optimized, ec2_url, exact_count, group, group_id, id, image, instance_ids, instance_initiated_shutdown_behavior, instance_profile_name, instance_tags, instance_type, kernel, key_name, monitoring, network_interfaces, placement_group, private_ip, profile, ramdisk, region, security_token, source_dest_check, spot_launch_group, spot_price, spot_type, spot_wait_timeout, state, tenancy, termination_protection, user_data, validate_certs, volumes, vpc_subnet_id, wait, wait_timeout, zone"} PLAY RECAP **************************************************************************************************** ****************************************************************************** localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 [root@ip-172-31-44-212 project]# |