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
30820437
Commit
30820437
authored
Dec 12, 2013
by
Vincent Viallet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor typos and remove extra dependencies.
parent
1150b78b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
library/cloud/ec2_key
+3
-6
No files found.
library/cloud/ec2_key
View file @
30820437
...
@@ -106,9 +106,6 @@ except ImportError:
...
@@ -106,9 +106,6 @@ except ImportError:
print
"failed=True msg='boto required for this module'"
print
"failed=True msg='boto required for this module'"
sys
.
exit
(
1
)
sys
.
exit
(
1
)
# Required if importing key
import
base64
def
main
():
def
main
():
module
=
AnsibleModule
(
module
=
AnsibleModule
(
argument_spec
=
dict
(
argument_spec
=
dict
(
...
@@ -159,14 +156,14 @@ def main():
...
@@ -159,14 +156,14 @@ def main():
try
:
try
:
key
.
delete
()
key
.
delete
()
except
Exception
,
e
:
except
Exception
,
e
:
module
.
fail_json
(
msg
=
"Unable to key pair '
%
s' -
%
s"
%
(
key
,
e
))
module
.
fail_json
(
msg
=
"Unable to
delete
key pair '
%
s' -
%
s"
%
(
key
,
e
))
else
:
else
:
key
=
None
key
=
None
changed
=
True
changed
=
True
else
:
else
:
'''no match found, no changes required'''
'''no match found, no changes required'''
# Ensure requested
group
is present
# Ensure requested
key
is present
elif
state
==
'present'
:
elif
state
==
'present'
:
if
key
:
if
key
:
'''existing key found'''
'''existing key found'''
...
@@ -175,7 +172,7 @@ def main():
...
@@ -175,7 +172,7 @@ def main():
# the key has been created of imported.
# the key has been created of imported.
pass
pass
# if the
group
doesn't exist, create it now
# if the
key
doesn't exist, create it now
else
:
else
:
'''no match found, create it'''
'''no match found, create it'''
if
not
module
.
check_mode
:
if
not
module
.
check_mode
:
...
...
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