You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/library
Ralph Bean a9a2a96218 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.
13 years ago
..
cloud Add a new unique_name param to the digital_ocean module for idempotence. 13 years ago
commands Allow for relative paths by using abspath 13 years ago
database Merge branch 'devel' of https://github.com/abompard/ansible into abompard-devel 13 years ago
files Updated version_added string for the new validate_md5 option 13 years ago
internal * Updated all ansible.cc references in the documentation to point 13 years ago
inventory Trim legacy variable usage. 13 years ago
messaging Add missing version_added description in docs. 13 years ago
monitoring Fixed monit restarted error. 13 years ago
net_infrastructure Merge branch 'devel' of https://github.com/mhite/ansible into mhite-devel 13 years ago
network Fix bug in uri where redirect check fails. 13 years ago
notification Set default XMPP message type to 'chat'. 13 years ago
packaging Merge branch 'fix/apt_repository_update_cache' of https://github.com/resmo/ansible into resmo-fix/apt_repository_update_cache 13 years ago
source_control Merge branch 'gitfix' of https://github.com/johanwiren/ansible into johanwiren-gitfix 13 years ago
system Merge branch 'issue_3417_systemd_stuff' into devel 13 years ago
utilities Check for an empty executable passed into the accelerate plugin 13 years ago
web_infrastructure use home path expansion for virtualenv param in django_manage module 13 years ago