  Charged Higgs bosons produced either in top-quark decays or in association
with a top-quark, subsequently decaying via $H^{\pm} \to \tau^{\pm}\nu_{\tau}$,
are searched for in 36.1 fb$^{-1}$ of proton-proton collision data at
$\sqrt{s}=13$ TeV recorded with the ATLAS detector. Depending on whether the
top-quark produced together with $H^{\pm}$ decays hadronically or leptonically,
the search targets $\tau$+jets and $\tau$+lepton final states, in both cases
with a hadronically decaying $\tau$-lepton. No evidence of a charged Higgs
boson is found. For the mass range of $m_{H^{\pm}}$ = 90-2000 GeV, upper limits
at the 95% confidence level are set on the production cross-section of the
charged Higgs boson times the branching fraction $\mathrm{B}(H^{\pm} \to
\tau^{\pm}\nu_{\tau})$ in the range 4.2-0.0025 pb. In the mass range 90-160
GeV, assuming the Standard Model cross-section for $t\overline{t}$ production,
this corresponds to upper limits between 0.25% and 0.031% for the branching
fraction $\mathrm{B}(t\to bH^{\pm}) \times \mathrm{B}(H^{\pm} \to
\tau^{\pm}\nu_{\tau})$.
