anchor.diff:                          end
                   end,
       {_, Options} = lists:foldl(AddOption, {Info, Options0}, OptionsMapping),
  +    lager:debug("runner ~p: connecting to ~p:~p using ssh with options ~p",
  +                [self(), Host, Port, Options]),
       ssh:connect(Host, Port, Options, 10000).
   
   get_cmd(#{cmd := Cmd}) ->
  
positive.code: 
  
  connect_to_service(#{type := local}) ->
      {ok, local};
  connect_to_service(#{type := ssh , host := Host } = Info ) ->
      {ok, Port} = maps:get(port, Info),
  
negative.code: 
  execute_command(Cmd, ssh, Connection, State) when is_list(Cmd) ->
      {ok, ChannelId} = ssh_connection:session_channel(Connection, infinity),
      lager:debug("runner ~p: executing ~p", [self(), Cmd]),
      success = ssh_connection:exec(Connection, ChannelId, Cmd, infinity),
      CmdState =  #{channel_id => ChannelId, cmd => Cmd},
      {ok, State#state{ cmd_state = CmdState }};
  execute_command(Cmd, local, _Connection, #state{cmd_log=Log} = State)
    when is_list(Cmd) ->
      lager:debug("runner ~p: executing ~p", [self(), Cmd]),
      StdOut = list_to_binary(os:cmd(Cmd)),
      lager:debug("runner ~p: result ~p", [self(), StdOut]),
      trigger_next_command(),
      CmdState = #{std_out => [StdOut], cmd => Cmd, std_err => []},
      NewState = State#state{ cmd_state = #{},
  