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
0ae9128c
Commit
0ae9128c
authored
Nov 03, 2013
by
Mohan Krishnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ec2_eip connect method references module var that is not passed in
parent
4bfbee69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
library/cloud/ec2_eip
+6
-7
No files found.
library/cloud/ec2_eip
View file @
0ae9128c
...
...
@@ -102,7 +102,7 @@ else:
boto_found
=
True
def
connect
(
ec2_url
,
ec2_secret_key
,
ec2_access_key
,
region
):
def
connect
(
ec2_url
,
ec2_secret_key
,
ec2_access_key
,
region
,
module
):
""" Return an ec2 connection"""
# allow environment variables to be used if ansible vars aren't set
if
not
ec2_url
and
'EC2_URL'
in
os
.
environ
:
...
...
@@ -258,14 +258,13 @@ def main():
if
not
boto_found
:
module
.
fail_json
(
msg
=
"boto is required"
)
# def get_ec2_creds(module):
# return ec2_url, ec2_access_key, ec2_secret_key, region
ec2_url
,
ec2_access_key
,
ec2_secret_key
,
region
=
get_ec2_creds
(
module
)
ec2
=
connect
(
ec2_url
=
ec2_url
,
ec2_access_key
=
ec2_access_key
,
ec2_secret_key
=
ec2_secret_key
,
region
=
region
)
ec2
=
connect
(
ec2_url
,
ec2_access_key
,
ec2_secret_key
,
region
,
module
)
instance_id
=
module
.
params
.
get
(
'instance_id'
)
public_ip
=
module
.
params
.
get
(
'public_ip'
)
...
...
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