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
39291181
Commit
39291181
authored
Jun 19, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7829 from bennojoy/asg_policy
return properties of the newly created scaling policy
parents
49fb36ef
d1d96b6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
library/cloud/ec2_scaling_policy
+4
-2
No files found.
library/cloud/ec2_scaling_policy
View file @
39291181
...
...
@@ -91,7 +91,8 @@ def create_scaling_policy(connection, module):
try
:
connection
.
create_scaling_policy
(
sp
)
module
.
exit_json
(
changed
=
True
)
policy
=
connection
.
get_all_policies
(
policy_names
=
[
sp_name
])[
0
]
module
.
exit_json
(
changed
=
True
,
name
=
policy
.
name
,
arn
=
policy
.
policy_arn
,
as_name
=
policy
.
as_name
,
scaling_adjustment
=
policy
.
scaling_adjustment
,
cooldown
=
policy
.
cooldown
,
adjustment_type
=
policy
.
adjustment_type
,
min_adjustment_step
=
policy
.
min_adjustment_step
)
except
BotoServerError
,
e
:
module
.
fail_json
(
msg
=
str
(
e
))
else
:
...
...
@@ -118,7 +119,8 @@ def create_scaling_policy(connection, module):
connection
.
create_scaling_policy
(
policy
)
policy
=
connection
.
get_all_policies
(
policy_names
=
[
sp_name
])[
0
]
module
.
exit_json
(
changed
=
changed
,
name
=
policy
.
name
,
arn
=
policy
.
policy_arn
,
as_name
=
policy
.
as_name
,
scaling_adjustment
=
policy
.
scaling_adjustment
,
cooldown
=
policy
.
cooldown
,
adjustment_type
=
policy
.
adjustment_type
,
min_adjustment_step
=
policy
.
min_adjustment_step
)
module
.
exit_json
(
changed
=
changed
)
policy
=
connection
.
get_all_policies
(
policy_names
=
[
sp_name
])[
0
]
module
.
exit_json
(
changed
=
changed
,
name
=
policy
.
name
,
arn
=
policy
.
policy_arn
,
as_name
=
policy
.
as_name
,
scaling_adjustment
=
policy
.
scaling_adjustment
,
cooldown
=
policy
.
cooldown
,
adjustment_type
=
policy
.
adjustment_type
,
min_adjustment_step
=
policy
.
min_adjustment_step
)
except
BotoServerError
,
e
:
module
.
fail_json
(
msg
=
str
(
e
))
...
...
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