The results of a search for charged Higgs bosons decaying to a tau lepton and a neutrino, , are presented. The analysis is based on 19.5 fb of proton-proton collision data at TeV collected by the ATLAS experiment at the Large Hadron Collider. Charged Higgs bosons are searched for in events consistent with top-quark pair production or in associated production with a top quark. The final state is characterised by the presence of a hadronic decay, missing transverse momentum, -jets, a hadronically decaying boson, and the absence of any electrons or muons. The data are consistent with the expected background from Standard Model processes. This leads to 95 % confidence level upper limits on the branching ratio of top-quark decays to a quark and a charged Higgs boson times branching ratio, , between 0.23 % and 1.3 % for charged Higgs boson masses in the range GeV. This also leads to 95 % confidence level upper limits on the production cross section times branching ratio, , between 0.0045 pb and 0.76 pb, for charged Higgs boson masses ranging from 180 GeV to 1000 GeV.