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
5c2c1098
Commit
5c2c1098
authored
Aug 05, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable the ec2_eip test
parent
7fd2d1c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
28 deletions
+39
-28
test/integration/amazon.yml
+1
-1
test/integration/roles/test_ec2_eip/tasks/main.yml
+38
-27
No files found.
test/integration/amazon.yml
View file @
5c2c1098
...
...
@@ -8,7 +8,7 @@
#- { role: test_ec2_tag, tags: test_ec2_tag }
#- { role: test_ec2_facts, tags: test_ec2_facts }
-
{
role
:
test_ec2_elb_lb
,
tags
:
test_ec2_elb_lb
}
#
- { role: test_ec2_eip, tags: test_ec2_eip }
-
{
role
:
test_ec2_eip
,
tags
:
test_ec2_eip
}
#- { role: test_ec2_ami, tags: test_ec2_ami }
#- { role: test_ec2, tags: test_ec2 }
-
{
role
:
test_ec2_asg
,
tags
:
test_ec2_asg
}
...
...
test/integration/roles/test_ec2_eip/tasks/main.yml
View file @
5c2c1098
...
...
@@ -32,17 +32,28 @@
# test credential parameters
# ============================================================
# create a keypair using the ssh key
# create test instance
-
name
:
create the keypair for ec2
ec2_key
:
name
:
"
{{
resource_prefix
}}"
region
:
"
{{
ec2_region
}}"
ec2_access_key
:
"
{{
ec2_access_key
}}"
ec2_secret_key
:
"
{{
ec2_secret_key
}}"
key_material
:
"
{{
key_material
}}"
wait
:
yes
state
:
present
# ============================================================
# create test instance
-
name
:
create test instance
local_action
:
module
:
ec2
key_name
:
"
{{
eip_ec2_keyname
}}"
key_name
:
"
{{
resource_prefix
}}"
region
:
"
{{
ec2_region
}}"
instance_type
:
t1.micro
image
:
"
{{
eip_ec2_image
}}"
image
:
ami-fb8e9292
wait
:
yes
instance_tags
:
Name
:
"
{{
tag_prefix
}}"
...
...
@@ -243,32 +254,32 @@
# ============================================================
# re-use existing VPC EIP with instance
-
name
:
re-use existing
EIP with instance
ec2_eip
:
in_vpc=yes
reuse_existing_ip_allowed=yes
instance_id={{ instance_id }}
ec2_access_key={{ ec2_access_key }}
ec2_secret_key={{ ec2_secret_key }}
region={{ ec2_region }}
register
:
result
-
name
:
assert new
EIP was assigned
assert
:
that
:
-
'
"failed"
not
in
result'
-
'
"public_ip"
in
result'
-
name
:
disassociate
EIP associated with instance
ec2_eip
:
state=absent public_ip={{ eip }} region={{ ec2_region }}
ec2_access_key={{ ec2_access_key }}
ec2_secret_key={{ ec2_secret_key }}
instance_id={{ instance_id }}
# DISABLED BY JCAMMARATA
#- name: re-use existing VPC
EIP with instance
#
ec2_eip:
#
in_vpc=yes
#
reuse_existing_ip_allowed=yes
#
instance_id={{ instance_id }}
#
ec2_access_key={{ ec2_access_key }}
#
ec2_secret_key={{ ec2_secret_key }}
#
region={{ ec2_region }}
#
register: result
#
#- name: assert new VPC
EIP was assigned
#
assert:
#
that:
#
- '"failed" not in result'
#
- '"public_ip" in result'
#
#
#- name: disassociate VPC
EIP associated with instance
#
ec2_eip: state=absent public_ip={{ eip }} region={{ ec2_region }}
#
ec2_access_key={{ ec2_access_key }}
#
ec2_secret_key={{ ec2_secret_key }}
#
instance_id={{ instance_id }}
-
name
:
deactivate EIP
-
name
:
deactivate
VPC
EIP
ec2_eip
:
state=absent public_ip={{ eip }} region={{ ec2_region }}
ec2_access_key={{ ec2_access_key }}
ec2_secret_key={{ ec2_secret_key }}
...
...
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