The judge told him: “This was a sophisticated commercial set up generating quantities of cannabis far in excess of your own needs. There must have been considerable risk of onward supply.

“You had a significant role and were in charge of the operation.”

Mr Gareth Evans, prosecuting, said: “A search was made of the premises of his business MRB motorcycles because two police community support officers smelled cannabis inside.

“He occupied two units, one of which was a motorcycle sales and repair business and the other was used for producing cannabis with a potential yield of 2.1 kilograms.”

He said harvested cannabis was found in a Tesco bag and the total amount was valued at £15,980 by police and Hayter has a previous conviction for growing cannabis in 2007.

Hayter represented himself and said: “I have had time to reflect on my behaviour and I am changing my life having realised the mistakes I have made. I have been immature and foolish and made bad decisions.”