Depends on how many more requirements you come up with in every new mail
On Sat, 22 Jan 2022 at 17:43, Tony Wong <[email protected]> wrote: > any idea? where do i put my ec2 tag names and assign to the instances > > On Fri, Jan 21, 2022 at 6:28 AM Tony Wong <[email protected]> wrote: > >> hi >> >> any idea how I can create multiple ec2 instances and tag it >> >> main.yml >> >> - include_vars: vars/main.yml >> - name: create the ec2 instance >> ec2: >> assign_public_ip: no >> group_id: '{{ deploy_env.sg_group }}' >> instance_type: "{{ deploy_env.instance_type }}" >> image: "{{ deploy_env.image }}" >> wait: true >> wait_timeout: 600 >> count: 10 >> region: "{{ deploy_env.region }}" >> vpc_subnet_id: "{{ deploy_env.vpc_subnet_id}}" >> private_ip: "{{ deploy_env.assign_ip }}" >> instance_tags: >> Name: "{{ deploy_env.instance_tags.name }}" >> >> --------------------------- >> >> how do i put the names in my var file? >> >> deploy_env: >> instance_type: t2.micro >> image: ami-02d03ce209db75523 >> sg_group: >> - "sg-057771872265bfda6" >> region: us-west-1 >> assign_ip: 10.10.1.10 >> vpc_subnet_id: subnet-0d9d37440a2265163 >> instance_tags: >> name: test1 >> >> >> ---------------- >> >> >> I need to apply ip address 10.10.1.11 - 10.10.1.20 and different tags to >> the ec2 instances >> >> >> >> >> >> >> -- >> > You received this message because you are subscribed to a topic in the >> Google Groups "Ansible Project" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/ansible-project/fsQdjZ1Ica8/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/7a17e070-baa9-4dae-9429-4dde024caa25n%40googlegroups.com >> <https://groups.google.com/d/msgid/ansible-project/7a17e070-baa9-4dae-9429-4dde024caa25n%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/CALmkhkpnU7r3cQ4gjsEoLzNKGVs1w2QWsYeXfXJAOoJPLqwAjA%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CALmkhkpnU7r3cQ4gjsEoLzNKGVs1w2QWsYeXfXJAOoJPLqwAjA%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/CAL8fbwON%3DeNPR9SQQemdE6W03rNkQuu3hxOSB9Xo--SL%2BzmzFQ%40mail.gmail.com.
