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
6d66b0e9
Commit
6d66b0e9
authored
Apr 16, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2692 from j2sol/rax
Minor fixes to the rax module
parents
b54e9555
59d0fb6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
library/rax
+19
-16
No files found.
library/rax
View file @
6d66b0e9
...
...
@@ -17,42 +17,36 @@
DOCUMENTATION
=
'''
---
module: rax
short_description: create
an instance in Rackspace Public Cloud, return instancei
d
short_description: create
/ delete an instance in Rackspace Public Clou
d
description:
- creates Rackspace Public Cloud instances and optionally waits for it to be 'running'.
- creates
/ deletes
Rackspace Public Cloud instances and optionally waits for it to be 'running'.
version_added: "1.2"
options:
service:
description:
- Cloud service to interact with
required: false
choices: ['cloudservers', 'cloudfiles', 'cloud_databases', 'cloud_loadbalancers']
choices: ['cloudservers']
default: cloudservers
state:
description:
- Indicate desired state of the resource
required: false
choices: ['present', 'active', 'absent', 'deleted']
default: present
creds_file:
description:
- File to find the Rackspace Public Cloud credentials in
required: false
default: null
name:
description:
- Name to give the instance
required: false
default: null
flavor:
description:
- flavor to use for the instance
required: false
default: null
image:
description:
- image to use for the instance
required: false
default: null
meta:
description:
...
...
@@ -61,7 +55,6 @@ options:
key_name:
description:
- key pair to use on the instance
required: false
default: null
aliases: ['keypair']
files:
...
...
@@ -71,12 +64,10 @@ options:
region:
description:
- Region to create an instance in
required: false
default: null
wait:
description:
- wait for the instance to be in state 'running' before returning
required: false
default: "no"
choices: [ "yes", "no" ]
wait_timeout:
...
...
@@ -84,8 +75,18 @@ options:
- how long before wait gives up, in seconds
default: 300
examples:
- code: 'local_action: rax creds_file=~/.raxpub service=cloudservers name=rax-test1 flavor=5 image=b11d9567-e412-4255-96b9-bd63ab23bcfe wait=yes state=present'
description: "Examples from Ansible Playbooks"
- code: |
- name: Create a server
local_action:
module: rax
creds_file: ~/.raxpub
service: cloudservers
name: rax-test1
flavor: 5
image: b11d9567-e412-4255-96b9-bd63ab23bcfe
wait: yes
state: present
description: "Example from Ansible Playbooks"
requirements: [ "pyrax" ]
author: Jesse Keating
notes:
...
...
@@ -104,8 +105,10 @@ except ImportError:
print
(
"failed=True msg='pyrax required for this module'"
)
sys
.
exit
(
1
)
SUPPORTEDSERVICES
=
[
'cloudservers'
,
'cloudfiles'
,
'cloud_blockstorage'
,
'cloud_databases'
,
'cloud_loadbalancers'
]
# These are possible services, but only cloudservers is supported at this time
#SUPPORTEDSERVICES = ['cloudservers', 'cloudfiles', 'cloud_blockstorage',
# 'cloud_databases', 'cloud_loadbalancers']
SUPPORTEDSERVICES
=
[
'cloudservers'
]
def
cloudservers
(
module
,
state
,
name
,
flavor
,
image
,
meta
,
key_name
,
files
,
wait
,
wait_timeout
):
...
...
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