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
d7b61db6
Commit
d7b61db6
authored
Sep 18, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made boto3 non mandatory
parent
fdb1c140
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
lib/ansible/module_utils/ec2.py
+9
-3
No files found.
lib/ansible/module_utils/ec2.py
View file @
d7b61db6
...
...
@@ -25,7 +25,13 @@
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import
os
,
boto3
import
os
try
:
import
boto3
HAS_BOTO3
=
True
except
:
HAS_BOTO3
=
False
try
:
from
distutils.version
import
LooseVersion
...
...
@@ -74,7 +80,7 @@ def boto_supports_profile_name():
return
hasattr
(
boto
.
ec2
.
EC2Connection
,
'profile_name'
)
def
get_aws_connection_info
(
module
,
boto3
=
False
):
def
get_aws_connection_info
(
module
):
# Check module args for credentials, then check environment vars
# access_key
...
...
@@ -135,7 +141,7 @@ def get_aws_connection_info(module, boto3=False):
# in case security_token came in as empty string
security_token
=
None
if
boto
3
:
if
HAS_BOTO
3
:
boto_params
=
dict
(
aws_access_key_id
=
access_key
,
aws_secret_access_key
=
secret_key
,
aws_session_token
=
security_token
)
...
...
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