ansible/cloud
Ralph Bean 1d0a7baaa1 Add a new unique_name param to the digital_ocean module for idempotence.
As it stands now, it is difficult to write idempotent tasks for digital
ocean droplets.  Digital ocean assigns new nodes a random id when they
are provisioned and that id is the only key that can be used to identify
it in subsequent runs of that play.

The workflow previously involved manual intervention:

- write a play defining a new node with no specified id
- run it, collect the randomly assigned id by hand
- modify the play to add the id by hand so future runs don't create
  duplicate nodes
- perform future re-runs that check if the node exists (by its id)
  - if it does exist then do nothing.
  - if it does not exist, then create it and return a *new random id*
  - collect the new random id by hand, modify the playbook file, and
    start all over.

Its a huge pain.

The modifications in this commit allow you to use the 'hostname' as a
primary key for idempotence with digital ocean.  By default, digital
ocean will let you create as many hosts with the same hostname as you
like.  Here, we provide an option to constrain the user to using only
unique hostnames.

The workflow will now look like:

- write a play defining a new node with a specified hostname and
  "unique_name: true""
- run it, create the new node and move on.
- re-run it, notice that a node with that hostname is already created
  and move on.
2013-09-18 16:07:22 -04:00
..
cloudformation The cloudformation module argument spec should match the documentation, so that template_parameters is a required argument. 2013-08-27 15:09:30 -06:00
digital_ocean Add a new unique_name param to the digital_ocean module for idempotence. 2013-09-18 16:07:22 -04:00
ec2 Merge branch 'rb2' of https://github.com/bpennypacker/ansible into bpennypacker-rb2 2013-08-23 11:36:45 -05:00
ec2_ami Merge branch 'rb2' of https://github.com/bpennypacker/ansible into bpennypacker-rb2 2013-08-23 11:36:45 -05:00
ec2_elb Modified ec2_elb doc per issue #3849 2013-09-03 16:13:25 -05:00
ec2_facts Allow check mode when gathering ec2 facts 2013-07-11 19:50:55 -05:00
ec2_group Minor fix, vpc_id is not required for the ec2_group 2013-08-19 11:38:06 -05:00
ec2_tag Basic module to tag resources in EC2. 2013-08-13 12:55:06 -05:00
ec2_vol Rebase attempt 2013-08-20 15:14:16 -04:00
glance_image Fix 'timeout' parameter of glance-image module. 2013-07-25 14:54:21 -07:00
keystone_user Keystone_user module: fix authentication needs tenant_name too 2013-07-10 07:21:07 +01:00
linode Styling: semicolon 2013-06-30 18:53:22 -04:00
nova_compute Fix wait_for default value to follow the documentation (documentation = 180, default value = 120) 2013-09-08 23:52:40 +02:00
nova_keypair DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition) 2013-06-15 20:54:25 +02:00
quantum_floating_ip DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition) 2013-06-15 20:54:25 +02:00
quantum_floating_ip_associate Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00
quantum_network quantum_network: fix some doc mistakes 2013-08-28 21:19:24 +01:00
quantum_router Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00
quantum_router_gateway DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition) 2013-06-15 20:54:25 +02:00
quantum_router_interface Fixed a few small typos 2013-06-18 12:26:40 -06:00
quantum_subnet Spelling fixes 2013-06-16 22:09:35 -04:00
rax Comparison data type mismatch corrected 2013-08-13 09:28:53 -05:00
rds make rds handle vpc security groups properly 2013-09-02 20:40:41 +02:00
route53 Fixed small typo from the merge conflict in the route53 module 2013-08-23 13:40:57 -05:00
s3 Rebase attempt 2013-08-20 15:14:16 -04:00
virt Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00