Commit Graph

52 Commits (85e9ccd17bc824d271184135f5fa1b6476104f65)

Author SHA1 Message Date
James Cammarata 576ca33bdc Fixing digital_ocean documentation and a bug in os_subnet 10 years ago
Toshio Kuratomi 60a66a544d Several cleanups to many modules:
* Fix docs to specify when python2.6+ is required (due to a library
  dep).  This helps us know when it is okay to use python2.6+ syntax in
  the file.
* remove BabyJson returns.  See #1211  This commit fixes all but the
  openstack modules.
* Use if __name__ == '__main__' to only run the main part of the module
  if the module is run as a program.  This allows for the potential to
  unittest the code later.
10 years ago
Romain Dartigues 3c848289a0 Issue #1161 DigitalOcean API 2 ssh_key_ids problem
* fix documentation: show a valid syntax
* make ssh_key_ids a list and not a string
10 years ago
Tor Åke Fransson 360409cee8 Merge remote-tracking branch 'origin/devel' into digitalocean-user-data
Conflicts:
	cloud/digital_ocean/digital_ocean.py
10 years ago
Tor Åke Fransson 3f17ec489b Remove all reference to obsolete client_id and rename api_key to the for v2 more correct api_token 10 years ago
Tor Åke Fransson 41875984e5 Make digital_ocean ssh command use API v2 10 years ago
Brian Coca 79844506db Merge pull request #341 from axilleas/digitalocean_docs
digital_ocean: Add note about using API v1
10 years ago
Tor Åke Fransson 69911ec86e WIP: DigitalOcean API version 2 with user_data option 10 years ago
Edward 3fbfd7351b Fixes #816 Backups not enabled on new droplets.
Convert backups_enabled string to lowercase. Similar to fix for private
networking.
10 years ago
Ryan Rawson 0162fc525d Fixes #581 - digitalocean module cannot create private_networking=true droplets 10 years ago
Achilleas Pipinellis cab378bff6 Add note about using version 1 of DigitalOcean API. 10 years ago
Sam Kottler 7b875dbda5 Remove trailing whitespace in digital_ocean_domain 10 years ago
Nejc Zupan 6f6eca5b4e digital ocean: Remove unsupported states 10 years ago
Brian Coca 19ed60196c added __init__.py to new cloud subcategories so builds work again 10 years ago
Brian Coca 0c4adcb2c6 made subcategories for cloud modules for better organization 10 years ago
Michael DeHaan c8e1a2077e file extensions! 10 years ago
Michael DeHaan 417309a626 Restructuring. 10 years ago
Michael DeHaan 73123b69fa Move modules into subdirectory. 10 years ago
Richard C Isaacson 04c75500a2 Bulk update of choices=BOOLEANS to type='bool' 11 years ago
James Tanner 1deff2061a Update docstring in digital_ocean for backups_enabled version_added 11 years ago
jctanner ba04c99517 Merge pull request #5935 from zimbatm/do-backups
library/digital_ocean: Adds the missing backups_enabled create option
11 years ago
Michael DeHaan b56f49c1d3 Merge pull request #6104 from gianlucaborello/digitalocean_fix_deletion
Make sure droplet deletion works even when idempotency is achieved using 'name' and 'unique_name' rather than 'id'
11 years ago
Markus Amalthea Magnuson a26d118859 Touch up documentation strings for DigitalOcean. 11 years ago
Gianluca Borello 0ebbd6e754 Make sure droplet deletion works even when idempotency is achieved using 'name' and 'unique_name' rather than 'id' 11 years ago
zimbatm 7acbba5108 library/digital_ocean: Adds the missing backups_enabled create option 11 years ago
Timur Batyrshin 9ad52632c5 reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 (#5852) 11 years ago
Rene Moser 0e5d5ad65b digital_ocean: added requirements in DOCUMENTATION 11 years ago
Michael DeHaan 50c600c361 Pass scrub_data by default, see response from DO here: https://www.digitalocean.com/blog 11 years ago
Michael DeHaan 3fd2e55619 User report of DO not taking underscores so tweaking docs 11 years ago
James Tanner 4f9aadcc07 Addresses #5023 Fix import comments 11 years ago
James Tanner 38edad70ac Fixes #5023 Convert all modules to use new snippet import pattern 11 years ago
Michael DeHaan 05251f2745 Merge pull request #4346 from dmkoch/digitalocean-droplet-options
Add "virtio" and "private_networking" options for DigitalOcean droplets
11 years ago
Michael DeHaan beae21dd40 Remove examples of module antipattern of setting the choices array for boolean types. 11 years ago
Daniel Koch 5d02fb6ca1 Add check to make sure dopy is at least version 0.2.2 for digital_ocean module 11 years ago
Daniel Koch a650b899c6 Add "virtio" and "private_networking" options for DigitalOcean droplets
The dopy manager defaults to False for virtio, but the DigitalOcean web interface defaults to True, which is a pretty safe default and sensible considering the performance gains.

Private networks are a new feature currently available only in the NYC2 region as of Oct 2, 2013.

NOTE: dopy >= 0.2.2 is required for these options to work.
11 years ago
James Cammarata 8ba5ed4d68 Added a version_added string to the new digital_ocean module param 11 years ago
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.
11 years ago
Ralph Bean 277a918e12 Fix an example with a yaml syntax error. 11 years ago
Ralph Bean a1738163a8 Fix some "make pep8" errors in the digital_ocean module. 11 years ago
Ralph Bean 06edce08f6 Remove trailing whitespace in digital ocean module. 11 years ago
Ralph Bean 46c18d44f0 Remove duplicate docs in digital ocean module.
The EXAMPLES block here has two copies of the same docs,
one nicely formatted, the other less so.

It looks like a pass was made to clean up the docs but the old
cruftier ones were never removed.
11 years ago
Bryan Larsen f440b5b46a update_attr should wait for the full wait timeout before checking for a missing IP addres 12 years ago
Bryan Larsen 3fe9756281 digital_ocean doc update 12 years ago
Bryan Larsen 69ff43d253 digital_ocean: don't run update_attr if wait=no
Sometimes when using digital_ocean with wait=no I get the error "No ip is found".  But with wait=no I wouldn't expect there to be any IP, that gets allocated later.   However, looking at the code, it turns out that with even with wait=no it waits up to 10 seconds for an IP to be allocated.  We could wait longer, but with wait=no that seems like the wrong choice; it's easy enough to grab an IP later with a wait=yes command.

To make this change I removed the call to update_attr in @classmethod add.  An add is always followed by an ensure_powered_on which will do the update_attr if wait=yes.   It would be possible to instead do a call to update_attr with no retries and ignore the errors but I figured it would be better to be consistently not return an IP than to sometimes return it and sometimes not.   Inconsistent behaviour makes debugging deployment scripts very difficult.
12 years ago
Benjamin Schwarze 7cc00f9a03 fix wrong argument_spec in digital_ocean module
as 'required' and 'default' are mutually exclusive removed 'required' in preference of 'default'
12 years ago
Michael DeHaan 0ed5d18d60 Fixup versions of newly added modules. 12 years ago
Michael DeHaan 997bf64f3f Fix up some module docs formatting errors. 12 years ago
Michael DeHaan e6bc5ce124 YAML fix 12 years ago
Michael DeHaan f986665c5d Merge branch 'ocean' into devel
Conflicts:
	library/cloud/digital_ocean
12 years ago
Michael DeHaan a85c97edfb Reformat examples 12 years ago