Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
bfd93232
Commit
bfd93232
authored
Mar 11, 2014
by
jctanner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5935 from zimbatm/do-backups
library/digital_ocean: Adds the missing backups_enabled create option
parents
351ebd0b
4aaf8f9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
library/cloud/digital_ocean
+14
-6
No files found.
library/cloud/digital_ocean
View file @
bfd93232
...
@@ -75,6 +75,12 @@ options:
...
@@ -75,6 +75,12 @@ options:
version_added: "1.4"
version_added: "1.4"
default: "no"
default: "no"
choices: [ "yes", "no" ]
choices: [ "yes", "no" ]
backups_enabled:
description:
- Optional, Boolean, enables backups for your droplet.
version_added: "1.5"
default: "no"
choices: [ "yes", "no" ]
wait:
wait:
description:
description:
- Wait for the droplet to be in state 'running' before returning. If wait is "no" an ip_address may not be returned.
- Wait for the droplet to be in state 'running' before returning. If wait is "no" an ip_address may not be returned.
...
@@ -164,11 +170,11 @@ try:
...
@@ -164,11 +170,11 @@ try:
import
dopy
import
dopy
from
dopy.manager
import
DoError
,
DoManager
from
dopy.manager
import
DoError
,
DoManager
except
ImportError
,
e
:
except
ImportError
,
e
:
print
"failed=True msg='dopy >= 0.2.
2
required for this module'"
print
"failed=True msg='dopy >= 0.2.
3
required for this module'"
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
dopy
.
__version__
<
'0.2.
2
'
:
if
dopy
.
__version__
<
'0.2.
3
'
:
print
"failed=True msg='dopy >= 0.2.
2
required for this module'"
print
"failed=True msg='dopy >= 0.2.
3
required for this module'"
sys
.
exit
(
1
)
sys
.
exit
(
1
)
class
TimeoutError
(
DoError
):
class
TimeoutError
(
DoError
):
...
@@ -229,8 +235,8 @@ class Droplet(JsonfyMixIn):
...
@@ -229,8 +235,8 @@ class Droplet(JsonfyMixIn):
cls
.
manager
=
DoManager
(
client_id
,
api_key
)
cls
.
manager
=
DoManager
(
client_id
,
api_key
)
@classmethod
@classmethod
def
add
(
cls
,
name
,
size_id
,
image_id
,
region_id
,
ssh_key_ids
=
None
,
virtio
=
True
,
private_networking
=
False
):
def
add
(
cls
,
name
,
size_id
,
image_id
,
region_id
,
ssh_key_ids
=
None
,
virtio
=
True
,
private_networking
=
False
,
backups_enabled
=
False
):
json
=
cls
.
manager
.
new_droplet
(
name
,
size_id
,
image_id
,
region_id
,
ssh_key_ids
,
virtio
,
private_networking
)
json
=
cls
.
manager
.
new_droplet
(
name
,
size_id
,
image_id
,
region_id
,
ssh_key_ids
,
virtio
,
private_networking
,
backups_enabled
)
droplet
=
cls
(
json
)
droplet
=
cls
(
json
)
return
droplet
return
droplet
...
@@ -333,7 +339,8 @@ def core(module):
...
@@ -333,7 +339,8 @@ def core(module):
region_id
=
getkeyordie
(
'region_id'
),
region_id
=
getkeyordie
(
'region_id'
),
ssh_key_ids
=
module
.
params
[
'ssh_key_ids'
],
ssh_key_ids
=
module
.
params
[
'ssh_key_ids'
],
virtio
=
module
.
params
[
'virtio'
],
virtio
=
module
.
params
[
'virtio'
],
private_networking
=
module
.
params
[
'private_networking'
]
private_networking
=
module
.
params
[
'private_networking'
],
backups_enabled
=
module
.
params
[
'backups_enabled'
],
)
)
if
droplet
.
is_powered_on
():
if
droplet
.
is_powered_on
():
...
@@ -394,6 +401,7 @@ def main():
...
@@ -394,6 +401,7 @@ def main():
ssh_key_ids
=
dict
(
default
=
''
),
ssh_key_ids
=
dict
(
default
=
''
),
virtio
=
dict
(
type
=
'bool'
,
choices
=
BOOLEANS
,
default
=
'yes'
),
virtio
=
dict
(
type
=
'bool'
,
choices
=
BOOLEANS
,
default
=
'yes'
),
private_networking
=
dict
(
type
=
'bool'
,
choices
=
BOOLEANS
,
default
=
'no'
),
private_networking
=
dict
(
type
=
'bool'
,
choices
=
BOOLEANS
,
default
=
'no'
),
backups_enabled
=
dict
(
type
=
'bool'
,
choices
=
BOOLEANS
,
default
=
'no'
),
id
=
dict
(
aliases
=
[
'droplet_id'
],
type
=
'int'
),
id
=
dict
(
aliases
=
[
'droplet_id'
],
type
=
'int'
),
unique_name
=
dict
(
type
=
'bool'
,
default
=
'no'
),
unique_name
=
dict
(
type
=
'bool'
,
default
=
'no'
),
wait
=
dict
(
type
=
'bool'
,
default
=
True
),
wait
=
dict
(
type
=
'bool'
,
default
=
True
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment