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
dd3aea6e
Commit
dd3aea6e
authored
Dec 13, 2013
by
Alex Coomans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to disable the Source/Destination check on EC2
parent
0078b6b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
library/cloud/ec2
+13
-0
No files found.
library/cloud/ec2
View file @
dd3aea6e
...
...
@@ -184,6 +184,12 @@ options:
required: false
default: null
aliases: []
source_dest_check:
version_added: "1.5"
description:
- Enable or Disable the Source/Destination checks (for NAT instances and Virtual Routers)
required: false
default: true
state:
version_added: "1.3"
description:
...
...
@@ -406,6 +412,7 @@ def create_instances(module, ec2):
assign_public_ip
=
module
.
boolean
(
module
.
params
.
get
(
'assign_public_ip'
))
private_ip
=
module
.
params
.
get
(
'private_ip'
)
instance_profile_name
=
module
.
params
.
get
(
'instance_profile_name'
)
source_dest_check
=
module
.
boolean
(
module
.
params
.
get
(
'source_dest_check'
))
# group_id and group_name are exclusive of each other
if
group_id
and
group_name
:
...
...
@@ -546,6 +553,11 @@ def create_instances(module, ec2):
for
inst
in
this_res
.
instances
:
running_instances
.
append
(
inst
)
# Enabled by default by Amazon
if
not
source_dest_check
:
for
inst
in
res
.
instances
:
inst
.
modify_attribute
(
'sourceDestCheck'
,
False
)
instance_dict_array
=
[]
created_instance_ids
=
[]
for
inst
in
running_instances
:
...
...
@@ -649,6 +661,7 @@ def main():
private_ip
=
dict
(),
instance_profile_name
=
dict
(),
instance_ids
=
dict
(
type
=
'list'
),
source_dest_check
=
dict
(
type
=
'bool'
,
default
=
True
),
state
=
dict
(
default
=
'present'
),
)
)
...
...
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