He was a Maquis, who served as Chakotay's #1 aboard the Val Jean. He then became stranded in the Delta Quadrant with Voyager. He became a security officer, from a Lieutenant in engineering. He was assigned to the bridge as a relief tactical officer.
Ayala served as tactical officer when Tuvok was missing with an away team. Janeway asked him to contact the team on the planets surface because they missed a few check-ins. His position switched to command shortly before Voyagers return.