Skip to content

Commit 2ce1fa4

Browse files
author
anandkumarpatel
committed
Merge pull request #230 from CodeNow/filter-staging-docks
Filter staging docks from production docks inventory.
2 parents fd36169 + 00904b3 commit 2ce1fa4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ansible/prod-hosts/docks.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ ec2.describeInstances(params, function (err, data) {
4343
});
4444
});
4545

46+
// Filter out staging docks
47+
instances = instances.filter(function (instance) {
48+
return !instance.Tags.some(function (tag) {
49+
return tag.Key === 'env' && tag.Value === 'staging';
50+
});
51+
})
52+
4653
// Map the instances to their private ip addresses
4754
// NOTE This will work locally because of the wilcard ssh proxy in the config
4855
var hosts = instances.map(function (instance) {

0 commit comments

Comments
 (0)