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
36fe595d
Commit
36fe595d
authored
Sep 02, 2013
by
Herby Gillot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ec2 inventory script: Add a global group for EC2 and RDS instances when
listing EC2 inventory
parent
6dd3505c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
plugins/inventory/ec2.py
+6
-0
No files found.
plugins/inventory/ec2.py
View file @
36fe595d
...
@@ -349,6 +349,9 @@ class Ec2Inventory(object):
...
@@ -349,6 +349,9 @@ class Ec2Inventory(object):
key
=
self
.
to_safe
(
"tag_"
+
k
+
"="
+
v
)
key
=
self
.
to_safe
(
"tag_"
+
k
+
"="
+
v
)
self
.
push
(
self
.
inventory
,
key
,
dest
)
self
.
push
(
self
.
inventory
,
key
,
dest
)
# Global Tag: tag all EC2 instances
self
.
push
(
self
.
inventory
,
'ec2'
,
dest
)
def
add_rds_instance
(
self
,
instance
,
region
):
def
add_rds_instance
(
self
,
instance
,
region
):
''' Adds an RDS instance to the inventory and index, as long as it is
''' Adds an RDS instance to the inventory and index, as long as it is
...
@@ -400,6 +403,9 @@ class Ec2Inventory(object):
...
@@ -400,6 +403,9 @@ class Ec2Inventory(object):
# Inventory: Group by parameter group
# Inventory: Group by parameter group
self
.
push
(
self
.
inventory
,
self
.
to_safe
(
"rds_parameter_group_"
+
instance
.
parameter_group
.
name
),
dest
)
self
.
push
(
self
.
inventory
,
self
.
to_safe
(
"rds_parameter_group_"
+
instance
.
parameter_group
.
name
),
dest
)
# Global Tag: all RDS instances
self
.
push
(
self
.
inventory
,
'rds'
,
dest
)
def
get_host_info
(
self
):
def
get_host_info
(
self
):
''' Get variables about a specific host '''
''' Get variables about a specific host '''
...
...
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