yeah -- i re-read what i wrote and cringed a little -- sorry about that .. let me explain better what i am hoping for ..
#1 in my example play, it creates a VPC just fine .. problem is, if i run it again -- with no changes to the code -- it will create a new VPC with the same options .. i guess i am hoping it would not do that (<< my definition of "idempotency" ;-) .. #2 let's say i update example code with new subnet, i would *hope* that it would update the existing VPC instead of creating a new one -- as it does now .. mind you, my tests were pretty basic and i did not implement the use of resource_tags or define a vpc_id (<< which i ASSumed is only for deleting a VPC) thanks, greg On Fri, Jun 6, 2014 at 8:43 AM, Michael DeHaan <[email protected]> wrote: > "curious if anyone has figured out a way to have "idempotency" when creating > a VPC using this module " > > Idempotency is one of my least favorite words, because it's used in so many > different ways by different people to mean many different things :) > > Just to be sure, what is the above code block doing that you don't like? > > Thanks! > > > > > > On Thu, Jun 5, 2014 at 3:39 PM, Gregory Spranger <[email protected]> > wrote: >> >> hi all, >> >> been testing out this fun module: >> http://docs.ansible.com/ec2_vpc_module.html >> >> curious if anyone has figured out a way to have "idempotency" when >> creating a VPC using this module .. more specifically, our subnets and route >> tables do change, so i would prefer that after i update the play -- it would >> update the existing VPC and not create a new one .. below is my example >> code: >> >> >> local_action: >> module: ec2_vpc >> aws_access_key: yoyoma >> aws_secret_key: mamayo >> state: present >> cidr_block: 10.169.0.0/16 >> region: us-east-1 >> subnets: >> - cidr: 10.169.1.0/24 >> az: us-east-1b >> - cidr: 10.169.2.0/24 >> az: us-east-1b >> - cidr: 10.169.3.0/24 >> az: us-east-1b >> internet_gateway: True >> route_tables: >> - subnets: >> - 10.169.1.0/24 >> routes: >> - dest: 0.0.0.0/0 >> gw: igw >> register: vpc >> >> >> thanks !! >> greg >> >> -- >> 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 post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/9238e36a-e4e6-48b6-b234-aefb27517122%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > > -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzTGWJswe8TJ-M2bXoAcZDZRw99v5wTJxFpJLSszcqifA%40mail.gmail.com. > > For more options, visit https://groups.google.com/d/optout. -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAAL7GYAkpQYdEdwjSuiQiHH2DGR_BZ8pvEnWjsiE_19dwTjqyw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
