spec/lib/.ansible.rb
def docker_stop
    need_stop = false
    Docker::Container.all.each do |con|
      con.info['Names'].each do |con_name|
        if con_name.match("/#{@env_name}")
          need_stop = true
          break
        end
      end
    end
    if need_stop
      @docker_con.stop()
    end
  end
# stop a running container for this project
stop a running container for this project
stop a running container for this project
def docker_stop
    need_stop = false
    Docker::Container.all.each do |con|
      con.info['Names'].each do |con_name|
        if con_name.match("/#{@env_name}")
          need_stop = true
          break
        end
      end
    end
    if need_stop
      @docker_con.stop()
    end
  end
def docker_stop need_stop = false Docker :: Container . all . each do | con | con . info [ 'Names' ] . each do | con_name | if con_name . match ( "/#{@env_name}" ) need_stop = true break end end end if need_stop @docker_con . stop ( ) end end
stop a running container for this project
stop a running container for this project