We present the results of a study of the AGN density in a homogeneous and well studied sample of 167 bona-fide X-ray galaxy clusters (0.1<z<0.5). Our aim is to study the AGN activity in 167 XXL X-ray galaxy clusters as a function of the cluster mass and the location of the AGN in the cluster. We report a significant AGN excess in our low-mass cluster sub-sample between 0.5r500 and 2r500. In contrast, the high-mass sub-sample presents no AGN excess. The AGN excess in poor clusters indicates AGN triggering, supporting previous studies that reported enhanced galaxy merging in the cluster outskirts. This effect is probably prevented by high velocity dispersions in high-mass clusters. Comparing also with previous studies of massive or high-redshift clusters, we conclude that the AGN fraction in cluster galaxies anti-correlates strongly with cluster mass.