The effect of Ir substitution for Os in CeOs2Al10, with an unusually high Neel temperature of T~28.5K, has been studied by high-resolution neutron diffraction and magnetization measurements. A small amount of Ir (~ 8%) results in a pronounced change of the magnetic structure of the Ce-sublattice. The new magnetic ground state is controlled by the single ion anisotropy and implies antiferromagnetic arrangement of the Ce-moments along the a-axis, as expected from the anisotropy of the paramagnetic susceptibility. The value of the ordered moments, 0.92(1) mu_B, is substantially bigger than in the undoped compound, whereas the transition temperature is reduced down to 21K. A comparison of the observed phenomena with the recently studied CeRu1.9Rh0.1Al10 system, exhibiting similar behaviour [A. Kondo et al., J. Phys. Soc. Jpn. 82, 054709 (2013)], strongly suggests the electron doping as the main origin of the ground state changes. This provides a new way of exploring the anomalous magnetic properties of the Ce(Ru/Os)2Al10 compounds.