Charged Higgs bosons produced either in top-quark decays or in association with a top-quark, subsequently decaying via H± → τ±ντ, 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± decays hadronically or leptonically, the search targets τ+jets and τ+lepton final states, in both cases with a hadronically decaying τ-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{mathcal{B}}left({H}^{pm}to {tau}^{pm }{nu}_{tau}right) in the range 4.2–0.0025 pb. In the mass range 90–160 GeV, assuming the Standard Model cross-section for toverline{t} production, this corresponds to upper limits between 0.25% and 0.031% for the branching fraction mathrm{mathcal{B}}left(tto b{H}^{pm}right)times mathrm{mathcal{B}}left({H}^{pm}to {tau}^{pm }{nu}_{tau}right) .