Skip to content

Commit

Permalink
fix dynamic hosts example
Browse files Browse the repository at this point in the history
  • Loading branch information
pstadler committed Jan 27, 2015
1 parent ceb9f59 commit ad91167
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,14 @@ function Flightplan() {
* if(err) {
* return done(err);
* }
* var hosts = response.data.Reservations.map(function(reservation) {
* return reservation.Instances.map(function(instance) {
* return {
* host: server.PublicIpAddress,
* var hosts = [];
* response.data.Reservations.forEach(function(reservation) {
* reservation.Instances.forEach(function(instance) {
* hosts.push({
* host: instance.PublicIpAddress,
* username: 'pstadler',
* agent: process.env.SSH_AUTH_SOCK
* };
* });
* });
* });
* done(hosts);
Expand Down Expand Up @@ -209,13 +210,14 @@ function Flightplan() {
* if(err) {
* return done(err);
* }
* var hosts = response.data.Reservations.map(function(reservation) {
* return reservation.Instances.map(function(instance) {
* return {
* host: server.PublicIpAddress,
* var hosts = [];
* response.data.Reservations.forEach(function(reservation) {
* reservation.Instances.forEach(function(instance) {
* hosts.push({
* host: instance.PublicIpAddress,
* username: 'pstadler',
* agent: process.env.SSH_AUTH_SOCK
* };
* });
* });
* });
* done(hosts);
Expand Down

0 comments on commit ad91167

Please sign in to comment.