That helped. Also needed correct modules. Thanks. Sanjay
On Mon, Jun 1, 2020 at 8:43 PM Neha Pithadiya <[email protected]> wrote: > Hi > > I think vpc_subnet_id value looks like as:- > > vpc_subnet_id: subnet-29e63245 > > Check the link below:- > https://docs.ansible.com/ansible/latest/modules/ec2_module.html > > Thanks > Neha > > > > On Tuesday, June 2, 2020 at 6:24:16 AM UTC+5:30, Sanjay Chakraborty wrote: >> >> Hi there, >> Can anyone please let me know what should be the correct syntax >> for defining vpc subnet id ? This is my playbook: >> --- >> - name: A play to launch ec2 instance >> hosts: localhost >> connection: local >> gather_facts: false >> vars: >> - proto: tcp >> ports: >> - 22 >> cidr_ip: xxx.xx.xx.xx/16 >> rule_desc: allow all connection on port 22 >> tasks: >> - name: Task to launch ec2 instance with default values >> ec2: >> key_name: xxxxxxx_key >> instance_type: t2.micro >> image: ami-xxxxxxxxx >> wait: yes >> count: 1 >> region: us-east-1 >> aws_access_key: xxxxxxxxxxxxxxx >> aws_secret_key: xxxxxxxxxxxxxxxxxxxxxx >> * vpc_subnet_id: vpc-xxxx ( copy pasted) * >> assign_public_ip: yes >> >> - name: Verbosity >> debug: >> msg: "ec2 output ..." >> verbosity: 4 >> >> Thanks. >> Sanjay Chakraborty >> >> -- > 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/88d729e1-56bd-4e3c-a519-4af7e111b2d3%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/88d729e1-56bd-4e3c-a519-4af7e111b2d3%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]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAHOFgkRzcCJkTxzR9GP4Gbwg6h-GQpgcnvU3O25igRsv6vNBLQ%40mail.gmail.com.
