     each(config.servers)
     .parallel(true)
     .on 'item', (server, next) =>
-      contexts[server.host] = context (merge {}, config, server), params.command
+      ctx = contexts[server.host] = context (merge {}, config, server), params.command
+      ctx.hosts = contexts
+      ctx.shared = shared
       @actions server.host, 'install', {}, (err, actions) =>
         return next err if err
-        contexts[server.host].actions = actions or []
+        ctx.actions = actions or []
         @modules server.host, 'install', {}, (err, modules) =>
           return next err if err
-          contexts[server.host].modules = modules or []
+          ctx.modules = modules or []
           next()
     .on 'error', (err) =>
       @emit 'error', err

        return next() if params.hosts? and params.hosts.indexOf(server.host) is -1
        ctx = contexts[server.host]
        ctx.run = @
        ctx.shared = shared
        ctx.hosts = contexts
        @emit 'context', ctx
        @actions server.host, params.command, params, (err, actions) =>
          # return next new Error "Invalid run list: #{@params.command}" unless actions?

{EventEmitter} = require 'events'
{merge} = require 'mecano/lib/misc'
{flatten} = require './misc'
context = require './context'
{Tree} = require './tree'

